You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tvm.apache.org by Giuseppe Rossini via Apache TVM Discuss <no...@discuss.tvm.ai> on 2020/11/06 12:13:50 UTC

[Apache TVM Discuss] [Development] Role of the LLVM autovectorizer in TVM


Hi all, 

I am trying to understand the role of the LLVM auto-vectorizer in TVM. Indeed, in `llvm_codegen.cc` we explicitly set:
```
  builder.LoopVectorize = true;
  builder.SLPVectorize = true;
```

And I am trying to determine to what level TVM is relying on LLVM auto-vectorization. 

### What is my understanding
As far as I understood, TVM implements its own vectorizer in `vectorize_loop.cc` (which is  a TIR pass). So if a loop is vectorized in TVM, the LLVM autovectorization won't be used. 

If instead a loop is not vectorized in TVM, the LLVM autovectorizer will kick in and try to vectorize the loop. 

Is my understanding correct? Does this mean that, for most operators like `conv2d` or `gemm` the LLVM autovectorizer would be mostly ineffective?

cc @ramana-arm, @matt-arm, @manupa-arm





---
[Visit Topic](https://discuss.tvm.apache.org/t/role-of-the-llvm-autovectorizer-in-tvm/8388/1) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/56c24bca2b227aab4197fc5a884e71087ab9dafb5cc231c9b3ac37bf54201b32).

[Apache TVM Discuss] [Development] Role of the LLVM autovectorizer in TVM

Posted by Animesh Jain via Apache TVM Discuss <no...@discuss.tvm.ai>.

@kevinthesun Pinging in case you have wondered about this before





---
[Visit Topic](https://discuss.tvm.apache.org/t/role-of-the-llvm-autovectorizer-in-tvm/8388/2) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/8df237fbf604cd77b1540f26957a43fc6b7378ffd2137a15bb08d1d29731a4b7).

[Apache TVM Discuss] [Development] Role of the LLVM autovectorizer in TVM

Posted by Yao Wang via Apache TVM Discuss <no...@discuss.tvm.ai>.

Yeah. In most cases we can do vectorize in TIR instead of relying on llvm.





---
[Visit Topic](https://discuss.tvm.apache.org/t/role-of-the-llvm-autovectorizer-in-tvm/8388/3) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/c3ed85a45230fc0492438092e556ab4e2cb6733b65ac9a008d9880fc1cb61380).