Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
DeepEP
Commits
10da3d32
Commit
10da3d32
authored
May 09, 2026
by
lijian
Browse files
Add shca hca to main branch.
Signed-off-by:
lijian
<
lijina6@sugon.com
>
parent
d6104f9c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
3 deletions
+20
-3
build.sh
build.sh
+20
-3
No files found.
build.sh
View file @
10da3d32
...
@@ -30,6 +30,7 @@ PYTHON_PLATLIB=$(python3 -c "from sysconfig import get_paths; print(get_paths()[
...
@@ -30,6 +30,7 @@ PYTHON_PLATLIB=$(python3 -c "from sysconfig import get_paths; print(get_paths()[
USE_NVSHMEM
=
OFF
USE_NVSHMEM
=
OFF
USE_ROCSHMEM
=
OFF
USE_ROCSHMEM
=
OFF
BUILD_SHCA
=
OFF
ROCM_DISABLE_CTX
=
OFF
ROCM_DISABLE_CTX
=
OFF
ROCM_DISABLE_MULTIQP
=
OFF
ROCM_DISABLE_MULTIQP
=
OFF
# 解析命令行参数
# 解析命令行参数
...
@@ -41,6 +42,9 @@ for arg in "$@"; do
...
@@ -41,6 +42,9 @@ for arg in "$@"; do
nvshmem|dushmem
)
nvshmem|dushmem
)
USE_NVSHMEM
=
ON
USE_NVSHMEM
=
ON
;;
;;
BUILD_SHCA
=
ON
)
BUILD_SHCA
=
ON
;;
ROCM_DISABLE_CTX
=
ON
)
ROCM_DISABLE_CTX
=
ON
)
ROCM_DISABLE_CTX
=
ON
ROCM_DISABLE_CTX
=
ON
;;
;;
...
@@ -106,6 +110,7 @@ echo "Current $DETECTED_ARCH"
...
@@ -106,6 +110,7 @@ echo "Current $DETECTED_ARCH"
echo
"USE_NVSHMEM=
$USE_NVSHMEM
"
echo
"USE_NVSHMEM=
$USE_NVSHMEM
"
echo
"USE_ROCSHMEM=
$USE_ROCSHMEM
"
echo
"USE_ROCSHMEM=
$USE_ROCSHMEM
"
echo
"BUILD_SHCA=
$BUILD_SHCA
"
echo
"ROCM_DISABLE_CTX=
$ROCM_DISABLE_CTX
"
echo
"ROCM_DISABLE_CTX=
$ROCM_DISABLE_CTX
"
echo
"ROCM_DISABLE_MULTIQP=
$ROCM_DISABLE_MULTIQP
"
echo
"ROCM_DISABLE_MULTIQP=
$ROCM_DISABLE_MULTIQP
"
...
@@ -113,6 +118,9 @@ echo "ROCM_DISABLE_MULTIQP=$ROCM_DISABLE_MULTIQP"
...
@@ -113,6 +118,9 @@ echo "ROCM_DISABLE_MULTIQP=$ROCM_DISABLE_MULTIQP"
build_rocshmem
()
build_rocshmem
()
{
{
cd
third-party/rocshmem/
cd
third-party/rocshmem/
if
[
"
$BUILD_SHCA
"
==
"ON"
]
;
then
git checkout 1aab2cf87fe602b6ad62d93b054025fd1afa57bc
fi
if
[
!
-d
"build"
]
;
then
if
[
!
-d
"build"
]
;
then
mkdir
-p
build
mkdir
-p
build
fi
fi
...
@@ -122,8 +130,13 @@ build_rocshmem()
...
@@ -122,8 +130,13 @@ build_rocshmem()
return
1
return
1
}
}
echo
"cd third-party/rocshmem/build"
echo
"cd third-party/rocshmem/build"
if
[
"
$BUILD_SHCA
"
==
"ON"
]
;
then
bash ../scripts/build_configs/gda_shca
echo
"编译SHCA rocshmem 成功"
else
bash ../scripts/build_configs/gda_mlx5
bash ../scripts/build_configs/gda_mlx5
echo
"编译rocshmem成功"
echo
"编译MLX rocshmem 成功"
fi
cd
"
$src_path
"
cd
"
$src_path
"
}
}
...
@@ -240,7 +253,11 @@ fi
...
@@ -240,7 +253,11 @@ fi
if
[[
"
$need_link
"
==
true
]]
;
then
if
[[
"
$need_link
"
==
true
]]
;
then
echo
"Linking ->
$OUTPUT
"
echo
"Linking ->
$OUTPUT
"
if
[
"
$BUILD_SHCA
"
==
"ON"
]
;
then
hipcc
-Wno-unused-result
-Wsign-compare
-DNDEBUG
-g
-fwrapv
-O2
-Wall
-g
-fstack-protector-strong
-Wformat
-Werror
=
format-security
-g
-fwrapv
-O2
-shared
-Wl
,-O1
-Wl
,-Bsymbolic-functions
"
${
OBJECTS
[@]
}
"
-L
${
SHMEM_INSTALL_PREFIX
}
/lib/
-L
/opt/mpi/lib
-L
/opt/dtk/hip/lib
-L
/usr/lib/x86_64-linux-gnu
-lhipblaslt
-lamdhip64
-o
"
$OUTPUT
"
-Wl
,-rpath,/opt/dtk/lib
-fgpu-rdc
--hip-link
${
DETECTED_ARCH
}
-shared
-Wl
,-soname,
"
$(
basename
"
$OUTPUT
"
)
"
-L
"
${
llvm_path
}
/include/../lib/linux"
-lclang_rt
.builtins-x86_64 /opt/dtk/hip/lib/libgalaxyhip.so
${
llvm_path
}
/lib/linux/libclang_rt.builtins-x86_64.a /opt/hyhal/lib/libhsa-runtime64.so
-L
${
PYTHON_PLATLIB
}
/torch/lib
-L
/opt/dtk/lib
-L
/opt/dtk/hip/lib
-L
/usr/local/lib
-lc10
-ltorch
-ltorch_cpu
-ltorch_python
-lamdhip64
-lc10_hip
-ltorch_hip
-lrocm-core
-lrocm_smi64
${
SHMEM_LINK_OPTIONS
}
-fgpu-rdc
--hip-link
-lamdhip64
-lhsa-runtime64
-l
:libmpi.so
-Wl
,-rpath,/opt/mpi/lib/
-libverbs
-lshca
else
hipcc
-Wno-unused-result
-Wsign-compare
-DNDEBUG
-g
-fwrapv
-O2
-Wall
-g
-fstack-protector-strong
-Wformat
-Werror
=
format-security
-g
-fwrapv
-O2
-shared
-Wl
,-O1
-Wl
,-Bsymbolic-functions
"
${
OBJECTS
[@]
}
"
-L
${
SHMEM_INSTALL_PREFIX
}
/lib/
-L
/opt/mpi/lib
-L
/opt/dtk/hip/lib
-L
/usr/lib/x86_64-linux-gnu
-lhipblaslt
-lamdhip64
-o
"
$OUTPUT
"
-Wl
,-rpath,/opt/dtk/lib
-fgpu-rdc
--hip-link
${
DETECTED_ARCH
}
-shared
-Wl
,-soname,
"
$(
basename
"
$OUTPUT
"
)
"
-L
"
${
llvm_path
}
/include/../lib/linux"
-lclang_rt
.builtins-x86_64 /opt/dtk/hip/lib/libgalaxyhip.so
${
llvm_path
}
/lib/linux/libclang_rt.builtins-x86_64.a /opt/hyhal/lib/libhsa-runtime64.so
-L
${
PYTHON_PLATLIB
}
/torch/lib
-L
/opt/dtk/lib
-L
/opt/dtk/hip/lib
-L
/usr/local/lib
-lc10
-ltorch
-ltorch_cpu
-ltorch_python
-lamdhip64
-lc10_hip
-ltorch_hip
-lrocm-core
-lrocm_smi64
${
SHMEM_LINK_OPTIONS
}
-fgpu-rdc
--hip-link
-lamdhip64
-lhsa-runtime64
-l
:libmpi.so
-Wl
,-rpath,/opt/mpi/lib/
-libverbs
-lmlx5
hipcc
-Wno-unused-result
-Wsign-compare
-DNDEBUG
-g
-fwrapv
-O2
-Wall
-g
-fstack-protector-strong
-Wformat
-Werror
=
format-security
-g
-fwrapv
-O2
-shared
-Wl
,-O1
-Wl
,-Bsymbolic-functions
"
${
OBJECTS
[@]
}
"
-L
${
SHMEM_INSTALL_PREFIX
}
/lib/
-L
/opt/mpi/lib
-L
/opt/dtk/hip/lib
-L
/usr/lib/x86_64-linux-gnu
-lhipblaslt
-lamdhip64
-o
"
$OUTPUT
"
-Wl
,-rpath,/opt/dtk/lib
-fgpu-rdc
--hip-link
${
DETECTED_ARCH
}
-shared
-Wl
,-soname,
"
$(
basename
"
$OUTPUT
"
)
"
-L
"
${
llvm_path
}
/include/../lib/linux"
-lclang_rt
.builtins-x86_64 /opt/dtk/hip/lib/libgalaxyhip.so
${
llvm_path
}
/lib/linux/libclang_rt.builtins-x86_64.a /opt/hyhal/lib/libhsa-runtime64.so
-L
${
PYTHON_PLATLIB
}
/torch/lib
-L
/opt/dtk/lib
-L
/opt/dtk/hip/lib
-L
/usr/local/lib
-lc10
-ltorch
-ltorch_cpu
-ltorch_python
-lamdhip64
-lc10_hip
-ltorch_hip
-lrocm-core
-lrocm_smi64
${
SHMEM_LINK_OPTIONS
}
-fgpu-rdc
--hip-link
-lamdhip64
-lhsa-runtime64
-l
:libmpi.so
-Wl
,-rpath,/opt/mpi/lib/
-libverbs
-lmlx5
fi
echo
"Successfully built
$OUTPUT
"
echo
"Successfully built
$OUTPUT
"
else
else
echo
"Skipping linking (
$OUTPUT
is up to date)"
echo
"Skipping linking (
$OUTPUT
is up to date)"
...
...
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