-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AddOp(linalg_vector_norm) | feat(torchlib) (#908)
Also updated the should_skip_xfail logic in test to account for data types. ## Notes Have to skip one kind of test case: ord=6, dtype=float16. In Pytorch: ``` >>> b tensor([[2.3730, 0.9316, 0.6240, 6.1523, 0.1758], [5.3984, 7.9375, 4.9062, 1.8809, 6.1016], [4.0234, 8.2344, 3.2695, 0.8701, 1.3447]], dtype=torch.float16) >>> la.vector_norm(a, dim=0, ord=6) tensor([5.5483, 9.0838, 4.9754, 6.1532, 6.1017]) >>> la.vector_norm(b, dim=0, ord=6) tensor([5.5469, inf, 4.9727, 6.1523, 6.0977], dtype=torch.float16) >>> ``` But in ORT, the result is: ``` tensor([5.5469, 9.08, 4.9727, 6.1523, 6.0977], dtype=loat16) ``` the second element ```9.08``` should be ```inf```. It works in eager mode, failed in FullGraph mode only. --------- Co-authored-by: Justin Chu <[email protected]>
- Loading branch information
1 parent
f51abd2
commit 241260f
Showing
3 changed files
with
100 additions
and
7 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
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
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