Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
one
TransferBench
Commits
eb966638
Unverified
Commit
eb966638
authored
Jan 08, 2026
by
Gahan Saraiya
Committed by
GitHub
Jan 08, 2026
Browse files
Added rocm lib path discovery with TheRock support (#227)
Signed-off-by:
Gahan Saraiya
<
Gahan.Saraiya@amd.com
>
parent
bbd72a6c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
Makefile
Makefile
+13
-1
No files found.
Makefile
View file @
eb966638
...
@@ -10,6 +10,15 @@ MPI_PATH ?= /usr/local/openmpi
...
@@ -10,6 +10,15 @@ MPI_PATH ?= /usr/local/openmpi
HIPCC
?=
$(ROCM_PATH)
/bin/amdclang++
HIPCC
?=
$(ROCM_PATH)
/bin/amdclang++
NVCC
?=
$(CUDA_PATH)
/bin/nvcc
NVCC
?=
$(CUDA_PATH)
/bin/nvcc
# ROCm device libraries can live in different locations depending on packaging.
# hipcc/clang needs to find the amdgcn bitcode directory at link time.
ROCM_DEVICE_LIB_PATH
?=
ifneq
($(wildcard $(ROCM_PATH)/amdgcn/bitcode),)
ROCM_DEVICE_LIB_PATH
:=
$(ROCM_PATH)
/amdgcn/bitcode
else
ifneq
($(wildcard $(ROCM_PATH)/lib/llvm/amdgcn/bitcode),)
ROCM_DEVICE_LIB_PATH
:=
$(ROCM_PATH)
/lib/llvm/amdgcn/bitcode
endif
# Option to compile with single GFX kernel to drop compilation time
# Option to compile with single GFX kernel to drop compilation time
SINGLE_KERNEL
?=
0
SINGLE_KERNEL
?=
0
...
@@ -40,6 +49,9 @@ ifeq ($(filter clean,$(MAKECMDGOALS)),)
...
@@ -40,6 +49,9 @@ ifeq ($(filter clean,$(MAKECMDGOALS)),)
CXXFLAGS
=
-I
$(ROCM_PATH)
/include
-I
$(ROCM_PATH)
/include/hip
-I
$(ROCM_PATH)
/include/hsa
CXXFLAGS
=
-I
$(ROCM_PATH)
/include
-I
$(ROCM_PATH)
/include/hip
-I
$(ROCM_PATH)
/include/hsa
HIPLDFLAGS
=
-lnuma
-L
$(ROCM_PATH)
/lib
-lhsa-runtime64
-lamdhip64
HIPLDFLAGS
=
-lnuma
-L
$(ROCM_PATH)
/lib
-lhsa-runtime64
-lamdhip64
HIPFLAGS
=
-Wall
-x
hip
-D__HIP_PLATFORM_AMD__
-D__HIPCC__
$(GPU_TARGETS_FLAGS)
HIPFLAGS
=
-Wall
-x
hip
-D__HIP_PLATFORM_AMD__
-D__HIPCC__
$(GPU_TARGETS_FLAGS)
ifneq
($(strip $(ROCM_DEVICE_LIB_PATH)),)
HIPFLAGS
+=
--rocm-device-lib-path
=
$(ROCM_DEVICE_LIB_PATH)
endif
NVFLAGS
=
-x
cu
-lnuma
-arch
=
native
NVFLAGS
=
-x
cu
-lnuma
-arch
=
native
ifeq
($(SINGLE_KERNEL), 1)
ifeq
($(SINGLE_KERNEL), 1)
...
@@ -111,7 +123,7 @@ endif
...
@@ -111,7 +123,7 @@ endif
all
:
$(EXE)
all
:
$(EXE)
TransferBench
:
./src/client/Client.cpp $(shell find -regex ".*
\.\h
pp")
TransferBench
:
./src/client/Client.cpp $(shell find -regex ".*
\.\h
pp")
$(
HIPCC
)
$(CXXFLAGS)
$(HIPFLAGS)
$(COMMON_FLAGS)
$<
-o
$@
$(HIPLDFLAGS)
$(LDFLAGS)
$(
CXX
)
$(CXXFLAGS)
$(HIPFLAGS)
$(COMMON_FLAGS)
$<
-o
$@
$(HIPLDFLAGS)
$(LDFLAGS)
TransferBenchCuda
:
./src/client/Client.cpp $(shell find -regex ".*
\.\h
pp")
TransferBenchCuda
:
./src/client/Client.cpp $(shell find -regex ".*
\.\h
pp")
$(NVCC)
$(NVFLAGS)
$(COMMON_FLAGS)
$<
-o
$@
$(LDFLAGS)
$(NVCC)
$(NVFLAGS)
$(COMMON_FLAGS)
$<
-o
$@
$(LDFLAGS)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment