optima2005 commented on issue #4418: [RUNTIME] Add cudnn conv3d
URL: https://github.com/apache/incubator-tvm/pull/4418#issuecomment-559643997
 
 
   @masahi , Thanks for the comments! I will revise them after I have fixed the 
pass array into C issue.
   I changed to use  tvm.api.convert() solution, but still get below error:
   ```
   self = <tvm._ffi.function.Function object at 0x3fff6d193318>
   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 
0x3fff693b8d90>
   tcodes = <tvm._ffi._ctypes.function.c_int_Array_6 object at 0x3fff693b8f28>
   
       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) 
[0x3fff8bd8de00]
   E             [bt] (2) 
/host/root/ligc/tmp/incubator-tvm/build/libtvm.so(+0x3cc1dc) [0x3fff8b32c1dc]
   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) [0x3fff8b33a98c]
   E             [bt] (0) 
/host/root/ligc/tmp/incubator-tvm/build/libtvm.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x60)
 [0x3fff8b309980]
   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
   ```
   I put the changes 
[here](https://github.com/optima2005/incubator-tvm/commit/983433fe7787a45b2a0994eebe5b3f8f2e1970aa),
 could you please provide advice?

----------------------------------------------------------------
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

Reply via email to