cuda : refactor into multiple files (#6269)

This commit is contained in:
slaren 2024-03-25 13:50:23 +01:00 committed by GitHub
parent ad3a0505e3
commit ae1f211ce2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
59 changed files with 9154 additions and 8987 deletions

13
ggml-cuda/convert.cuh Normal file
View file

@ -0,0 +1,13 @@
#include "common.cuh"
#define CUDA_DEQUANTIZE_BLOCK_SIZE 256
template<typename T>
using to_t_cuda_t = void (*)(const void * __restrict__ x, T * __restrict__ y, int k, cudaStream_t stream);
typedef to_t_cuda_t<float> to_fp32_cuda_t;
typedef to_t_cuda_t<half> to_fp16_cuda_t;
to_fp16_cuda_t ggml_get_to_fp16_cuda(ggml_type type);
to_fp32_cuda_t ggml_get_to_fp32_cuda(ggml_type type);