mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-04-09 23:28:54 +02:00
go : fix CUDA build (#2416)
* Fixed go cuda bindings building * Added note to go bindings Readme to build using cuda support --------- Co-authored-by: Binozo <entwickler@binozoworks.de>
This commit is contained in:
parent
a551933542
commit
049b3a0e53
@ -17,6 +17,11 @@ EXAMPLES_DIR := $(wildcard examples/*)
|
|||||||
INCLUDE_PATH := $(abspath ../../include):$(abspath ../../ggml/include)
|
INCLUDE_PATH := $(abspath ../../include):$(abspath ../../ggml/include)
|
||||||
LIBRARY_PATH := $(abspath ../..)
|
LIBRARY_PATH := $(abspath ../..)
|
||||||
|
|
||||||
|
ifeq ($(GGML_CUDA),1)
|
||||||
|
LIBRARY_PATH := $(LIBRARY_PATH):$(CUDA_PATH)/targets/$(UNAME_M)-linux/lib/
|
||||||
|
BUILD_FLAGS := -ldflags "-extldflags '-lcudart -lcuda -lcublas'"
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(UNAME_S),Darwin)
|
ifeq ($(UNAME_S),Darwin)
|
||||||
EXT_LDFLAGS := -framework Foundation -framework Metal -framework MetalKit
|
EXT_LDFLAGS := -framework Foundation -framework Metal -framework MetalKit
|
||||||
endif
|
endif
|
||||||
|
@ -62,6 +62,12 @@ This will compile a static `libwhisper.a` in a `build` folder, download a model
|
|||||||
make examples
|
make examples
|
||||||
```
|
```
|
||||||
|
|
||||||
|
To build using cuda support add `GGML_CUDA=1`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
GGML_CUDA=1 make examples
|
||||||
|
```
|
||||||
|
|
||||||
The examples are placed in the `build` directory. Once built, you can download all the models with the following command:
|
The examples are placed in the `build` directory. Once built, you can download all the models with the following command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
Loading…
Reference in New Issue
Block a user