Arm backend: Add bf16 support for aten.index_select and aten.unfold_copy#19751
Conversation
Follow-up to pytorch#17097, which added BF16 support to the TOSA GATHER op. Both ops lower via TOSA GATHER but their support checks were not updated at the time.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19751
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (4 Unrelated Failures)As of commit 01ab271 with merge base b73df0b ( FLAKY - The following job failed but was likely due to flakiness present on trunk:
BROKEN TRUNK - The following jobs failed but was present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
|
|
|
This PR needs a
|
zingo
left a comment
There was a problem hiding this comment.
Hi, Thanks a lot for the fix! Feel free to submit/merge it.
If you cannot let us know and I/we can press the button!
|
@pytorchbot merge |
|
Mergebot is not configured for this repository. Please use the merge button provided by GitHub. |
|
Thanks! @zingo It looks like mergebot isn't configured for this repository, and I don't have access to the GitHub merge button. Could you merge it for me? |
|
Ill merge, thanks for the help.🙏 |
Follow-up to #17097, which added BF16 support to the TOSA GATHER op.
aten.index_selectandaten.unfold_copyboth lower via TOSA GATHERbut their support checks were not updated at the time.
In both decompositions(
DecomposeIndexSelectToGatherPass()andDecomposeUnfoldToGatherPass()),the bf16 values tensor flows through dtype-agnostic reshape ops and
tosa.GATHER, which acceptsBF16.The support check was the only blocker.
aten.gatheraten.index.Tensoraten.slice_copyaten.index_selectaten.unfold_copyChanges:
index_select_support.py,unfold_copy_support.py: extend float branchto include
bfloat16; add bf16 extension guard; update rejection message.test_index_select.py,test_unfold_copy.py: add isolated_tosa_FP_bf16test functions usingTosaPipelineFP(..., tosa_extensions=["bf16"]).Test plan
test_index_select_tosa_FP_bf16andtest_unfold_copy_tosa_FP_bf16exercise the bf16 path end-to-end through
TosaPipelineFPwith the bf16extension enabled, following the same pattern of the existing
test_slice_tensor_tosa_FP_bf16from #17492cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani