Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benchmarks/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if cpp.has_argument('-march=icelake-client')
)
endif

if cpp.has_argument('-march=sapphirerapids')
if cancompilefp16
libbench += static_library('bench_qsortfp16',
files('bench_qsortfp16.cpp', ),
dependencies: gbench_dep,
Expand Down
18 changes: 18 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ utils = include_directories('utils')
tests = include_directories('tests')
gtest_dep = dependency('gtest_main', required : true)
gbench_dep = dependency('benchmark', required : true)

fp16code = '''#include<immintrin.h>
int main() {
__mm512h temp = _mm512_set1_ph(1.0f);
__mm512h var2 = _mm512_min_ph(temp, temp);
return 0;
}
'''
cancompilefp16 = cpp.compiles(fp16code, args:'-march=sapphirerapids')

subdir('utils')
subdir('tests')
subdir('benchmarks')
Expand All @@ -23,3 +33,11 @@ benchexe = executable('benchexe', 'benchmarks/main.cpp',
dependencies : [gbench_dep],
link_whole : [libbench, libcpuinfo],
)

summary({
'Can compile AVX-512 FP16 ISA': cancompilefp16,
},
section: 'Configuration',
bool_yn: true
)

2 changes: 1 addition & 1 deletion tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if cpp.has_argument('-march=icelake-client')
)
endif

if cpp.has_argument('-march=sapphirerapids')
if cancompilefp16
libtests += static_library('tests_qsortfp16',
files('test_qsortfp16.cpp', ),
dependencies: gtest_dep,
Expand Down