aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSalvador E. Tropea <stropea@inti.gob.ar>2023-06-28 14:26:26 -0300
committerGitHub <noreply@github.com>2023-06-28 20:26:26 +0300
commit6432aabb6dc887436e4d57414b63116189c3b13b (patch)
tree9756c19783ccdef1910d7b8c382f762c6a02f0ca
parentb922bc351b69770cec2d35d2aa50fa052b95ca93 (diff)
cuda : fix missing const qualifier in casts (#2027)
-rw-r--r--ggml-cuda.cu8
1 files changed, 4 insertions, 4 deletions
diff --git a/ggml-cuda.cu b/ggml-cuda.cu
index be75cb7..5f05d91 100644
--- a/ggml-cuda.cu
+++ b/ggml-cuda.cu
@@ -1244,7 +1244,7 @@ static __global__ void dequantize_mul_mat_vec(const void * vx, const dfloat * y,
}
static __global__ void mul_mat_p021_f16_f32(const void * vx, const float * y, float * dst, const int ncols_x, const int nrows_x, const int nchannels_x) {
- const half * x = (half *) vx;
+ const half * x = (const half *) vx;
const int row_x = blockDim.y*blockIdx.y + threadIdx.y;
const int channel = blockDim.z*blockIdx.z + threadIdx.z;
@@ -1294,7 +1294,7 @@ static __global__ void mul_mat_vec_nc_f16_f32( // nc == non-contiguous
const void * vx, const float * y, float * dst, const int ncols_x, const int nrows_x,
const int row_stride_x, const int nchannels_x, const int channel_stride_x) {
- const half * x = (half *) vx;
+ const half * x = (const half *) vx;
const int row_x = blockDim.y*blockIdx.y + threadIdx.y;
const int channel = blockDim.z*blockIdx.z + threadIdx.z;
@@ -1337,14 +1337,14 @@ static __global__ void mul_mat_vec_nc_f16_f32( // nc == non-contiguous
}
static __device__ void cpy_1_f32_f32(const char * cxi, char * cdsti) {
- const float * xi = (float *) cxi;
+ const float * xi = (const float *) cxi;
float * dsti = (float *) cdsti;
*dsti = *xi;
}
static __device__ void cpy_1_f32_f16(const char * cxi, char * cdsti) {
- const float * xi = (float *) cxi;
+ const float * xi = (const float *) cxi;
half * dsti = (half *) cdsti;
*dsti = __float2half(*xi);