fix(runtime): defer MIOpen handle fetch for vendor-BLAS-disabled elem… - #619
Open
amd-mah wants to merge 1 commit into
Open
fix(runtime): defer MIOpen handle fetch for vendor-BLAS-disabled elem…#619amd-mah wants to merge 1 commit into
amd-mah wants to merge 1 commit into
Conversation
amd-mah
requested review from
amd-mingw,
edelaye,
fhanuman,
qianglin-amd and
wcy123
as code owners
July 31, 2026 11:51
|
Thanks for opening a PR! This project follows LLVM's incremental-development and AI-tool-use Before requesting review, please check that:
Reviewers are assigned through |
L2 Accuracy Results (EP vs CPU)
Threshold: 0.01 | Run: 3507 - Commit: |
MorphiZen EP Performance Results
EPContext Export Performance
EPContext Import Performance
OGA Benchmark Results
OGA Wheel Smoke (Python benchmark_e2e.py)
Run: 3507 - Commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Defer the MIOpen handle fetch in
wrap_miopenOpTensoruntil after the integerand float/half fast paths, so element-wise ADD/MUL/MIN/MAX run on builds that
disable the vendor backends (
HIPDNN_EP_DISABLE_VENDOR_BLAS, e.g. thefunctional-model build).
Why
wrap_miopenOpTensorfetched the MIOpen handle at the top of the function andreturned
-1when it was null. Builds that disable the vendor backends leavethe handle null by design and expect ADD/MUL/MIN/MAX to be served entirely by
the custom kernels. The early null check aborted those ops even though they
never touch MIOpen, so element-wise subgraphs failed on the functional-model
build.
What
wrap_miopenOpTensor.fallback that actually uses it, after the integer and float/half fast paths
have had their chance to return.
Test plan
pre-commit run --files lib/Runtime/real/elementwise.cpp— all hooks pass(clang-format, license header, whitespace/EOL checks).
ADD/MUL/MIN/MAX, per CONTRIBUTING's "prove GPU execution" guidance.>
Notes for reviewers
Only the vendor-BLAS-disabled path changes; when the handle is non-null the
MIOpen fallback behaves exactly as before.
Checklist