Skip to content

b12709

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 25 Nov 03:50
5fddd0b

ggml-cpu: add SVE-optimized q5_0 and q5_1 dot-product kernels (#30867)

  • Merged PR 5925: SVE suooprt for ggml_vec_dot_q5_0_q8_0, ggml_vec_dot_q5_1_q8_1

SVE suooprt for ggml_vec_dot_q5_0_q8_0, ggml_vec_dot_q5_1_q8_1

  • perf(arm): optimize q5_0 q8_0 dot products with SVE
  • Load high-bit masks directly from quantized blocks
  • Replace lookup-table expansion with predicated SVE duplication
  • Reduce scalar high-bit unpacking overhead
  • fix(arm): load SVE masks through inline assembly
  • Add a helper to load mask data as svbool_t with ldr
  • Replace direct svbool_t pointer casts in the q5 dot-product path
  • fix(arm): correct q5/q8 SVE bitmask handling
  • Fix qh bit inversion in the SVE q5_0/q8_0 dot-product path
  • Use the proper predicate-aware svnot_b_z mask logic for bit extraction
  • Restore correct quantized compute behavior on ARM SVE targets
  • fix(arm): simplify q5_1/q8_1 bitpack handling
  • replace manual qh extraction with vector bitmask loads in the ARM SVE path
  • remove temporary unpack buffers used during q5_1 dot-product assembly
  • preserve the qh bit pattern while keeping the quantized dot-product logic intact
  • fix(ggml-cpu): support SVE load on non-GNU compilers
  • Add the existing GNU/Clang inline assembly path for SVE bool loading
  • Provide a portable fallback for other compilers using SVE intrinsics
  • Preserve current behavior on supported toolchains while improving compatibility
  • fix(cpu): cast SVE input pointer before byte load
  • fix SVE byte load by casting the uint32_t pointer to uint8_t*
  • preserve correct mask generation in load_as_svbool on Arm SVE
  • prevent undefined pointer aliasing in the SIMD vector path
  • fix(arm): restrict q5 SVE kernels to supported vector lengths
  • Limit q5 dot-product paths to 256-bit and 512-bit SVE vectors
  • Assert when encountering unsupported vector lengths
  • Localize the SVE predicate loader to the ARM quantization kernels
  • perf(arm): optimize SVE q5 dot products for VL128
  • Add an intrinsic predicate loader for SVE VL128 qh halves
  • Replace table-based qh expansion in q5_0 and q5_1 paths
  • Remove temporary qh expansion buffers
  • Preserve direct predicate loads for wider SVE vector lengths
  • fix(arm): correct SVE q5 predicate loading
  • Unify predicate loading for q5 quantization paths
  • Prevent out-of-bounds reads from 8-bit high-bit storage
  • Remove unsupported VL512 q5 dot-product cases
  • fix(arm): support SVE VL512 q5 dot products
  • Bound qh predicate loads for SVE vectors at or above 512 bits
  • Use the shared SVE vector-length helper
  • Extend q5_0 and q5_1 dot products to VL512
  • docs(arm): clarify SVE predicate loader limit
  • Document that values beyond the first 32 bits of qh are undefined
  • Warn that the loader may cause a SEGV for vector lengths above 1024
  • perf(arm): reuse SVE vector length in quantized dot products
  • Pass the cached vector length to SVE predicate loading
  • Remove repeated SVE vector length queries
  • Allow unsupported vector lengths to exit without assertions
  • docs(arm): remove outdated SVE loader warning
  • Remove obsolete VL > 1024 SEGV warning from load_as_svbool
  • fix compilation errors

Co-authored-by: Kato, Masaya 加藤 雅也 kato.masaya@fujitsu.com
Co-authored-by: Masaru Ito masaru.ito.mi@jp.fujitsu.com

Website:

Attestations:

macOS/iOS:

Linux:

Android:

Windows:

openEuler:

  • DISABLED
  • openEuler x86 (310p)
  • openEuler x86 (910b, ACL Graph)
  • openEuler aarch64 (310p)
  • openEuler aarch64 (910b, ACL Graph)

UI: