Summary:
The Quack RMSNorm override in _native/ops/norm/rmsnorm_impl.py is selected for any tensor whose dtype is fp16/bf16/fp32 and whose torch.cuda.get_device_capability major is 9 or 10.
Two cases slip through that shouldn't:
- ROCm builds (e.g. MI300x).
get_device_capabilityon gfx942 returnsmajor=9, matching the H100 check, so the dispatcher routes to Quack - a CUTLASS/CUDA-only kernel that has no business running on AMD. - CPU tensors.
_is_supportednever checksinput.device.type. When a CPU tensor is passed (e.g. during the FXInterpreter.runinsplitting/utils.py:remove_unexpected_type_cast),get_device_capabilityreports the current CUDA device's capability, the cond passes, and the kernel crashes withValueError: Mismatched Tensor ... expected device_type=cuda.
Test Plan: This fixed 3 tests internally
Differential Revision: D106733305
Pull Request resolved: #185644
Approved by: https://github.com/desertfire
SOCIAL SHARE CARD GENERATOR