diff options
author | Johannes Gäßler <johannesg@5d6.de> | 2024-06-09 09:42:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-09 09:42:25 +0200 |
commit | 42b53d192f4e3abf1b7c8e424628424504ea5dc5 (patch) | |
tree | 688fa591663d028dadffc04ff2ee0a22a14b0e59 /ggml-cuda/quantize.cuh | |
parent | 2decf57bc6e4a6b45176c3727d964a01161beecc (diff) |
CUDA: revise q8_1 data layout for mul_mat_q (#7824)
Diffstat (limited to 'ggml-cuda/quantize.cuh')
-rw-r--r-- | ggml-cuda/quantize.cuh | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/ggml-cuda/quantize.cuh b/ggml-cuda/quantize.cuh index b37a4752..486c9360 100644 --- a/ggml-cuda/quantize.cuh +++ b/ggml-cuda/quantize.cuh @@ -1,5 +1,20 @@ +#pragma once + #include "common.cuh" +#include "mmq.cuh" + +#include <cstdint> #define CUDA_QUANTIZE_BLOCK_SIZE 256 -void quantize_row_q8_1_cuda(const float * x, void * vy, const int64_t kx, const int64_t ky, const int64_t kx_padded, cudaStream_t stream); +typedef void (*quantize_cuda_t)( + const float * x, void * vy, const int64_t kx0, const int64_t kx1, const int64_t channels, const int64_t kx0_padded, + const ggml_type type_x, cudaStream_t stream); + +void quantize_row_q8_1_cuda( + const float * x, void * vy, const int64_t kx0, const int64_t kx1, const int64_t channels, const int64_t kx0_padded, + const ggml_type type_x, cudaStream_t stream); + +void quantize_mmq_q8_1_cuda( + const float * x, void * vy, const int64_t kx0, const int64_t kx1, const int64_t channels, const int64_t kx0_padded, + const ggml_type type_x, cudaStream_t stream); |