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

Enable ROCM support #3570

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

Enable ROCM support #3570

wants to merge 13 commits into from

Conversation

hliuca
Copy link

@hliuca hliuca commented Mar 13, 2024

Overview

This PR adds a few files under cext/ folder and enables AMD GPUs using ROCm.

The setup.py has been modified to detect ROCm and to compile HIP codes.

@CloseChoice
Copy link
Collaborator

Thanks for the PR. Would be great to have support for this. Could you elaborate a bit how we can install and test this? No need for CI tests at the moment but as part of the review I would like to install it and run a couple of tests with it

@hliuca
Copy link
Author

hliuca commented Mar 14, 2024

Thanks for the PR. Would be great to have support for this. Could you elaborate a bit how we can install and test this? No need for CI tests at the moment but as part of the review I would like to install it and run a couple of tests with it

Thanks for the response.

  1. The setup.py script will take care of the installation, such as "python3 setup.py install". Its compilation and installation are the same as CUDA. The setup.py looks for CUDA and HIP and compiles automatically.

  2. The HIP version has the same APIs as CUDA version, so the same scripts/tests for CUDA work for HIP. The users don't need to change any code and the code works.

  3. tests/explainers/test_gpu_tree.py is a script to test GPU version, "explainer = shap.GPUTreeExplainer(model)".

You will need AMD Instinct GPUs to run the HIP/ROCm version.

@CloseChoice
Copy link
Collaborator

Thanks for the PR. Would be great to have support for this. Could you elaborate a bit how we can install and test this? No need for CI tests at the moment but as part of the review I would like to install it and run a couple of tests with it

Thanks for the response.

1. The setup.py script will take care of the installation, such as "python3 setup.py install". Its compilation and installation are the same as CUDA. The setup.py looks for CUDA and HIP and compiles automatically.

2. The HIP version has the same APIs as CUDA version, so the same scripts/tests for CUDA work for HIP. The users don't need to change any code and the code works.

3. tests/explainers/test_gpu_tree.py is a script to test GPU version, "explainer = shap.GPUTreeExplainer(model)".

You will need AMD Instinct GPUs to run the HIP/ROCm version.

Thanks for all the work. Is this ready for a first round of review?

@hliuca
Copy link
Author

hliuca commented Mar 26, 2024

Thanks for all the work. Is this ready for a first round of review?

Yes, it is ready. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants