deftdawg-detect-gpu #2
4
Makefile
4
Makefile
|
@ -117,8 +117,8 @@ HIP_INCLUDE := -I $(ROOT_DIR)/csrc -I $(ROOT_DIR)/include
|
|||
HIP_LIB := -L$(ROCM_DIR)/lib -L$(ROCM_DIR)/llvm/bin/../lib/clang/15.0.0/lib/linux -L/usr/lib/gcc/x86_64-linux-gnu/11 -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib64 -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib64 -L/lib -L/usr/lib -lgcc_s -lgcc -lpthread -lm -lrt -lamdhip64 -lhipblas -lhipsparse -lclang_rt.builtins-x86_64 -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
|
||||
|
||||
hip: $(BUILD_DIR)
|
||||
$(HIPCC) -std=c++14 -c -fPIC --amdgpu-target=gfx1030 $(HIP_INCLUDE) -o $(BUILD_DIR)/ops.o -D NO_CUBLASLT $(CSRC)/ops.cu
|
||||
$(HIPCC) -std=c++14 -c -fPIC --amdgpu-target=gfx1030 $(HIP_INCLUDE) -o $(BUILD_DIR)/kernels.o -D NO_CUBLASLT $(CSRC)/kernels.cu
|
||||
$(HIPCC) -std=c++14 -c -fPIC --amdgpu-target=`rocm_agent_enumerator -t GPU | sort -t 'x' -k 2n | tail -1` $(HIP_INCLUDE) -o $(BUILD_DIR)/ops.o -D NO_CUBLASLT $(CSRC)/ops.cu
|
||||
$(HIPCC) -std=c++14 -c -fPIC --amdgpu-target=`rocm_agent_enumerator -t GPU | sort -t 'x' -k 2n | tail -1` $(HIP_INCLUDE) -o $(BUILD_DIR)/kernels.o -D NO_CUBLASLT $(CSRC)/kernels.cu
|
||||
# $(HIPCC) -fPIC -static $(BUILD_DIR)/ops.o $(BUILD_DIR)/kernels.o -o $(BUILD_DIR)/link.so
|
||||
$(GPP) -std=c++14 -D__HIP_PLATFORM_AMD__ -DBUILD_CUDA -shared -fPIC -I /opt/rocm/include $(HIP_INCLUDE) $(BUILD_DIR)/ops.o $(BUILD_DIR)/kernels.o $(FILES_CPP) $(HIP_LIB) -o ./bitsandbytes/libbitsandbytes_hip_nocublaslt.so
|
||||
|
||||
|
|
|
@ -16,12 +16,9 @@ In `Makefile`:
|
|||
# activate your VENV, if using this within a VENV
|
||||
git clone https://git.ecker.tech/mrq/bitsandbytes-rocm
|
||||
make hip
|
||||
CUDA_VERSION=gfx1030 python setup.py install # assumes you're using a 6XXX series card
|
||||
CUDA_VERSION=`rocm_agent_enumerator -t GPU | sort -t 'x' -k 2n | tail -1` python setup.py install # assumes rocm_agent_enumerator is available in your PATH
|
||||
python3 -m bitsandbytes # to validate it works
|
||||
```
|
||||
|
||||
**!**NOTE**!**: this assumes you have a AMD 6XXX series card. Adapt this to your proper GFX version if different.
|
||||
|
||||
---
|
||||
|
||||
# bitsandbytes
|
||||
|
|
Loading…
Reference in New Issue
Block a user