Commit 977896cb by Haichen Shen Committed by Tianqi Chen

[Bugfix] Fix type code error for StringImm (#3050)

parent f4fa0328
......@@ -251,6 +251,9 @@ class BuiltinLower : public IRMutator {
stack_value_, static_cast<int>(arg_stack_begin + i - 1),
intrinsic::kTVMValueContent, arg));
int arg_tcode = api_type.code();
if (api_type.is_handle() && arg.as<StringImm>()) {
arg_tcode = kStr;
}
if (IsArrayHandle(arg)) arg_tcode = kArrayHandle;
prep_seq_.emplace_back(
Store::make(stack_tcode_,
......
......@@ -29,7 +29,6 @@ def test_min_repeat_ms():
def my_debug(filename):
"""one call lasts for 100 ms and writes one character to a file"""
time.sleep(0.1)
filename = ctypes.c_char_p(filename.value).value
with open(filename, "a") as fout:
fout.write("c")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment