optima2005 commented on issue #4418: [RUNTIME] Add cudnn conv3d URL: https://github.com/apache/incubator-tvm/pull/4418#issuecomment-559398006 @masahi , could you advice how to write below code to use array? ``` return _api.extern( oshape, [x, w], lambda ins, outs: _intrin.call_packed( "tvm.contrib.cudnn.conv.forward", conv_mode, tensor_format, algo, dims, pad, stride, dilation, ins[0], ins[1], outs[0], conv_dtype), name="y") ``` I got this error ``` self = <tvm._ffi.function.Function object at 0x3fff6ebb3240> args = ('int32', 'tvm_call_packed', ['tvm.contrib.cudnn.conv.forward', 1, 0, 0, 2, [1, 1], ...], 4, None, 0) temp_args = [["tvm.contrib.cudnn.conv.forward", 1, 0, 0, 2, [1, 1], [1, 1], [1, 1], tvm_stack_make_array(X, tvm_stack_make_shape(3...hape(16, 4, 3, 3), 0, 4, 0f, 0), tvm_stack_make_array(y, tvm_stack_make_shape(3, 16, 32, 32), 0, 4, 0f, 0), "float32"]] values = <tvm._ffi._ctypes.function.TVMValue_Array_6 object at 0x3fff6adf16a8> tcodes = <tvm._ffi._ctypes.function.c_int_Array_6 object at 0x3fff6adf1378> def __call__(self, *args): """Call the function with positional arguments args : list The positional arguments to the function call. """ temp_args = [] values, tcodes, num_args = _make_tvm_args(args, temp_args) ret_val = TVMValue() ret_tcode = ctypes.c_int() if _LIB.TVMFuncCall( self.handle, values, tcodes, ctypes.c_int(num_args), ctypes.byref(ret_val), ctypes.byref(ret_tcode)) != 0: > raise get_last_ffi_error() E tvm._ffi.base.TVMError: Traceback (most recent call last): E [bt] (3) /host/root/ligc/tmp/incubator-tvm/build/libtvm.so(TVMFuncCall+0x90) [0x3fff8d50dde0] E [bt] (2) /host/root/ligc/tmp/incubator-tvm/build/libtvm.so(+0x3cc1bc) [0x3fff8caac1bc] E [bt] (1) /host/root/ligc/tmp/incubator-tvm/build/libtvm.so(tvm::Array<tvm::Expr, void> tvm::runtime::TVMArgValue::AsObjectRef<tvm::Array<tvm::Expr, void> >() const+0x2ec) [0x3fff8caba96c] E [bt] (0) /host/root/ligc/tmp/incubator-tvm/build/libtvm.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x60) [0x3fff8ca89960] E File "/host/root/ligc/tmp/incubator-tvm/include/tvm/packed_func_ext.h", line 140 E TVMError: Check failed: ObjectTypeChecker<TObjectRef>: :Check(ptr): Expected type List[Expr] but get Array python/tvm/_ffi/_ctypes/function.py:207: TVMError ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
