fix build on windows
This commit is contained in:
parent
4d476d894e
commit
24a741424f
@ -99,14 +99,14 @@ RUNNERS := ollama_runner
|
||||
ifeq ($(ARCH),amd64)
|
||||
RUNNERS += ollama_runner_avx ollama_runner_avx2
|
||||
endif
|
||||
ifeq ($(NVCC),)
|
||||
ifneq ($(NVCC),)
|
||||
RUNNERS += ollama_runner_cuda
|
||||
endif
|
||||
ifeq ($(HIPCC),)
|
||||
ifneq ($(HIPCC),)
|
||||
RUNNERS += ollama_runner_rocm
|
||||
endif
|
||||
|
||||
all: ollama_runner $(RUNNERS)
|
||||
runners: $(RUNNERS)
|
||||
|
||||
%.cuda.$(OBJ_EXT): %.cu
|
||||
$(NVCC) -c $(CUDA_FLAGS) -o $@ $<
|
||||
|
@ -59,7 +59,6 @@ var ggmlMetal string
|
||||
|
||||
func init() {
|
||||
metal := strings.ReplaceAll(ggmlMetal, `#include "ggml-common.h"`, ggmlCommon)
|
||||
fmt.Println(metal)
|
||||
cMetal := C.CString(metal)
|
||||
C.ggml_metallib_start = cMetal
|
||||
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