CUDA: fastdiv, launch bounds for mmvq + q8_1 quant (#15802)

* CUDA: fastdiv, launch bounds for mmvq + q8_1 quant
This commit is contained in:
Johannes Gäßler
2025-09-05 16:07:02 +02:00
committed by GitHub
parent 3a550b5ca4
commit 5143fa895e
3 changed files with 67 additions and 77 deletions

View File

@@ -570,6 +570,8 @@ static __device__ __forceinline__ float ggml_cuda_e8m0_to_fp32(uint8_t x) {
//
// n/d = (mulhi(n, mp) + n) >> L;
static const uint3 init_fastdiv_values(uint32_t d) {
GGML_ASSERT(d != 0);
// compute L = ceil(log2(d));
uint32_t L = 0;
while (L < 32 && (uint32_t{ 1 } << L) < d) {