"include/vscode:/vscode.git/clone" did not exist on "a5fd974724f4f221c000fe819dd81cbf87e0c77b"
Commit 9d239114 authored by tianlh's avatar tianlh
Browse files

add README-DCU.rst

parent d18cf9d0
镜像
============
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment