diff --git a/3rdparty/HalideIR b/3rdparty/HalideIR index 55ba1778fd264..e4a4c02764d37 160000 --- a/3rdparty/HalideIR +++ b/3rdparty/HalideIR @@ -1 +1 @@ -Subproject commit 55ba1778fd264c7507953552d8e51212ed11f748 +Subproject commit e4a4c02764d37c9c3db0d64c4996651a3ef9513c diff --git a/3rdparty/dlpack b/3rdparty/dlpack index 5c792cef3aee5..bee4d1dd8dc1e 160000 --- a/3rdparty/dlpack +++ b/3rdparty/dlpack @@ -1 +1 @@ -Subproject commit 5c792cef3aee54ad8b7000111c9dc1797f327b59 +Subproject commit bee4d1dd8dc1ee4a1fd8fa6a96476c2f8b7492a3 diff --git a/3rdparty/dmlc-core b/3rdparty/dmlc-core index 3ffea8694adf9..4d49691f1a9d9 160000 --- a/3rdparty/dmlc-core +++ b/3rdparty/dmlc-core @@ -1 +1 @@ -Subproject commit 3ffea8694adf9c0363f9abbf162dc0e4a45b22c5 +Subproject commit 4d49691f1a9d944c3b0aa5e63f1db3cad1f941f8 diff --git a/python/tvm/_ffi/ndarray.py b/python/tvm/_ffi/ndarray.py index 3deb888bd10c2..75089345c6fe6 100644 --- a/python/tvm/_ffi/ndarray.py +++ b/python/tvm/_ffi/ndarray.py @@ -284,7 +284,7 @@ def asnumpy(self): return np_arr def copybytesto(self, target): - assert(target.flags['C_CONTIGUOUS']) + assert target.flags['C_CONTIGUOUS'] data = target.ctypes.data_as(ctypes.c_void_p) nbytes = ctypes.c_size_t(target.size * target.dtype.itemsize) _LIB.TVMArrayCopyToBytes(self.handle, data, nbytes) diff --git a/python/tvm/custom_datatypes.py b/python/tvm/custom_datatypes.py index 966234c9df551..7f4fc84e81e91 100644 --- a/python/tvm/custom_datatypes.py +++ b/python/tvm/custom_datatypes.py @@ -53,7 +53,7 @@ def register_op(lower_func, op_name, target, type_name, src_type_name=None): the argument to the Cast. If op_name is not "Cast", this is unused. """ - if op_name is "Cast": + if op_name == "Cast": assert src_type_name is not None lower_func_name = "tvm.custom_datatypes.lower." + target + "." \ + op_name + "." + type_name + "." + src_type_name @@ -81,11 +81,10 @@ def lower(op): dtype = "uint" + str(t.bits) if t.lanes > 1: dtype += "x" + str(t.lanes) - if type(op) is _Cast: + if isinstance(op, _Cast): return _make.Call(dtype, extern_func_name, convert([op.value]), _Call.Extern, None, 0) - else: - return _make.Call(dtype, extern_func_name, convert([op.a, op.b]), - _Call.Extern, None, 0) + return _make.Call(dtype, extern_func_name, convert([op.a, op.b]), + _Call.Extern, None, 0) return lower