File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -3960,7 +3960,10 @@ template <ggml_type type, int mmq_x>
39603960static void launch_mul_mat_q_id (ggml_backend_cuda_context & ctx, const mmq_args_id & args, cudaStream_t stream) {
39613961 const int id = ggml_cuda_get_device ();
39623962 const int cc = ggml_cuda_info ().devices [id].cc ;
3963- const int nsm = ggml_cuda_info ().devices [id].nsm ;
3963+ const int nsm_max = ggml_cuda_info ().devices [id].nsm ;
3964+ int nsm = 1 ;
3965+ // while (nsm*2 <= nsm_max) nsm *= 2;
3966+ while (nsm < nsm_max) nsm *= 2 ;
39643967 const int warp_size = ggml_cuda_get_physical_warp_size_host (); // ggml_cuda_info().devices[id].warp_size;
39653968 const int nwarps = mmq_get_nwarps_host (cc, warp_size);
39663969 const int mmq_y = get_mmq_y_host (cc);
You can’t perform that action at this time.
0 commit comments