Uplift third_party/tt-mlir to b4405d0fdb860345e7c21699043bafa768ae085b 2024-12-24 #199
GitHub Actions / TT-XLA Tests
failed
Dec 18, 2024 in 0s
352 tests run, 333 passed, 17 skipped, 2 failed.
Annotations
Check failure on line 114 in tests/TTIR/test_basic_ops.py
github-actions / TT-XLA Tests
test_basic_ops.test_div_op[input_shapes1-0.35]
AssertionError: PCC is 0.12042849510908127 which is less than 0.99
Raw output
input_shapes = [(3, 3, 3), (3, 3, 3)], required_atol = 0.35
@pytest.mark.parametrize(
["input_shapes", "required_atol"],
[([(3, 3), (3, 3)], 0.01), ([(3, 3, 3), (3, 3, 3)], 35e-2)],
)
def test_div_op(input_shapes, required_atol):
def module_div(a, b):
return a / b
> verify_module(module_div, input_shapes, required_atol=required_atol)
tests/TTIR/test_basic_ops.py:114:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/infrastructure.py:84: in verify_module
compare_tensor_to_golden(res, res_cpu, required_pcc, required_atol)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tensor = Array([[[8.12336028e-01, 1.03518391e+00, 9.04765546e-01],
[7.74874544e+00, 5.03910780e-01, 5.05351067e-01],
...383330e-04, 4.52847336e-04, 1.31704623e-03],
[2.23474130e-02, 2.70953373e-04, 3.83235834e-04]]], dtype=float32)
golden = Array([[[8.1233597e-01, 1.0351859e+00, 9.0476555e-01],
[7.7487454e+00, 5.0391078e-01, 5.0535107e-01],
... [1.2780575e+00, 1.5524986e+00, 5.8713937e+00],
[7.5413010e+01, 7.9456836e-01, 1.0107306e+00]]], dtype=float32)
required_pcc = 0.99, required_atol = 0.35, assert_on_error = True
def compare_tensor_to_golden(
tensor, golden, required_pcc=0.99, required_atol=1e-2, assert_on_error=True
):
ret = True
if tensor.device != golden.device:
tensor = jax.device_put(tensor, golden.device)
ret = ret and tensor.shape == golden.shape
if assert_on_error:
assert ret, "Shapes do not match"
if not tensor.flatten().size == 1: # pcc invalid for scalar values
pcc = jnp.min(jnp.corrcoef(tensor.flatten(), golden.flatten()))
ret = ret and (
pcc >= required_pcc or (tensor.flatten() == golden.flatten()).all()
)
if assert_on_error:
> assert ret, f"PCC is {pcc} which is less than {required_pcc}"
E AssertionError: PCC is 0.12042849510908127 which is less than 0.99
tests/infrastructure.py:56: AssertionError
Check failure on line 306 in tests/TTIR/test_basic_ops.py
github-actions / TT-XLA Tests
test_basic_ops.test_remainder_op_lax[input_shapes0]
AssertionError: PCC is -0.5897884964942932 which is less than 0.99
Raw output
input_shapes = [(32, 32), (32, 32)]
@pytest.mark.parametrize(
"input_shapes",
[
[(32, 32), (32, 32)],
pytest.param(
[(3, 3), (3, 3)],
marks=pytest.mark.skip(
reason="Fails due to https://github.com/tenstorrent/tt-xla/issues/70"
),
),
pytest.param(
[(3, 3, 3), (3, 3, 3)],
marks=pytest.mark.skip(
reason="Fails due to https://github.com/tenstorrent/tt-xla/issues/70"
),
),
],
)
def test_remainder_op_lax(input_shapes):
def module_remainder_lax(a, b):
return jax.lax.rem(a, b)
> verify_module(module_remainder_lax, input_shapes, required_atol=0.02)
tests/TTIR/test_basic_ops.py:306:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/infrastructure.py:84: in verify_module
compare_tensor_to_golden(res, res_cpu, required_pcc, required_atol)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tensor = Array([[-2.1324447e+09, 6.4827883e-01, -1.6852636e+09, ...,
-1.7396155e+09, 3.0123222e-01, 2.7203214e-01],
...1369e-02, -1.4744535e+09, -1.4079360e+09, ...,
-1.1824051e+09, -2.1299971e+09, 1.7169273e-01]], dtype=float32)
golden = Array([[0.48858345, 0.07233179, 0.14556384, ..., 0.24919903, 0.05631757,
0.27203214],
[0.8987994 , 0.03...0214579],
[0.07729137, 0.59417474, 0.40422392, ..., 0.0072273 , 0.40877748,
0.17169273]], dtype=float32)
required_pcc = 0.99, required_atol = 0.02, assert_on_error = True
def compare_tensor_to_golden(
tensor, golden, required_pcc=0.99, required_atol=1e-2, assert_on_error=True
):
ret = True
if tensor.device != golden.device:
tensor = jax.device_put(tensor, golden.device)
ret = ret and tensor.shape == golden.shape
if assert_on_error:
assert ret, "Shapes do not match"
if not tensor.flatten().size == 1: # pcc invalid for scalar values
pcc = jnp.min(jnp.corrcoef(tensor.flatten(), golden.flatten()))
ret = ret and (
pcc >= required_pcc or (tensor.flatten() == golden.flatten()).all()
)
if assert_on_error:
> assert ret, f"PCC is {pcc} which is less than {required_pcc}"
E AssertionError: PCC is -0.5897884964942932 which is less than 0.99
tests/infrastructure.py:56: AssertionError
Loading