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

WIP: ENH: support cuda 12 #3311

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

CloseChoice
Copy link
Collaborator

@CloseChoice CloseChoice commented Oct 5, 2023

Overview

Closes #3251

Description of the changes proposed in this pull request:

  • these are just the changes @alexk101 proposed in BUG: No GPU Support for Modern CUDA #3251. I ran some code on a cuda capable GPU with CUDA 12.2 installed
  • WIP: reverted to legacy build system so that pip install -e . installs cuda if it is available (note that this does not work right now, since setup.py does not have a fallback for non-cuda GPUs, need to fix this)

Checklist

  • All pre-commit checks pass.
  • Unit tests added (if fixing a bug or adding a new feature)

@CloseChoice
Copy link
Collaborator Author

The GPU capable of shap seems only to work when done via python setup.py install while pip install -e . (using pyproject.toml) does not seem to work. Would be great to include this in the PR, I'll look into it

@CloseChoice CloseChoice changed the title remove old kepler architecture for cuda build WIP: remove old kepler architecture for cuda build Oct 6, 2023
@CloseChoice
Copy link
Collaborator Author

CloseChoice commented Oct 6, 2023

I checked other repositories a bit and found that the meson build system might work for us. They have (unstable) cuda support and meson can be used in combination with the current setuptools.build_meta (without reverting to legacy).

@connortann @thatlittleboy How should we continue on this? There are basically 4 options:

  • use setuptools.build_meta so that GPU support can only be installed using python setup.py install after installing shap. (But then GPU is not supported on installations from PyPI, etc. just as now, or am I missing something here?)
  • revert to legacy build system and raise a seperate issue for using another build system
  • implementing the build process in meson in this PR (I would be willing to dig deeper into this)
  • go for another build system

I am not an expert in the Python packaging system and the various build systems but I am willing to take this on as the next thing I'm tackling.

@CloseChoice CloseChoice changed the title WIP: remove old kepler architecture for cuda build WIP: ENH: support cuda 12 Oct 6, 2023
@connortann
Copy link
Collaborator

connortann commented Nov 30, 2023

Thank you for looking in to this. I don't have a suitable machine to test on for this on and I'm relatively less familiar with building for GPU support, so I don't know immediately what the right way forward is.

It would be helpful to get input from those with experience in this area, such as any original authors. In particular it would be useful to understand the nature of the relationship between this repo and the Nvidia rapids repo mentioned in #3251 (comment) .

As for this PR: are the two sets of changes separable? That is, could we merge in the changes to shap/shap/cext/gpu_treeshap.h for now whilst we figure out details relating to the build system?

@connortann
Copy link
Collaborator

Tagging @RAMitchell , would you be able to take a look at this PR given your expertise in this area?

@connortann connortann added the enhancement Indicates new feature requests label Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Indicates new feature requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: No GPU Support for Modern CUDA
2 participants