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
tianlh
LightGBM-DCU
Commits
9d239114
Commit
9d239114
authored
Apr 28, 2026
by
tianlh
Browse files
add README-DCU.rst
parent
d18cf9d0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
0 deletions
+66
-0
README-DCU.rst
README-DCU.rst
+66
-0
No files found.
README-DCU.rst
0 → 100644
View file @
9d239114
镜像
============
docker pull harbor.sourcefind.cn:5443/dcu/admin/base/vllm:0.11.0-ubuntu22.04-dtk26.04-py3.10
创建容器
============
docker run -it --name lightgbm-tlh --privileged --shm-size=256G --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --ulimit memlock=-1:-1 --ipc=host --network host --group-add video --device /dev/kfd --device /dev/dri --device /dev/mkfd -v /opt/hyhal:/opt/hyhal:ro -v /public/tianlh:/workspace harbor.sourcefind.cn:5443/dcu/admin/base/vllm:0.11.0-ubuntu22.04-dtk26.04-py3.10 /bin/bash
下载仓库
============
git clone --recursive xxx.git
环境、脚本准备
============
cd LightGBM
git checkout release/4.6.0.99
pip install scikit_build_core
修改build-python.sh,148行,改成下方内容
.. code:: bash
--rocm)
BUILD_ARGS="${BUILD_ARGS} --config-setting=cmake.define.USE_ROCM=ON"
BUILD_ARGS="${BUILD_ARGS} --config-setting=cmake.define.CMAKE_HIP_COMPILER=dcc"
;;
构建whl
============
.. code:: bash
export CMAKE_PREFIX_PATH=/opt/dtk
export CMAKE_CXX_COMPILER=hipcc
./build-python.sh bdist_wheel --rocm --no-isolation
安装whl
============
pip install dist/amd_lightgbm*.whl
验证安装
============
.. code-block:: shell
pip show -v amd_lightgbm
.. dropdown:: Example output
.. code-block:: shell-session
Name: amd_lightgbm
Version: 4.6.0.99
Summary: ROCm Port of LightGBM Python-package
... [output truncated]
测试程序
============
.. code-block:: shell
hipprof HIP_VISIBLE_DEVICES=0 python lightgbm_test.py
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