Skip to content

feat(setup): reuse prebuilt wheel hipDNN, MIOpen, and hipBLASLt plugins by default - #148

Draft
SamuelReeder wants to merge 1 commit into
mainfrom
users/sareeder/hybrid-prebuilt-hipdnn
Draft

SamuelReeder wants to merge 1 commit into
mainfrom
users/sareeder/hybrid-prebuilt-hipdnn

Conversation

@SamuelReeder

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #147 (rocm-pin.json): reuse the prebuilt hipDNN, miopen_plugin, and hipblaslt_plugin binaries already shipped inside the pinned ROCm SDK wheels (rocm-sdk-libraries + rocm-sdk-devel) instead of rebuilding them from source on every setup.

Behavior

  • Linux default (hybrid): Detects prebuilt hipDNN SDK CMake configs (hipdnn_{frontend,backend,data_sdk,flatbuffers_sdk,plugin_sdk}Config.cmake in install_prefix or toolchain_prefix) plus libhipdnn_backend.so, libmiopen_plugin.so, and libhipblaslt_plugin.so in install_prefix. When present and rocm-libraries/ matches the pinned commit with no local edits under projects/hipdnn, dnn-providers/miopen-provider, or dnn-providers/hipblaslt-provider, configures rocm-libraries with -DROCM_LIBS_ENABLE_COMPONENTS=hip-kernel-provider only (for rocKE + kernel ingestor, which TheRock builds OFF) and builds the hipdnn_frontend Python bindings against the wheel's hipDNN SDK.
  • Windows default (hybrid): Because Windows keeps rocKE/ingestor OFF, when hip_kernel_provider.dll is also present in install_prefix and no --cmake-arg is passed, skips the C++ superbuild completely and builds only the hipdnn_frontend Python bindings.
  • Full source build fallback: Still builds all 4 components (hipdnn;miopen-provider;hipblaslt-provider;hip-kernel-provider) whenever:
    • --build-from-source is passed (rejected alongside --reuse-artifacts),
    • --rocm-libraries-ref <sha> is passed,
    • an existing rocm-libraries/ checkout is at a different commit than the pin or has local edits under projects/hipdnn, dnn-providers/miopen-provider, or dnn-providers/hipblaslt-provider, or
    • the selected prefix/toolchain does not already contain prebuilt hipDNN SDK configs and plugins.
  • --reuse-artifacts compatibility: Checks both install_prefix and toolchain_prefix for hipDNN CMake configs so --reuse-artifacts works after a hybrid setup (where CMake configs remain in rocm-sdk-devel).

Verification

  • uvx black==25.12.0 --check setup_env.py tests/unit/test_setup_env.py — clean.
  • pytest tests/unit/test_setup_env.py tests/unit/test_bump_rocm_pin.py -q — 176 passed, 1 skipped (including 10 new unit tests for Linux/Windows hybrid mode, --build-from-source, --rocm-libraries-ref, local-edit fallback, missing-plugin fallback, and --reuse-artifacts split-prefix lookup).
  • End-to-end hybrid build and GPU execution verified by CI (check-deserialize + gpu-tests (gfx950, full suite)).

@SamuelReeder
SamuelReeder force-pushed the users/sareeder/hybrid-prebuilt-hipdnn branch from f68d4db to 5f9b399 Compare November 24, 2026 17:41
@SamuelReeder
SamuelReeder force-pushed the users/sareeder/hybrid-prebuilt-hipdnn branch from 5f9b399 to 39e6790 Compare November 24, 2026 17:47
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.

1 participant