mirror of
https://github.com/Niko1221/Strata.git
synced 2026-11-07 14:21:06 -10:00
SYCL: the #4185 decode controls default on for Battlemage (STRATA_<name>=0 turns each off), STRATA_SYCL_IQ_DECODE_FAST default ON in CMake and passed by the SYCL build scripts; STRATA_SELECT_GEMM_MIN sets the block threshold of the #3248 GEMM block scores
Controls of glorysdj's pull request #4185: unset means on for a Battlemage device and off for every other device (strata::bm_default_on); a set value still decides. Measured results are in phaseA-tests/pr-priorities/RESULTS-INTEL.md.
This commit is contained in:
1 parent
5a41f3b391
commit
8fffe81d4b
10 files changed
+34
-45
No files matched your search
@@ -42,7 +42,7 @@ if [ -n "${LLAMA_CPP:-}" ]; then ggml="-DFETCHCONTENT_SOURCE_DIR_STRATA_LLAMACPP
|
||||
elif [ -d "$repo/third_party/llama.cpp/ggml" ]; then ggml="-DSTRATA_GGML_DIR=$repo/third_party/llama.cpp"; fi
|
||||
# shellcheck disable=SC2086
|
||||
cmake -S sycl -B "$build" -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx \
|
||||
-DSTRATA_SYCL_PARITY=OFF ${aot:+"-DSTRATA_SYCL_AOT=$aot"} $ggml
|
||||
-DSTRATA_SYCL_PARITY=OFF -DSTRATA_SYCL_IQ_DECODE_FAST=${IQ_DECODE_FAST:-ON} ${aot:+"-DSTRATA_SYCL_AOT=$aot"} $ggml
|
||||
cmake --build "$build" --target strata -j "$jobs"
|
||||
|
||||
ver=$(sed -n 's/^[[:space:]]*project([^)]*VERSION[[:space:]]*\([0-9][0-9.]*\).*/\1/p' CMakeLists.txt | head -1)
|
||||
|
||||
+4
-1
@@ -29,7 +29,10 @@ endif()
|
||||
add_compile_definitions(STRATA_VERSION="${PROJECT_VERSION}")
|
||||
|
||||
set(STRATA_SYCL_AOT "" CACHE STRING "AOT device for the GPU code, e.g. bmg-g31 (empty: SPIR-V, JIT at run time)")
|
||||
option(STRATA_SYCL_IQ_DECODE_FAST "Opt in to the packed IQ/Q2 decode helpers" OFF)
|
||||
# PR #4185 (glorysdj): the packed Q2 / IQ4 lookup / IQ3_S sign arithmetic of the mixed-IQ3 decode kernels. Integer arithmetic with the
|
||||
# same results as the code it replaces (bit-exact, checked end to end on 2x Arc Pro B65), faster on Battlemage; ON by default in every
|
||||
# build, including the JIT release package. -DSTRATA_SYCL_IQ_DECODE_FAST=OFF builds the earlier helpers.
|
||||
option(STRATA_SYCL_IQ_DECODE_FAST "Packed IQ/Q2 decode helpers (bit-exact integer arithmetic, faster on Battlemage)" ON)
|
||||
if(STRATA_SYCL_IQ_DECODE_FAST)
|
||||
add_compile_definitions(STRATA_Q2_WORD_FAST=1 STRATA_IQ4NL_LUT_SWAR=1 STRATA_IQ4XS_LUT_SWAR=1
|
||||
STRATA_IQ4_LUT_SWAR=1 STRATA_IQ3S_SIGN_FAST=1 STRATA_IQ3S_SIGN_APPLY_FAST=1)
|
||||
|
||||
@@ -156,6 +156,13 @@ inline IntelGpuGen intel_gpu_gen(const sycl::device& d) {
|
||||
}
|
||||
return IntelGpuGen::Unknown;
|
||||
}
|
||||
// The Battlemage decode controls of PR #4185 (glorysdj): unset = on for a Battlemage device, off for every other device (Arc
|
||||
// A-series included); a set value turns the control on ("1") or off ("0") whatever the device, as before.
|
||||
inline bool bm_default_on(const char* name, const sycl::device& d) {
|
||||
const char* v = std::getenv(name);
|
||||
if (v != nullptr && v[0] != ' | ||||