Skip to content

Add hipdnn and miopen-plugin to python packaging#2958

Closed
BrianHarrisonAMD wants to merge 26 commits into
mainfrom
users/bharriso/hipdnn-python-packaging
Closed

Add hipdnn and miopen-plugin to python packaging#2958
BrianHarrisonAMD wants to merge 26 commits into
mainfrom
users/bharriso/hipdnn-python-packaging

Conversation

@BrianHarrisonAMD
Copy link
Copy Markdown
Contributor

@BrianHarrisonAMD BrianHarrisonAMD commented Jan 15, 2026

Motivation

Add hipDNN & MIOpen plugin to the python wheel packaging.
The purpose of this change is to enable hipDNN integration with Pytorch.

Technical Details

  • Added hipDNN + plugin project to the packaging script.
  • Added hipdnn to _dist_info.py matching with other libraries
  • Updated documentation to include details of hipDNN
  • Updated build_python_packages.py to allow generic targets to be installed alongside device targets
    • For now this enables hipDNN to be installed alongside other library components.
    • Note: Once RFC0008 is implemented then hipDNN & the plugin should be moved to the host only locations along side the other library projects.

Test Plan

Run a test of the Release portable Linux packages workflow & Windows packages workflow:

Linux test wheels (run here unrelated jax break):

pip install \
  https://therock-dev-python.s3.amazonaws.com/v2/gfx94X-dcgpu/rocm-7.12.0.dev0%2Be7125827ee12837fefbd91de4b3d1a8b9f0b2425.tar.gz \
  https://therock-dev-python.s3.amazonaws.com/v2/gfx94X-dcgpu/rocm_sdk_core-7.12.0.dev0%2Be7125827ee12837fefbd91de4b3d1a8b9f0b2425-py3-none-linux_x86_64.whl \
  https://therock-dev-python.s3.amazonaws.com/v2/gfx94X-dcgpu/rocm_sdk_libraries_gfx94x_dcgpu-7.12.0.dev0%2Be7125827ee12837fefbd91de4b3d1a8b9f0b2425-py3-none-linux_x86_64.whl \
  https://therock-dev-python.s3.amazonaws.com/v2/gfx94X-dcgpu/rocm_sdk_devel-7.12.0.dev0%2Be7125827ee12837fefbd91de4b3d1a8b9f0b2425-py3-none-linux_x86_64.whl

Windows test wheels (run here):

pip install ^
  https://therock-dev-python.s3.amazonaws.com/v2-staging/gfx110X-all/rocm-7.12.0.dev0%2Be7125827ee12837fefbd91de4b3d1a8b9f0b2425.tar.gz ^
  https://therock-dev-python.s3.amazonaws.com/v2-staging/gfx110X-all/rocm_sdk_core-7.12.0.dev0%2Be7125827ee12837fefbd91de4b3d1a8b9f0b2425-py3-none-win_amd64.whl ^
  https://therock-dev-python.s3.amazonaws.com/v2-staging/gfx110X-all/rocm_sdk_libraries_gfx110x_all-7.12.0.dev0%2Be7125827ee12837fefbd91de4b3d1a8b9f0b2425-py3-none-win_amd64.whl ^
  https://therock-dev-python.s3.amazonaws.com/v2-staging/gfx110X-all/rocm_sdk_devel-7.12.0.dev0%2Be7125827ee12837fefbd91de4b3d1a8b9f0b2425-py3-none-win_amd64.whl

Test Result

Wheel builds are successful with the hipDNN artifacts included.
Additional artifacts from hipDNN are present, and installed correctly.

@BrianHarrisonAMD
Copy link
Copy Markdown
Contributor Author

The bundling works, but it showed a couple issues we need to address:

  • hipDNN is installing into _rocm_sdk_core right now, and should be _rocm_sdk_libraries
  • MIOpen plugin is installed into _rocm_sdk_core, and as a result fails to find the libMIOpen.so (this is due to MIOpen being mixed host & device)

We will need to do some changes to resolve the plugin loading issue, and will follow-up with additional PRs to enable this once it's ready.

@BrianHarrisonAMD
Copy link
Copy Markdown
Contributor Author

Attempting to move hipDNN into the libraries install location for now until RFC0008 is implemented.
Re-opening to verify testing and packaging.

@BrianHarrisonAMD BrianHarrisonAMD marked this pull request as ready for review January 26, 2026 23:13
Copy link
Copy Markdown
Contributor

@adickin-amd adickin-amd left a comment

Choose a reason for hiding this comment

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

Looks good to me. Can even build hipdnn against the windows wheels!

Comment thread build_tools/packaging/python/templates/rocm/src/rocm_sdk/tests/libraries_test.py Outdated
Comment thread build_tools/packaging/python/templates/rocm/src/rocm_sdk/tests/devel_test.py Outdated
@BrianHarrisonAMD
Copy link
Copy Markdown
Contributor Author

