mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-11-03 09:22:01 +00:00 
			
		
		
		
	make : force CPU extensions [no ci]
This commit is contained in:
		
							
								
								
									
										19
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								Makefile
									
									
									
									
									
								
							@@ -434,19 +434,16 @@ endif
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
ifndef RISCV
 | 
					ifndef RISCV
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ifeq ($(UNAME_M),$(filter $(UNAME_M),x86_64 i686 amd64))
 | 
					MK_CFLAGS     += -mfma -mf16c -mavx -mavx2
 | 
				
			||||||
	# Use all CPU extensions that are available:
 | 
					HOST_CXXFLAGS += -mfma -mf16c -mavx -mavx2
 | 
				
			||||||
	MK_CFLAGS     += -march=native -mtune=native
 | 
					 | 
				
			||||||
	HOST_CXXFLAGS += -march=native -mtune=native
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	# Usage AVX-only
 | 
					# Usage AVX-only
 | 
				
			||||||
	#MK_CFLAGS   += -mfma -mf16c -mavx
 | 
					#MK_CFLAGS   += -mfma -mf16c -mavx
 | 
				
			||||||
	#MK_CXXFLAGS += -mfma -mf16c -mavx
 | 
					#MK_CXXFLAGS += -mfma -mf16c -mavx
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	# Usage SSSE3-only (Not is SSE3!)
 | 
					# Usage SSSE3-only (Not is SSE3!)
 | 
				
			||||||
	#MK_CFLAGS   += -mssse3
 | 
					#MK_CFLAGS   += -mssse3
 | 
				
			||||||
	#MK_CXXFLAGS += -mssse3
 | 
					#MK_CXXFLAGS += -mssse3
 | 
				
			||||||
endif
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
ifneq '' '$(findstring mingw,$(shell $(CC) -dumpmachine))'
 | 
					ifneq '' '$(findstring mingw,$(shell $(CC) -dumpmachine))'
 | 
				
			||||||
	# The stack is only 16-byte aligned on Windows, so don't let gcc emit aligned moves.
 | 
						# The stack is only 16-byte aligned on Windows, so don't let gcc emit aligned moves.
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user