Repository navigation
Studio diffusion: read ROCm through is_rocm_torch in the int8 GEMM and VAE canvas gates - #17681
Merged
Merged
Conversation
…d VAE canvas gates
Member
Author
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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
Two checks fail on main (
7bf13f2) and on every PR based on it. The(Python 3.13, a-f)and(Python 3.13, rest)shards show them on staging runs:Both reproduce locally on main (the second with
diffusersblocked).ROCm gates (#17613, #17595)
The lint is right, and both reads are real bugs on AMD SDK / Radeon wheels, which leave
torch.version.hipunset and carry the ROCm tag only intorch.__version__:getattr(torch.version, "hip", None) is None. On a tag-only ROCm wheel that is true, so the cuBLASLt-only TN layout would be sent to hipBLASLt. The comment above it says ROCm should keep the row-major copy.diffusion_vae_canvas._is_rocm()callsis_rocm_torch()with no argument. That raisesTypeError, which theexceptswallows. The fallback then readstorch.version.hip, so every call took the raw read, and a tag-only ROCm wheel got the NVIDIA tile-graph replica count.Mapped denoiser test (#17667)
test_qkv_fusion_skips_a_mapped_denoiser[True]maps the denoiser throughprepare_streamed_encoder_, which usesdiffusers.hooks.apply_layerwise_casting. The backend test shards do not installdiffusers. The bit-for-bit test in the same file already guards on it withpytest.importorskip("diffusers.hooks").Change
diffusion_torchao_patches.py:keep_transposednow uses_is_rocm_torch(torch), a small helper that callsrocm_bf16.is_rocm_torch.unsloth/import_fixes.py:_make_safe_int_mmmust stay AST-identical to the Studio copy (test_studio_copy_matches_unsloth_import_fixes). It gets the same call, plus its own_is_rocm_torchwith the same tag-aware check, so whichever copy patches torchao first behaves the same.diffusion_vae_canvas._is_rocm(): callsis_rocm_torch(torch), with no raw fallback.test_small_host_dense_denoiser.py: the mapped case callspytest.importorskip("diffusers.hooks"), like its sibling. The unmapped case still runs everywhere.Guards
test_vae_canvas_graph_replicas_see_a_tag_only_rocm_wheelandtest_vae_canvas_rocm_check_does_not_fall_back_on_a_cuda_buildintest_diffusion_rocm_tag_detect.py.test_a_tag_only_rocm_wheel_keeps_the_row_major_copyintest_torchao_int_mm_transposed.py, next to the existingtorch.version.hipcase.Testing
test_diffusion_rocm_tag_detect.py,test_torchao_int_mm_transposed.py,test_torchao_intmm_patch_wiring.py,test_small_host_dense_denoiser.py: 33 passed, 4 skipped (CUDA-only cases).diffusersblocked: main'stest_qkv_fusion_skips_a_mapped_denoiser[True]fails with the CI error; here it skips and[False]passes.