Testing was successful with the latest, but seems like some unrelated breaks in other components.
Updating to see if these are resolved in latest.

Copy link
Copy Markdown
Contributor

@adickin-amd adickin-amd left a comment

Choose a reason for hiding this comment

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

New changes look good to me!

Comment thread ml-libs/post_hook_hipDNN.cmake Outdated
@mousdahl-amd
Copy link
Copy Markdown
Contributor

With an update to hipDNN in rocm-libraries, we've got a good signal for rocm wheels tests! Once we land this in rocm-libraries, we're just a submodule bump away from being able to land this PR, I think.

https://github.com/ROCm/TheRock/actions/runs/21755726106

@mousdahl-amd
Copy link
Copy Markdown
Contributor

I accidentally pushed some submodule bumps when I merged main in, so I've created a new PR that's not ruined forever. #3461

@mousdahl-amd
Copy link
Copy Markdown
Contributor

Closing as superceded by #3461

mousdahl-amd added a commit that referenced this pull request Feb 26, 2026
## Motivation

Add hipDNN & MIOpen plugin to the python wheel packaging.
The purpose of this change is to enable hipDNN integration with Pytorch.

This PR supercedes #2958

## Technical Details

- Added hipDNN + plugin project to the packaging script.
- Added hipdnn to _dist_info.py matching with other libraries
- Updated documentation to include details of hipDNN
- Updated build_python_packages.py to allow generic targets to be
installed alongside device targets
- For now this enables hipDNN to be installed alongside other library
components.
- Note: Once
[RFC0008](https://github.com/ROCm/TheRock/blob/main/docs/rfcs/RFC0008-Multi-Arch-Packaging.md)
is implemented then hipDNN & the plugin should be moved to the host only
locations along side the other library projects.

## Test Plan

Run a test of the Release portable Linux packages workflow & Windows
packages workflow:

Linux test wheels (run
[here](https://github.com/ROCm/TheRock/actions/runs/21262274115/job/61192506091)
unrelated jax break):
```
pip install \
  https://therock-dev-python.s3.amazonaws.com/v2/gfx94X-dcgpu/rocm-7.12.0.dev0%2Be7125827ee12837fefbd91de4b3d1a8b9f0b2425.tar.gz \
  https://therock-dev-python.s3.amazonaws.com/v2/gfx94X-dcgpu/rocm_sdk_core-7.12.0.dev0%2Be7125827ee12837fefbd91de4b3d1a8b9f0b2425-py3-none-linux_x86_64.whl \
  https://therock-dev-python.s3.amazonaws.com/v2/gfx94X-dcgpu/rocm_sdk_libraries_gfx94x_dcgpu-7.12.0.dev0%2Be7125827ee12837fefbd91de4b3d1a8b9f0b2425-py3-none-linux_x86_64.whl \
  https://therock-dev-python.s3.amazonaws.com/v2/gfx94X-dcgpu/rocm_sdk_devel-7.12.0.dev0%2Be7125827ee12837fefbd91de4b3d1a8b9f0b2425-py3-none-linux_x86_64.whl
```

Windows test wheels (run
[here](https://github.com/ROCm/TheRock/actions/runs/21262292444/job/61192570375)):
```
pip install ^
  https://therock-dev-python.s3.amazonaws.com/v2-staging/gfx110X-all/rocm-7.12.0.dev0%2Be7125827ee12837fefbd91de4b3d1a8b9f0b2425.tar.gz ^
  https://therock-dev-python.s3.amazonaws.com/v2-staging/gfx110X-all/rocm_sdk_core-7.12.0.dev0%2Be7125827ee12837fefbd91de4b3d1a8b9f0b2425-py3-none-win_amd64.whl ^
  https://therock-dev-python.s3.amazonaws.com/v2-staging/gfx110X-all/rocm_sdk_libraries_gfx110x_all-7.12.0.dev0%2Be7125827ee12837fefbd91de4b3d1a8b9f0b2425-py3-none-win_amd64.whl ^
  https://therock-dev-python.s3.amazonaws.com/v2-staging/gfx110X-all/rocm_sdk_devel-7.12.0.dev0%2Be7125827ee12837fefbd91de4b3d1a8b9f0b2425-py3-none-win_amd64.whl
```

## Test Result

Wheel builds are successful with the hipDNN artifacts included.
Additional artifacts from hipDNN are present, and installed correctly.

---------

Co-authored-by: Brian Harrison <brian.harrison@amd.com>
Co-authored-by: BrianHarrisonAMD <169072757+BrianHarrisonAMD@users.noreply.github.com>
@BrianHarrisonAMD BrianHarrisonAMD deleted the users/bharriso/hipdnn-python-packaging branch April 27, 2026 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants