We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68936f2 commit b96e41aCopy full SHA for b96e41a
modules/module3/examples/Makefile
@@ -54,6 +54,11 @@ endif
54
# Add detected GPU architecture to HIP flags
55
HIP_FLAGS += --offload-arch=$(GPU_ARCH)
56
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
62
CXX_FLAGS = -std=c++17 -O2
63
64
# Directories
@@ -129,7 +134,7 @@ endif
129
134
ifeq ($(BUILD_HIP),1)
130
135
$(BUILD_DIR)/%_hip: $(EXAMPLES_DIR)/%_hip.cpp
131
136
@echo "Building HIP example: $@"
132
- $(HIPCC) $(HIP_FLAGS) $< -o $@
137
+ $(HIPCC) $(HIP_FLAGS) $< -o $@ $(HIP_LDFLAGS)
133
138
endif
139
140
# Debug builds
0 commit comments