Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CUDA] Support CUDA 9 and test different CUDA versions at CI #3880

Merged
merged 21 commits into from
Jan 31, 2021

Conversation

StrikerRUS
Copy link
Collaborator

@StrikerRUS StrikerRUS commented Jan 29, 2021

I think testing different CUDA versions will greatly help us to be confident in CUDA code.

Linking #3431.

CUDA < 10.0 fails to recognize 7.5 architecture.

[  7%] Building CUDA object CMakeFiles/histo_16_64_256-fulldata_sp_const.dir/src/treelearner/kernels/histogram_16_64_256.cu.o
nvcc fatal   : Unsupported gpu architecture 'compute_75'

Refer to https://github.com/Kitware/CMake/blob/36bb0e32d7e3976eed424078cf5cac459651f0f1/Modules/FindCUDA/select_compute_arch.cmake#L50-L60.

Comment on lines +87 to +91
curl -sL https://apt.kitware.com/keys/kitware-archive-latest.asc | apt-key add -
apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" -y
apt-get update
apt-get install --no-install-recommends -y \
cmake
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jameslamb Unfortunately, now we cannot use default CMake here because old CUDA Dockers are based on Ubuntus where we cannot pass CMake >= 3.16 check. 🙁
https://gitlab.com/nvidia/container-images/cuda/blob/master/doc/supported-tags.md
https://packages.ubuntu.com/bionic-updates/cmake
https://packages.ubuntu.com/xenial-updates/cmake

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blegh ok, that's alright

- method: pip
python_version: 3.7
cuda_version: "10.0"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub Actions treats values written as x.0 like ints, so we need explicitly set them to strings.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😱 that's horrible haha

Comment on lines +160 to +166
set(CUDA_ARCHS "6.0" "6.1" "6.2" "7.0")
if(CUDA_VERSION VERSION_GREATER_EQUAL "10.0")
list(APPEND CUDA_ARCHS "7.5")
endif()
list(POP_BACK CUDA_ARCHS CUDA_LAST_SUPORTED_VERSION)
list(APPEND CUDA_ARCHS "${CUDA_LAST_SUPORTED_VERSION}+PTX")
CUDA_SELECT_NVCC_ARCH_FLAGS(CUDA_ARCH_FLAGS ${CUDA_ARCHS})
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @ChipKerchner
I hope this change will not break anything on POWER machines.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ChipKerchner I'm so sorry for my poor English skills, but could you please rephrase? Do you think that
(1) this change can potentially hurt compilation on POWER systems
OR
(2) this change should be OK for POWER systems
?

And if (1), how this change can be harmful to POWER machines?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this change is OK for POWER systems.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, got it! Thanks a lot for finding time to comment!

Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea, thanks

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants