Illegal instruction(core dump)

Hi, i built TVM from master(0.7.1) and mxnet 1.6.0 mkl.It seemed i did not encounter any problem in this process. after the building, i got three .so files under tvm/lib: libtvm_runtime.so, libtvm.so,libtopi.so. However, when i was using this script to do the bert optimization https://gist.github.com/icemelon9/860d3d2c9566d6f69fa8112840dd95c1

i got this error: MXNet latency for batch 1 and seq length 128: 81.21 ms Cannot find config for target=llvm -keys=cpu -libs=cblas -mcpu=skylake-avx512, workload=(‘dense_cblas.x86’, (‘TENSOR’, (1, 768), ‘float32’), (‘TENSOR’, (2, 768), ‘float32’), None, ‘float32’). A fallback configuration is used, which may bring great performance regression. [08:57:43] /opt/cephfs1/asr/users/qizhou.huang/qizhou/PycharmProjects/incubator-tvm/src/tir/transforms/arg_binder.cc:95: Trying to bind buffer to another one with lower alignment requirement required_alignment=128, provided_alignment=8 Cannot find config for target=llvm -keys=cpu -libs=cblas -mcpu=skylake-avx512, workload=(‘dense_cblas.x86’, (‘TENSOR’, (1, 768), ‘float32’), (‘TENSOR’, (768, 768), ‘float32’), None, ‘float32’). A fallback configuration is used, which may bring great performance regression. Cannot find config for target=llvm -keys=cpu -libs=cblas -mcpu=skylake-avx512, workload=(‘dense_cblas.x86’, (‘TENSOR’, (128, 3072), ‘float32’), (‘TENSOR’, (768, 3072), ‘float32’), None, ‘float32’). A fallback configuration is used, which may bring great performance regression. Cannot find config for target=llvm -keys=cpu -libs=cblas -mcpu=skylake-avx512, workload=(‘dense_cblas.x86’, (‘TENSOR’, (128, 768), ‘float32’), (‘TENSOR’, (3072, 768), ‘float32’), None, ‘float32’). A fallback configuration is used, which may bring great performance regression. Cannot find config for target=llvm -keys=cpu -libs=cblas -mcpu=skylake-avx512, workload=(‘dense_cblas.x86’, (‘TENSOR’, (128, 768), ‘float32’), (‘TENSOR’, (768, 768), ‘float32’), None, ‘float32’). A fallback configuration is used, which may bring great performance regression. Cannot find config for target=llvm -keys=cpu -libs=cblas -mcpu=skylake-avx512, workload=(‘batch_matmul_cblas.x86’, (‘TENSOR’, (12, 128, 128), ‘float32’), (‘TENSOR’, (12, 64, 128), ‘float32’)). A fallback configuration is used, which may bring great performance regression. Cannot find config for target=llvm -keys=cpu -libs=cblas -mcpu=skylake-avx512, workload=(‘batch_matmul_cblas.x86’, (‘TENSOR’, (12, 128, 64), ‘float32’), (‘TENSOR’, (12, 128, 64), ‘float32’)). A fallback configuration is used, which may bring great performance regression. Cannot find config for target=llvm -keys=cpu -libs=cblas -mcpu=skylake-avx512, workload=(‘dense_cblas.x86’, (‘TENSOR’, (128, 768), ‘float32’), (‘TENSOR’, (2304, 768), ‘float32’), None, ‘float32’). A fallback configuration is used, which may bring great performance regression. illegal instruction(core dump). Could you please help me out, thank you

Please check if you are using correct Intel machine

The target in the script is

target = "llvm -mcpu=skylake-avx512 -libs=cblas"

So, if you using a machine older than Skylake, the generated assembly code might not work.

Thanks for your quick replay. i used cat /proc/cpuinfo to check my machine: it’s like this bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass bogomips : 4195.20 clflush size : 64 cache_alignment : 64 address sizes : 46 bits physical, 48 bits virtual power management:

processor : 63 vendor_id : GenuineIntel cpu family : 6 model : 79 model name : Intel® Xeon® CPU E5-2683 v4 @ 2.10GHz stepping : 1 microcode : 0xb000021 cpu MHz : 1198.787 cache size : 40960 KB physical id : 1 siblings : 32 core id : 15 cpu cores : 16 apicid : 63 initial apicid : 63 fpu : yes fpu_exception : yes cpuid level : 20 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 api

i am not pretty sure if it’s newer than skylake. And can i ask how can i test this code if my machine is older, how to .change the target, i just want to test the tvm performance on my own machine, but i am new here,so thanks for your help

Google - Intel® Xeon® CPU E5-2683 v4

Your machine is Broadwell, this is pre-Skylake.

You might not be able to get the best performance, but the following flag should work

target = "llvm -mcpu=core-avx2 -libs=cblas"

OMG!!! problem solvedddddddddddddddddd!!!

thank you like so much like omg

this problem stuck me like 3 weeks,omg u saved me, thank you again, really appreciate

1 Like