masahi commented on issue #9939:
URL: https://github.com/apache/tvm/issues/9939#issuecomment-1013754272


   The error is ` Check failed: (pval != nullptr) is false: Cannot allocate 
memory symbolic tensor shape [?, 1280, 9, 16]`. When you do `relay.build`, we 
use something called graph codegen / runtime, where all shapes need to be 
statically known. The `?` indicates your model has a dynamic batch dimension 
somewhere, so you need to use a compiler and runtime that supports dynamic 
shape. That's what the VM compiler and runtime for.
   
   
   
   > @masahi does VM compiler support metal?
   
   Yes, there is no coupling between targets and the VM runtime, all targets 
work.
   
   > I actually need to consume the model in c++, so I'm assuming all of the 
above is possible with c++ API as well
   
   In principle yes. Deployment in C++ is common, but less so for VM. There is 
an example in 
https://github.com/apache/tvm/blob/e7024fb39ea27494fa5618102dae42e7e5551986/src/contrib/torch/pt_call_tvm/tvm_class.cc#L143.
 On the other hand, I've never seen someone doing VM compilation in C++ 
(equivalent of doing `vm.compile(...)`). By `consume` I hope you meant the 
former use case.


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to