|
39 | 39 | import copy
|
40 | 40 | import dataclasses
|
41 | 41 | import functools
|
| 42 | +import sys |
42 | 43 | from typing import Any, Callable, Collection, Optional
|
43 | 44 |
|
44 | 45 | import numpy as np
|
@@ -726,7 +727,10 @@ def _where_input_wrangler(
|
726 | 727 | # TorchLibOpInfo("copy", core_ops.aten_copy), # copy is not in OPS_DB
|
727 | 728 | TorchLibOpInfo("cos", core_ops.aten_cos),
|
728 | 729 | TorchLibOpInfo("cosh", core_ops.aten_cosh),
|
729 |
| - TorchLibOpInfo("cross", core_ops.aten_cross, tolerance={torch.float16: (6e-3, 3e-3)}), |
| 730 | + TorchLibOpInfo("cross", core_ops.aten_cross, tolerance={torch.float16: (6e-2, 2e-1)}).skip( |
| 731 | + dtypes=(torch.float16 if sys.platform != "linux" else torch.complex64,), |
| 732 | + reason="fixme: test is failing on windows and torch nightly", |
| 733 | + ), |
730 | 734 | TorchLibOpInfo("deg2rad", core_ops.aten_deg2rad),
|
731 | 735 | # TorchLibOpInfo("detach", core_ops.aten_detach), # detach is not in OP-TEST-DB
|
732 | 736 | TorchLibOpInfo("diagonal", core_ops.aten_diagonal),
|
@@ -797,6 +801,9 @@ def _where_input_wrangler(
|
797 | 801 | TorchLibOpInfo(
|
798 | 802 | "full_like",
|
799 | 803 | core_ops.aten_full_like,
|
| 804 | + ).skip( |
| 805 | + enabled_if=ops_test_common.IS_MACOS, |
| 806 | + reason="fixme: memory allocation issue on CI", |
800 | 807 | ),
|
801 | 808 | TorchLibOpInfo("gather", core_ops.aten_gather).skip(
|
802 | 809 | matcher=lambda sample: sample.input.numel() == 0 or sample.args[1].numel() == 0,
|
@@ -1026,8 +1033,11 @@ def _where_input_wrangler(
|
1026 | 1033 | TorchLibOpInfo(
|
1027 | 1034 | "ops.aten.embedding_bag",
|
1028 | 1035 | core_ops.aten_embedding_bag,
|
1029 |
| - tolerance={torch.float16: (1e-2, 5e-2)}, |
| 1036 | + tolerance={torch.float32: (1e-4, 5e-4)}, |
1030 | 1037 | compare_shape_only_for_output=(1, 2, 3),
|
| 1038 | + ).skip( |
| 1039 | + dtypes=(torch.float16,), |
| 1040 | + reason="fixme: results mismatch in torch nightly.", |
1031 | 1041 | ),
|
1032 | 1042 | TorchLibOpInfo(
|
1033 | 1043 | "ops.aten.embedding_bag.padding_idx",
|
@@ -1584,9 +1594,18 @@ def _where_input_wrangler(
|
1584 | 1594 | "ops.aten.layer_norm",
|
1585 | 1595 | core_ops.aten_layer_norm,
|
1586 | 1596 | tolerance={torch.float32: (3.7e-5, 1.8e-4)},
|
1587 |
| - ).xfail( |
| 1597 | + ) |
| 1598 | + .xfail( |
1588 | 1599 | dtypes=(torch.int64,),
|
1589 | 1600 | reason="fixme: ORT `LayerNormKernelImpl` not implemented for int64",
|
| 1601 | + ) |
| 1602 | + .skip( |
| 1603 | + matcher=lambda sample: sample.input.shape[-1] <= 1, |
| 1604 | + reason="fixme: onnxruntime fail when no reduction is needed", |
| 1605 | + ) |
| 1606 | + .skip( |
| 1607 | + dtypes=(torch.float32 if sys.platform != "linux" else torch.complex64,), |
| 1608 | + reason="fixme: test is unstable on macosx, windows", |
1590 | 1609 | ),
|
1591 | 1610 | TorchLibOpInfo("logit", core_ops.aten_logit, tolerance={torch.float16: (1e-1, 7e-4)}),
|
1592 | 1611 | TorchLibOpInfo("max_dim", core_ops.aten_max_dim)
|
@@ -1694,10 +1713,10 @@ def _where_input_wrangler(
|
1694 | 1713 | core_ops.aten_native_layer_norm,
|
1695 | 1714 | tolerance={torch.float32: (3.7e-5, 1.8e-4), torch.float16: (1e-1, 7e-4)},
|
1696 | 1715 | )
|
1697 |
| - .xfail( |
| 1716 | + .skip( |
1698 | 1717 | dtypes=(torch.float32,),
|
1699 |
| - matcher=lambda sample: len(sample.input.shape) == 1, |
1700 |
| - enabled_if=ops_test_common.IS_MACOS, |
| 1718 | + matcher=lambda sample: sample.input.shape[-1] <= 1, |
| 1719 | + # enabled_if=ops_test_common.IS_MACOS, |
1701 | 1720 | reason="fixme: result mismatch. https://github.com/microsoft/onnxruntime/issues/20676",
|
1702 | 1721 | )
|
1703 | 1722 | .skip(
|
|
0 commit comments