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