Rahul Kayaith
Rahul Kayaith
Primary changes are here: https://github.com/ROCm/pytorch/pull/3216/changes/9bb87526747d20d96c79e2b0f443d981fa8355d6 This adds extra include paths to cmake, where shim headers are placed. The shim headers re-route CUDA includes to the HIP equivalent, with the necessary...
`iree-compile` fails to determine a tile size on `torch.aten.scaled_dot_product_attention` with `head_dim=1` for rocm/gfx942. ## Repro `sdpa_head_dim_1.mlir`: ```mlir module @module { func.func @main(%o_3_: !torch.tensor, %k_1: !torch.vtensor, %q_0: !torch.vtensor, %v_2: !torch.vtensor) attributes...
`iree-compile` fail to compile with `'func.func' op failed to distribute` for `torch.aten.scaled_dot_product_attention` on rocm/gfx942 for several Q/K/V shapes, all of which surface in PyTorch's `test/test_transformers.py` once SDPA is dispatched to...
Attention is outputting NaNs instead of zeroes for fully masked-out input on bf16. `sdpa_mask_nan.mlir`: ```mlir module @module { func.func @main(%attn_mask_4: !torch.vtensor, %k_1: !torch.vtensor, %q_0: !torch.vtensor, %v_2: !torch.vtensor) -> !torch.vtensor attributes...
On ROCm 7.1+ with MIOpen 3.5+, PyTorch decomposes `BatchNorm2d` with channels-last layout to `aten.miopen_batch_norm` instead of `aten._native_batch_norm_legit_functional`. torch-mlir didn't support this op, causing legalization to fail. This registers the op...
`DecomposeAtenNativeBatchNormOp` used the input dtype when reshaping `running_mean`/`running_var` from `[C]` to `[1,C,1,...]`. When the input has a different dtype from the running stats (e.g. bf16 input with f32 running stats),...
On ROCm 7.1+ (MIOpen 3.5+), PyTorch decomposes `BatchNorm2d` with channels-last inputs to `aten.miopen_batch_norm` instead of `aten._native_batch_norm_legit_functional`. torch-mlir doesn't have a lowering for this op, so it gets imported as a...
Repo: llvm/torch-mlir Title: `DecomposeAtenNativeBatchNormOp` uses wrong dtype for running stats reshape --- `DecomposeAtenNativeBatchNormOp` reshapes `running_mean` and `running_var` from `[C]` to `[1,C,1,...]` to broadcast with the input. The result type of...
`aten.view` accepts IR where the input and output element types differ (e.g., f32 input → bf16 output). This is semantically invalid — `aten.view` maps to the [shape overload of `Tensor.view`](https://docs.pytorch.org/docs/stable/generated/torch.Tensor.view.html)...
I have a pass that's creating invalid IR, but the verifier doesn't seem to be verifying it: ```cpp // pass: void runOnOperation() override { FuncOp func = getOperation(); OpBuilder b(func.body());...