whisper : expose CUDA device setting in public API (#1840)

* Makefile : allow to override CUDA_ARCH_FLAG

* whisper : allow to select GPU (CUDA) device from public API
This commit is contained in:
Didzis Gosko
2024-02-09 17:27:47 +02:00
committed by GitHub
parent b6559333ff
commit 0f80e5a80a
3 changed files with 5 additions and 3 deletions

View File

@@ -215,9 +215,9 @@ endif
ifdef WHISPER_CUBLAS
ifeq ($(shell expr $(NVCC_VERSION) \>= 11.6), 1)
CUDA_ARCH_FLAG=native
CUDA_ARCH_FLAG ?= native
else
CUDA_ARCH_FLAG=all
CUDA_ARCH_FLAG ?= all
endif
CFLAGS += -DGGML_USE_CUBLAS -I/usr/local/cuda/include -I/opt/cuda/include -I$(CUDA_PATH)/targets/$(UNAME_M)-linux/include