You are viewing a plain text version of this content. The canonical link for it is here.
Posted to discuss-archive@tvm.apache.org by KireinaHoro via TVM Discuss <no...@discuss.tvm.ai> on 2020/05/17 03:59:58 UTC

[TVM Discuss] [Questions] C target for Relay?


I'm wondering if it's possible to use C backend for Relay frontend.  I'm trying to compile Relay models to MicroTVM targets by using `target="c"` in `tutorials/tune_relay_x86.py`, and I'm running into this obscure trace during tuning:

```
Traceback (most recent call last):
  [bt] (8) /home/jsteward/work/tvm/build/libtvm.so(tvm::NodeFunctor<void (tvm::runtime::ObjectRef const&, tvm::ir::StmtFunctor<void (tvm::Stmt const&)>*)>::operator()(tvm::runtime::ObjectRef const&, tvm::ir::StmtFunctor<void (tvm::Stmt const&)>*) const+0x52) [0x7f1e1fab0802]
  [bt] (7) /home/jsteward/work/tvm/build/libtvm.so(tvm::codegen::CodeGenC::VisitStmt_(tvm::ir::Block const*)+0x1c) [0x7f1e1faa277c]
  [bt] (6) /home/jsteward/work/tvm/build/libtvm.so(tvm::NodeFunctor<void (tvm::runtime::ObjectRef const&, tvm::ir::StmtFunctor<void (tvm::Stmt const&)>*)>::operator()(tvm::runtime::ObjectRef const&, tvm::ir::StmtFunctor<void (tvm::Stmt const&)>*) const+0x52) [0x7f1e1fab0802]
  [bt] (5) /home/jsteward/work/tvm/build/libtvm.so(tvm::codegen::CodeGenC::VisitStmt_(tvm::ir::Store const*)+0x317) [0x7f1e1faab217]
  [bt] (4) /home/jsteward/work/tvm/build/libtvm.so(tvm::codegen::CodeGenC::PrintExpr[abi:cxx11](tvm::Expr const&)+0x19b) [0x7f1e1fab709b]
  [bt] (3) /home/jsteward/work/tvm/build/libtvm.so(tvm::codegen::CodeGenC::PrintExpr(tvm::Expr const&, std::ostream&)+0x99) [0x7f1e1faa5039]
  [bt] (2) /home/jsteward/work/tvm/build/libtvm.so(tvm::codegen::CodeGenCHost::VisitExpr_(tvm::ir::Broadcast const*, std::ostream&)+0x56) [0x7f1e1faba9d6]
  [bt] (1) /home/jsteward/work/tvm/build/libtvm.so(tvm::codegen::CodeGenCHost::PrintType(tvm::DataType, std::ostream&)+0x14a) [0x7f1e1faba57a]
  [bt] (0) /home/jsteward/work/tvm/build/libtvm.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x43) [0x7f1e1f95b4a3]
  File "../src/codegen/codegen_c_host.cc", line 143
TVMError: Cannot convert type float32x64 to C type
```

I've looked around and thought that `float32x64` might be SIMD-related, but I don't have any clues on how to disable SIMD in this case.  Any help would be appreciated.





---
[Visit Topic](https://discuss.tvm.ai/t/c-target-for-relay/6696/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/bb53d86f00bf7cc7ee65a90616c61e4b232084616f4d3c1541f37a35cee27870).

[TVM Discuss] [Questions] C target for Relay?

Posted by Huang Guangtai via TVM Discuss <no...@discuss.tvm.ai>.

```python
with tvm.target.build_config(disable_vectorize=True):
    graph, c_mod, params = relay.build(func, target="c", params=params)
```
Hi, how about try to disable vectorize?





---
[Visit Topic](https://discuss.tvm.ai/t/c-target-for-relay/6696/3) 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/9367ee597bc03704ea3554610152e8835139de295488cd1934912636684f05c8).

[TVM Discuss] [Questions] C target for Relay?

Posted by KireinaHoro via TVM Discuss <no...@discuss.tvm.ai>.

Current MicroTVM implementation seems to limit to C backends for the devices.  In this case, I wonder if we're relying on LLVM's ability to flatten out SIMD types (such as the `<64 x f32>` type corresponding to the `float32x64`) to scalar types when SIMD is not enabled.  Shall this be fixed from Relay, or shall we bring LLVM support to MicroTVM?

Cc @weberlo @tqchen





---
[Visit Topic](https://discuss.tvm.ai/t/c-target-for-relay/6696/2) 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/0520acd04d2ebafe9ed73f0773851bed5e4ab9eebcdf12989d1a0bb74c36e5b5).