Skip to content

Commit

Permalink
feat: cuda test
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwolf-x committed Nov 23, 2024
1 parent 05a6230 commit 9272c61
Showing 1 changed file with 25 additions and 22 deletions.
47 changes: 25 additions & 22 deletions .github/workflows/lightgbm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,37 +21,40 @@ jobs:
with:
platform_version: 2022
boost_version: 1.86.0
toolset: msvc
cache: false
# link: static
# - name: cuda-toolkit
# uses: Jimver/cuda-toolkit@master
# id: cuda-toolkit
# # https://docs.nvidia.com/cuda/archive/12.6.2/cuda-installation-guide-microsoft-windows/index.html#id3
# with:
# cuda: '12.1.1'
# method: 'network'
# sub-packages: '["nvcc", "visual_studio_integration"]'
# # Disable caching of the CUDA binaries, since it does not give us any significant performance improvement
# use-github-cache: "false"
# # 在GITHUB_ENV中输出CUDA_PATH
- run: echo $HOME

# - name: echo version
# run: |
# nvcc -V
# echo ${{ steps.cuda-toolkit.outputs.cuda }}
# echo ${{ steps.install-boost.outputs.BOOST_VER }}
- name: cuda-toolkit
uses: Jimver/cuda-toolkit@master
id: cuda-toolkit
# https://docs.nvidia.com/cuda/archive/12.6.2/cuda-installation-guide-microsoft-windows/index.html#id3
with:
cuda: '12.1.1'
method: 'network'
sub-packages: '["nvcc", "visual_studio_integration"]'
# Disable caching of the CUDA binaries, since it does not give us any significant performance improvement
use-github-cache: "false"
# 在GITHUB_ENV中输出CUDA_PATH

- name: echo version
run: |
nvcc -V
echo ${{ steps.cuda-toolkit.outputs.cuda }}
echo ${{ env.CUDA_PATH }}
echo ${{ steps.install-boost.outputs.BOOST_VER }}
- name: Configure build
run: |
# cmake -B build -S . -A x64 -DUSE_GPU=1 -DBOOST_ROOT=$BOOST_ROOT
# cmake -B build -S . -A x64 -DUSE_GPU=1 -DBOOST_ROOT=BOOST_ROOT -DOpenCL_LIBRARY="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0/lib/x64/OpenCL.lib" -DOpenCL_INCLUDE_DIR="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0/include"
python -V
pip wheel lightgbm --config-settings=cmake.define.Boost_ROOT=$BOOST_ROOT
# pip wheel lightgbm --config-settings=cmake.define.Boost_ROOT=$BOOST_ROOT
# pip wheel lightgbm \
# --config-settings=cmake.define.USE_GPU=ON \
# --config-settings=cmake.define.OpenCL_INCLUDE_DIR=$CUDA_PATH/include \
# --config-settings=cmake.define.Boost_ROOT=$BOOST_ROOT
pip wheel lightgbm \
--config-settings=cmake.define.USE_GPU=ON \
--config-settings=cmake.define.OpenCL_INCLUDE_DIR=$CUDA_PATH/include \
--config-settings=cmake.define.Boost_ROOT=$BOOST_ROOT
env:
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}

Expand Down

0 comments on commit 9272c61

Please sign in to comment.