Skip to content

Commit

Permalink
[fix ci] Disable macos tests for native_layer_norm_float32 (#1538)
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhambhokare1 authored May 14, 2024
1 parent fe9f29a commit ebee154
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tests/function_libs/torch_lib/ops_test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import multiprocessing
import os
import pprint
import sys
import unittest
import warnings
from typing import (
Expand Down Expand Up @@ -56,6 +57,7 @@
)

TEST_OPSET_VERSION = 18
IS_MACOS = sys.platform.startswith("darwin")
IS_WINDOWS = os.name == "nt"


Expand Down
9 changes: 8 additions & 1 deletion tests/function_libs/torch_lib/ops_test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1932,7 +1932,14 @@ def _where_input_wrangler(
core_ops.aten_native_layer_norm,
trace_only=True,
tolerance={torch.float32: (3.7e-5, 1.8e-4), torch.float16: (1e-1, 7e-4)},
).skip(
)
.xfail(
dtypes=(torch.float32,),
matcher=lambda sample: len(sample.input.shape) == 1,
enabled_if=ops_test_common.IS_MACOS and version_utils.onnxruntime_older_than("1.18"),
reason="fixme: result mismatch. https://github.com/microsoft/onnxruntime/issues/20676",
)
.skip(
dtypes=(torch.float16,),
device_type="cpu",
reason="native_layer_norm outputs different dtypes on CPU and CUDA. Our implematation is based on that for CUDA",
Expand Down

0 comments on commit ebee154

Please sign in to comment.