diff --git a/ggml-cuda.cu b/ggml-cuda.cu index 48c7c83df..e31d494b2 100644 --- a/ggml-cuda.cu +++ b/ggml-cuda.cu @@ -2542,7 +2542,7 @@ bool ggml_cuda_is_gpu_offloading(struct ggml_tensor * tensor) { || (tensor->src1 != nullptr && tensor->src1->backend == GGML_BACKEND_GPU); } -bool ggml_cuda_compute_forward(struct ggml_compute_params * params, struct ggml_tensor * tensor){ +bool ggml_cuda_compute_forward(const struct ggml_compute_params * params, struct ggml_tensor * tensor){ ggml_cuda_func_t func; const bool any_on_device = ggml_cuda_is_gpu_offloading(tensor); diff --git a/ggml-cuda.h b/ggml-cuda.h index 70bd65e22..efb5bb38f 100644 --- a/ggml-cuda.h +++ b/ggml-cuda.h @@ -32,7 +32,7 @@ void ggml_cuda_assign_buffers_no_scratch(struct ggml_tensor * tensor); void ggml_cuda_set_main_device(int main_device); void ggml_cuda_set_scratch_size(size_t scratch_size); void ggml_cuda_free_scratch(void); -bool ggml_cuda_compute_forward(struct ggml_compute_params * params, struct ggml_tensor * tensor); +bool ggml_cuda_compute_forward(const struct ggml_compute_params * params, struct ggml_tensor * tensor); #ifdef __cplusplus }