TVM relay does not use avx for model compilation


I tried to compile and run resnet50_v2 model with relay with avx512 on i7 cpu which only supports avx2.

frontend = 'relay'
model_name = 'resnet50_v2'
target = 'llvm -mcpu=skylake-avx512'

If I tried March 31st TVM version (commit eb1ed1164ec0a56649d9a5fadcd1f7fdde8e6aa3) then fails as expected with Illegal instruction (core dumped)

But if I try April 17th version (12257ddd2d2ee3a9bd58b7f92c4a66d9cca4fa45) then it works.
Performance is similar to llvm without any flags

I guess the latest TVM relay does not use avx2 or avx512 for model compilation at all.

I also tried the same test with nnvm frontend - fails for both April 17th and March 31st tvm versions. So, the issue with avx exists only in relay but not in nnvm.

[Solved][Relay]X86 target performance regression

similar issue reported at X86 target performance regression


@eqy @merrymercy @kevinthesun @tqchen Do you suspect any commit(s) btw Mar 31 - Apr 16 in this relay/avx issue? Or we need to to binary search…