MegEngine / MegPeak

Apache License 2.0
247 stars 38 forks source link

make err #1

Closed 47oo closed 2 years ago

47oo commented 2 years ago

Which src code I need change

mkdir build && cd build
cmake ..
make
Consolidate compiler generated dependencies of target megpeak
[ 10%] Building CXX object CMakeFiles/megpeak.dir/src/cpu/x86_avx.cpp.o
/sh2/home/hanhao/MegPeak-main/src/cpu/x86_avx.cpp:25:34: error: attribute(target("avx512bw")) is unknown
     static int func##_throughput() {                               \
                                  ^
/sh2/home/hanhao/MegPeak-main/src/cpu/x86_avx.cpp:118:1: note: in expansion of macro ‘THROUGHPUT’
 THROUGHPUT(cb, vpmaddwd_512, "avx512bw")
 ^
/sh2/home/hanhao/MegPeak-main/src/cpu/x86_avx.cpp:42:31: error: attribute(target("avx512bw")) is unknown
     static int func##_latency() {        \
                               ^
/sh2/home/hanhao/MegPeak-main/src/cpu/x86_avx.cpp:121:1: note: in expansion of macro ‘LATENCY’
 LATENCY(cb, vpmaddwd_512, "avx512bw")
 ^
/sh2/home/hanhao/MegPeak-main/src/cpu/x86_avx.cpp:25:34: error: attribute(target("avx512bw")) is unknown
     static int func##_throughput() {                               \
                                  ^
/sh2/home/hanhao/MegPeak-main/src/cpu/x86_avx.cpp:125:1: note: in expansion of macro ‘THROUGHPUT’
 THROUGHPUT(cb, vpaddd_512, "avx512bw")
chenqy4933 commented 2 years ago

Maybe your compiler version is too low, it don't support target “avx52bw”, temporary solution,you can update the compiler or comment these code.

47oo commented 2 years ago

Maybe your compiler version is too low, it don't support target “avx52bw”, temporary solution,you can update the compiler or comment these code.

MayBe Can I used intel icc ?

chenqy4933 commented 2 years ago

I do not have tried to use icc, but i have tried gcc5, it was ok.