Skip to content

Commit

Permalink
Update Makefile for the Cuda kernels
Browse files Browse the repository at this point in the history
  • Loading branch information
SlyEcho committed Apr 20, 2023
1 parent 0fd8363 commit 54a63c1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,15 @@ ggml-cuda.o: ggml-cuda.cu ggml-cuda.h
nvcc -arch=native -c -o $@ $<
endif
ifdef LLAMA_HIPBLAS
CFLAGS += -DGGML_USE_HIPBLAS -D__HIP_PLATFORM_AMD__ -I/opt/rocm/include
LDFLAGS += -lhipblas -lamdhip64 -L/opt/rocm/lib
ROCMPATH?= /opt/rocm
CFLAGS += -DGGML_USE_HIPBLAS -D__HIP_PLATFORM_AMD__ -I$(ROCMPATH)/include
CXXFLAGS+= -D__HIP_PLATFORM_AMD__ -I$(ROCMPATH)/include
HIPFLAGS?= -amdgpu-early-inline-all=true -amdgpu-function-calls=false -march=native
LDFLAGS += -lhipblas -lamdhip64 -L$(ROCMPATH)/lib
HIPCC ?= $(ROCMPATH)/bin/hipcc
OBJS += ggml-cuda.o
ggml-cuda.o: ggml-cuda.cu ggml-cuda.h
$(HIPCC) $(CXXFLAGS) -x hip $(HIPFLAGS) -c -o $@ $<
endif
ifdef LLAMA_GPROF
CFLAGS += -pg
Expand Down

0 comments on commit 54a63c1

Please sign in to comment.