Commit b0ef376a by Tianqi Chen Committed by GitHub

Fix more type annotation (#1490)

parent 4de90113
......@@ -168,7 +168,7 @@ void ArgBinder::BindDLTensor(const Buffer& buffer,
if (Bind_(buffer->data, TVMArrayGet(Handle(), handle, intrinsic::kArrData),
arg_name + ".data", true)) {
Var vptr(buffer->data);
def_handle_dtype_.Set(vptr, make_const(buffer->dtype, 0));
def_handle_dtype_.Set(vptr, ir::TypeAnnotation(buffer->dtype));
// mark alignment of external bufs
init_nest_.emplace_back(AttrStmt::make(
vptr, ir::attr::storage_alignment,
......@@ -190,7 +190,7 @@ void ArgBinder::BindDLTensor(const Buffer& buffer,
}
// strides field
Var v_strides(arg_name + ".strides", Handle());
def_handle_dtype_.Set(v_strides, make_const(tvm_shape_type, 0));
def_handle_dtype_.Set(v_strides, ir::TypeAnnotation(tvm_shape_type));
init_nest_.emplace_back(LetStmt::make(
v_strides, TVMArrayGet(Handle(), handle, intrinsic::kArrStrides),
nop));
......
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