Skip to content

Commit 7c77be4

Browse files
committed
Makefile: Add fallback to /opt/rocm home
1 parent 07230fd commit 7c77be4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ ifndef ROCM_TARGET
2121
$(error ERROR: ROCM_TARGET not set. Call make with ROCM string (see https://www.llvm.org/docs/AMDGPUUsage.html#processors), for example: make hip ROCM_TARGET=gfx1030)
2222
ROCM_TARGET:=
2323
endif
24+
else
25+
$(warning WARNING: Unable to find hipcc in path, fallback to ROCM_HOME /opt/rocm)
26+
ROCM_HOME:=/opt/rocm
2427
endif
2528

2629

@@ -129,7 +132,7 @@ cpuonly: $(BUILD_DIR) env
129132
hip: $(BUILD_DIR)
130133
$(HIPCC) -std=c++14 -c -fPIC --offload-arch=$(ROCM_TARGET) $(HIP_INCLUDE) -o $(BUILD_DIR)/ops.o -DNO_CUBLASLT -DBITS_AND_BYTES_USE_ROCM $(CSRC)/ops.cu
131134
$(HIPCC) -std=c++14 -c -fPIC --offload-arch=$(ROCM_TARGET) $(HIP_INCLUDE) -o $(BUILD_DIR)/kernels.o -DNO_CUBLASLT -DBITS_AND_BYTES_USE_ROCM $(CSRC)/kernels.cu
132-
# HCC is deprecated, but used by hipBLASlt header. Since blas isn't even used doesn't matter, this is just so that it even compiles
135+
# HCC is deprecated, but used by hipBLASlt header. Since blas isn't even used doesn't matter, this is just so that it even compiles
133136
$(GPP) -std=c++14 -D__HIP_PLATFORM_HCC__ -D__HIP_PLATFORM_AMD__ -DBUILD_CUDA -DBITS_AND_BYTES_USE_ROCM -shared -fPIC $(HIP_INCLUDE) $(BUILD_DIR)/ops.o $(BUILD_DIR)/kernels.o $(FILES_CPP) $(HIP_LIB) -o ./bitsandbytes/libbitsandbytes_hip_nohipblaslt.so
134137

135138
env:

0 commit comments

Comments
 (0)