forked from third-party-mirrors/ollama
fix build on windows
This commit is contained in:
parent
4d476d894e
commit
24a741424f
@ -99,14 +99,14 @@ RUNNERS := ollama_runner
|
|||||||
ifeq ($(ARCH),amd64)
|
ifeq ($(ARCH),amd64)
|
||||||
RUNNERS += ollama_runner_avx ollama_runner_avx2
|
RUNNERS += ollama_runner_avx ollama_runner_avx2
|
||||||
endif
|
endif
|
||||||
ifeq ($(NVCC),)
|
ifneq ($(NVCC),)
|
||||||
RUNNERS += ollama_runner_cuda
|
RUNNERS += ollama_runner_cuda
|
||||||
endif
|
endif
|
||||||
ifeq ($(HIPCC),)
|
ifneq ($(HIPCC),)
|
||||||
RUNNERS += ollama_runner_rocm
|
RUNNERS += ollama_runner_rocm
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: ollama_runner $(RUNNERS)
|
runners: $(RUNNERS)
|
||||||
|
|
||||||
%.cuda.$(OBJ_EXT): %.cu
|
%.cuda.$(OBJ_EXT): %.cu
|
||||||
$(NVCC) -c $(CUDA_FLAGS) -o $@ $<
|
$(NVCC) -c $(CUDA_FLAGS) -o $@ $<
|
||||||
|
@ -59,7 +59,6 @@ var ggmlMetal string
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
metal := strings.ReplaceAll(ggmlMetal, `#include "ggml-common.h"`, ggmlCommon)
|
metal := strings.ReplaceAll(ggmlMetal, `#include "ggml-common.h"`, ggmlCommon)
|
||||||
fmt.Println(metal)
|
|
||||||
cMetal := C.CString(metal)
|
cMetal := C.CString(metal)
|
||||||
C.ggml_metallib_start = cMetal
|
C.ggml_metallib_start = cMetal
|
||||||
C.ggml_metallib_end = (*C.char)(unsafe.Pointer(uintptr(unsafe.Pointer(cMetal)) + uintptr(len(metal))))
|
C.ggml_metallib_end = (*C.char)(unsafe.Pointer(uintptr(unsafe.Pointer(cMetal)) + uintptr(len(metal))))
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
#import <Foundation/Foundation.h>
|
|
||||||
|
|
||||||
const char* ggml_metallib_start = NULL;
|
|
||||||
const char* ggml_metallib_end = NULL;
|
|
2
llama/metal.c
Normal file
2
llama/metal.c
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
const char* ggml_metallib_start = 0;
|
||||||
|
const char* ggml_metallib_end = 0;
|
Loading…
x
Reference in New Issue
Block a user