[CODEGEN] Vector-Codegen support for llvm-pure-intrin#16985
[CODEGEN] Vector-Codegen support for llvm-pure-intrin#16985cbalint13 merged 3 commits intoapache:mainfrom
Conversation
deefe06 to
d3be9ab
Compare
|
@tvm-bot rerun |
|
cc: @tqchen @Lunderberg |
|
cc: @cbalint13 @ekalda |
| .set_attr<TScriptDtypePrintLocation>("TScriptDtypePrintLocation", | ||
| Integer(ScriptDtypePrintLocation::kFirst)); | ||
| Integer(ScriptDtypePrintLocation::kFirst)) | ||
| .set_attr<TVectorizable>("TVectorizable", true); |
There was a problem hiding this comment.
Can add a small testcase for the IR printer ?
tests/python/unittest/test_tvmscript_printer_tir.py
|
@rutkoor |
…or_codegen_llvm_pure_intrin
Hi @cbalint13, thank you for your quick reply. And apologize for not replying back sooner. I have added a testcase inside test_tvmscript_printer_tir.py and also explained what I am doing in the description of this PR. Please let me know if you want me to add more details. Thanks. |
Thank you very much @rutkoor !
|
|
@tvm-bot rerun |
If we have a loop with llvm intrinsic call like below,
Before,
using sch.vectorize, we cannot generate ramp node for the above code.
In this pull request, I enabled vectorization support for the
llvm_pure_intrinbuiltin. During the vectorize pass, I explicitly vectorized the compute expressions that serve as input to the intrinsic. As a result of these changes, I was able to generate the ramp instructions for the expressions inside thecall_llvm_pure_intrinfunction.After,
Note: If the intrinsic doesn't support vector arguments as input, then the error will be thrown during llvm codegen.