File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -118,9 +118,14 @@ rust: ## Ensure Rust is installed and build the Rust library with CUDA support (
118118			exit  1;  \ 
119119		fi ;  \ 
120120	else  \ 
121- 		echo  " Building Rust library with CUDA support..."   &&  \ 
122- 		echo  " 💡 Tip: For 20-30% speedup on RTX 3090+/A100/H100, use: make rust ENABLE_FLASH_ATTN=1"   &&  \ 
123- 		cd  candle-binding &&  cargo build --release;  \ 
121+ 		if  command  -v nvcc > /dev/null 2>&1 ;  then  \
122+ 			echo  " Building Rust library with CUDA support..."   &&  \ 
123+ 			echo  " 💡 Tip: For 20-30% speedup on RTX 3090+/A100/H100, use: make rust ENABLE_FLASH_ATTN=1"   &&  \ 
124+ 			cd  candle-binding &&  cargo build --release;  \ 
125+ 		else  \ 
126+ 			echo  " Building Rust library for CPU (nvcc not found)..."   &&  \ 
127+ 			cd  candle-binding &&  cargo build --release --no-default-features;  \ 
128+ 		fi ;  \ 
124129	fi' 
125130
126131#  Build the Rust library without CUDA (for CI/CD environments)
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments