You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tvm.apache.org by Himanshi Kathuria via TVM Discuss <no...@discuss.tvm.ai> on 2019/04/09 04:32:48 UTC

[TVM Discuss] [Development] [Opencl][ONNX] Failing to Compile the ONNX model at optimisation level greater than 0 on opencl


I am trying to compile and ONNX model with target opencl ON nnvm.

It runs fine at opt_level = 0. But at opt_level =1, 2, 3 it gives the error as below.

File “sface_nchw_trail1.py”, line 64, in
graph, lib, params = nnvm.compiler.build(sym, target, shape_dict, dtype_dict, params=params)
File “/home/ubuntu/tvm_opencl/tvm/nnvm/python/nnvm/compiler/build_module.py”, line 306, in build
graph = graph.apply(“GraphCompile”)
File “/home/ubuntu/tvm_opencl/tvm/nnvm/python/nnvm/graph.py”, line 234, in apply
check_call(_LIB.NNGraphApplyPasses(self.handle, npass, cpass, ctypes.byref(ghandle)))
File “/home/ubuntu/tvm_opencl/tvm/nnvm/python/nnvm/_base.py”, line 75, in check_call
raise NNVMError(py_str(_LIB.NNGetLastError()))
nnvm._base.NNVMError: TVMCall CFunc Error:
Traceback (most recent call last):
File “/home/ubuntu/tvm_opencl/tvm/python/tvm/_ffi/_ctypes/function.py”, line 55, in cfun
rv = local_pyfunc(*pyargs)
File “/home/ubuntu/tvm_opencl/tvm/nnvm/python/nnvm/compiler/build_module.py”, line 124, in _build
return tvm.build(funcs, target=target, target_host=target_host)
File “/home/ubuntu/tvm_opencl/tvm/python/tvm/build_module.py”, line 586, in build
fhost, mdev = _build_for_device(flist, tar, target_host)
File “/home/ubuntu/tvm_opencl/tvm/python/tvm/build_module.py”, line 415, in _build_for_device
“Did you forget to bind?” % func.name)
ValueError: Direct host side access to device memory is detected in fuse_matmul_relu. Did you forget to bind?

Seems like I need to create a GPU schedule for matmul.

Could you guide me for the same or any other workaround.





---
[Visit Topic](https://discuss.tvm.ai/t/opencl-onnx-failing-to-compile-the-onnx-model-at-optimisation-level-greater-than-0-on-opencl/2145/1) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.ai/email/unsubscribe/05d7aaaa9083afafef2951706ef89a9dc9bea30975cc7725c561262b781a3e3b).

Tianqi Chen, UW, Seattle, WA, 98105, United States
http://tracking.discuss.tvm.ai/tracking/unsubscribe?msgid=oPh2id-BGRSr9XnON7WKSA2