Skip to content

Commit

Permalink
w
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui committed Jan 7, 2025
1 parent dced30c commit 2eafff9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ else()
check_cxx_source_compiles("#include <immintrin.h>\n__m256 test(__m256 s, __m256 a, __m256 b) { return _mm256_fmadd_ps(a, b, s); }" NCNN_COMPILER_SUPPORT_X86_FMA)

set(CMAKE_REQUIRED_FLAGS "/arch:AVX")
check_cxx_source_compiles("#include <ammintrin.h>\n__m128i test(__m128i s, __m128i a, __m128i b) { return _mm_maddd_epi16(a, b, s); }" NCNN_COMPILER_SUPPORT_X86_XOP)
check_cxx_source_compiles("#include <immintrin.h>\n#include <ammintrin.h>\n__m128i test(__m128i s, __m128i a, __m128i b) { return _mm_maddd_epi16(a, b, s); }" NCNN_COMPILER_SUPPORT_X86_XOP)

set(CMAKE_REQUIRED_FLAGS "/arch:AVX")
check_cxx_source_compiles("#include <immintrin.h>\n__m256 test(__m128i a) { return _mm256_cvtph_ps(a); }" NCNN_COMPILER_SUPPORT_X86_F16C)
Expand Down Expand Up @@ -721,6 +721,9 @@ else()
endif()
endif()

unset(CMAKE_TRY_COMPILE_CONFIGURATION)
unset(CMAKE_TRY_COMPILE_TARGET_TYPE)

if(NCNN_TARGET_ILP32)
message(STATUS "Target arch: ${NCNN_TARGET_ARCH} 64bit ilp32")
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
Expand Down

0 comments on commit 2eafff9

Please sign in to comment.