NVFP4 port: the SYCL build compiles the NVFP4 CPU rows (native_expert.cpp calls them); mmq_nvfp4_parity gets -mf16c on GCC/Clang
The fork was built with MSVC only: on Linux its parity tool's F16C rounding helper failed to inline without the target flag, and the SYCL tree's own list of CPU expert sources lacked nvfp4_avx512.cpp / nvfp4_avx2.cpp.
This commit is contained in:
1 parent
55e2072c99
commit
8e2c57be78
2 files changed
+8
-3
No files matched your search
@@ -1437,6 +1437,9 @@ if(STRATA_NATIVE_EXPERTS)
|
||||
# the NVFP4 expert products (w4a8 / w4a4, STRATA_PREFILL_NVFP4) against a double-precision reference
|
||||
add_executable(mmq_nvfp4_parity src/prefill/mmq_nvfp4_parity.cpp)
|
||||
target_link_libraries(mmq_nvfp4_parity PRIVATE strata_mmq ggml-base CUDA::cudart)
|
||||
if(NOT MSVC) # its FP16 rounding helper uses the F16C intrinsics (GCC/Clang need the target flag)
|
||||
target_compile_options(mmq_nvfp4_parity PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-mf16c>)
|
||||
endif()
|
||||
elseif(STRATA_PREFILL_MMQ)
|
||||
# Compile only the pinned GGML MMQ and activation-quantizer sources used by prefill. This uses
|
||||
# common.cuh's native HIP path without enabling a second GGML HIP backend.
|
||||
|
||||
+5
-3
@@ -176,11 +176,13 @@ if(STRATA_NATIVE_EXPERTS)
|
||||
endif()
|
||||
strata_resolve(_cpu_native src/kernels/cpu/native_expert.cpp src/kernels/cpu/iq_avx512.cpp src/kernels/cpu/iq_avx2.cpp
|
||||
src/kernels/cpu/kq_avx2.cpp src/kernels/cpu/kq_avx1.cpp # 0.1.31: the Q4_K/Q5_K/Q5_1/Q8_0 expert rows
|
||||
src/kernels/cpu/q2_avx1.cpp src/kernels/cpu/iq_avx1.cpp) # 0.1.42: AVX1 (no AVX2) Q2_0 / i-quant rows
|
||||
src/kernels/cpu/q2_avx1.cpp src/kernels/cpu/iq_avx1.cpp # 0.1.42: AVX1 (no AVX2) Q2_0 / i-quant rows
|
||||
src/kernels/cpu/nvfp4_avx512.cpp src/kernels/cpu/nvfp4_avx2.cpp) # NVFP4 expert rows (native_expert.cpp calls them)
|
||||
target_sources(strata_kernels_cpu PRIVATE ${_cpu_native})
|
||||
target_include_directories(strata_kernels_cpu PRIVATE ${STRATA_ROOT}/third_party/ggml)
|
||||
set_source_files_properties(${STRATA_ROOT}/src/kernels/cpu/iq_avx512.cpp PROPERTIES COMPILE_OPTIONS
|
||||
"-mavx512f;-mavx512bw;-mavx512vl;-mavx512dq;-mavx512vnni;-mavx512vbmi;-mf16c;-mfma")
|
||||
set_source_files_properties(${STRATA_ROOT}/src/kernels/cpu/iq_avx512.cpp ${STRATA_ROOT}/src/kernels/cpu/nvfp4_avx512.cpp
|
||||
PROPERTIES COMPILE_OPTIONS "-mavx512f;-mavx512bw;-mavx512vl;-mavx512dq;-mavx512vnni;-mavx512vbmi;-mf16c;-mfma")
|
||||
set_source_files_properties(${STRATA_ROOT}/src/kernels/cpu/nvfp4_avx2.cpp PROPERTIES COMPILE_OPTIONS "-mavx2;-mfma;-mf16c")
|
||||
set_source_files_properties(${STRATA_ROOT}/src/kernels/cpu/iq_avx2.cpp PROPERTIES COMPILE_OPTIONS "-mavx2;-mfma;-mf16c")
|
||||
set_source_files_properties(${STRATA_ROOT}/src/kernels/cpu/kq_avx2.cpp PROPERTIES COMPILE_OPTIONS "-mavx2;-mfma;-mf16c")
|
||||
set_source_files_properties(${STRATA_ROOT}/src/kernels/cpu/kq_avx1.cpp PROPERTIES COMPILE_OPTIONS "-mavx")
|
||||
|
||||
Reference in new issue
Block a user