Skip to content

Commit b96e41a

Browse files
committed
Fixed the make debug
1 parent 68936f2 commit b96e41a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

modules/module3/examples/Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ endif
5454
# Add detected GPU architecture to HIP flags
5555
HIP_FLAGS += --offload-arch=$(GPU_ARCH)
5656
HIP_DEBUG_FLAGS += --offload-arch=$(GPU_ARCH)
57+
58+
# ROCm library linking for advanced examples
59+
HIP_LIB_DIR := $(ROCM_PATH)/lib
60+
HIP_LDFLAGS := -L$(HIP_LIB_DIR) -lrocblas -Wl,-rpath,$(HIP_LIB_DIR)
61+
5762
CXX_FLAGS = -std=c++17 -O2
5863

5964
# Directories
@@ -129,7 +134,7 @@ endif
129134
ifeq ($(BUILD_HIP),1)
130135
$(BUILD_DIR)/%_hip: $(EXAMPLES_DIR)/%_hip.cpp
131136
@echo "Building HIP example: $@"
132-
$(HIPCC) $(HIP_FLAGS) $< -o $@
137+
$(HIPCC) $(HIP_FLAGS) $< -o $@ $(HIP_LDFLAGS)
133138
endif
134139

135140
# Debug builds

0 commit comments

Comments
 (0)