-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
_foreach_norm: Align with PyTorch operator semantics on allocation sc…
…heme of return tensors (#709) PyTorch requires separate copies returned in foreach_norm. The existing XPU implementation follows an out-of-date allocation scheme, to share storage among returned tensor. In latest PyTorch unit test, the behavior is not allowed. related case: - test_dispatch_meta_outplace__foreach_norm_xpu_bfloat16 - test_dispatch_meta_outplace__foreach_norm_xpu_float - test_dispatch_symbolic_meta_outplace__foreach_norm_xpu_bfloat16 - test_dispatch_symbolic_meta_outplace__foreach_norm_xpu_float - test_dispatch_symbolic_meta_outplace_all_strides__foreach_norm_xpu_float32 - test_meta_outplace__foreach_norm_xpu_bfloat16 - test_meta_outplace__foreach_norm_xpu_float --------- Co-authored-by: Feng Yuan <[email protected]>
- Loading branch information
1 parent
5a47831
commit 7eb5219
Showing
1 changed file
with
46 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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