Skip to content

[AMD] Fix QuantizedTensor import for ROCm TransformerEngine 2.8 - #58

Merged
guapisolo merged 2 commits into
radixark:miles-mainfrom
XinyuJiangCMU:pr/fused-adam-te28-quantized-tensor-20260617
Jun 18, 2026
Merged

[AMD] Fix QuantizedTensor import for ROCm TransformerEngine 2.8#58
guapisolo merged 2 commits into
radixark:miles-mainfrom
XinyuJiangCMU:pr/fused-adam-te28-quantized-tensor-20260617

Conversation

@XinyuJiangCMU

Copy link
Copy Markdown

Summary

ROCm TransformerEngine 2.8 moved QuantizedTensor from transformer_engine.pytorch.quantized_tensor to transformer_engine.pytorch.tensor.

This caused checkpoint loading with --low-memory-resume to fail with ModuleNotFoundError.

This change uses the new import path first and falls back to the old path for compatibility with other TransformerEngine versions. NVIDIA behavior is unchanged.

Testing

Verified on 8 MI355X GPUs with:

tests/e2e/ckpt/test_qwen3_4B_ckpt.py

The complete save / load / async_save / load sequence passes. Both load stages report matching model hashes at iteration 2.

Before this change, the first load stage failed while importing QuantizedTensor.

XinyuJiangCMU and others added 2 commits June 17, 2026 18:54
…w-memory-resume patch

QuantizedTensor moved from transformer_engine.pytorch.quantized_tensor to
transformer_engine.pytorch.tensor in TE 2.x; try the new path and fall back
to the old one so both TE layouts work.

Co-authored-by: Zhiyao Jiang <jessicajiang324@gmail.com>
Co-authored-by: Zhiyao Jiang <jessicajiang324@gmail.com>

@guapisolo guapisolo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

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.

2 participants