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

Reply via email to