File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -7824,21 +7824,23 @@ static void ggml_compute_forward_mul_mat_id(
78247824        const  int64_t  nr0  =  ne01 ;
78257825        const  int64_t  nr1  =  cne1 ;
78267826
7827- 
7828- #if  defined(__aarch64__ )
7829-         // disable for ARM 
7830-         int  chunk_size  =  (nr0  +  nr1 ) / nth ;
7831- #else 
78327827        int  chunk_size  =  16 ;
78337828        if  (nr0  ==  1  ||  nr1  ==  1 ) {
78347829            chunk_size  =  64 ;
78357830        }
7831+ 
7832+ #if  defined(__aarch64__ )
7833+         // disable for ARM 
7834+         const  bool  disable_chunking  =  true;
7835+ #else 
7836+         // disable for NUMA 
7837+         const  bool  disable_chunking  =  ggml_is_numa ();
78367838#endif  // defined(__aarch64__) 
78377839
78387840        int64_t  nchunk0  =  (nr0  +  chunk_size  -  1 ) / chunk_size ;
78397841        int64_t  nchunk1  =  (nr1  +  chunk_size  -  1 ) / chunk_size ;
78407842
7841-         if  (nchunk0  *  nchunk1  <  nth  *  4  ||  ggml_is_numa () ) {
7843+         if  (nchunk0  *  nchunk1  <  nth  *  4  ||  disable_chunking ) {
78427844            nchunk0  =  nr0  >  nr1  ? nth  : 1 ;
78437845            nchunk1  =  nr0  >  nr1  ? 1  : nth ;
78447846        }
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments