Unverified Commit cc42a577 authored by jberchtold-nvidia's avatar jberchtold-nvidia Committed by GitHub
Browse files

[JAX] Make test_layer.py tolerances stricter (#2306)



* wip
Signed-off-by: default avatarJeremy Berchtold <jberchtold@nvidia.com>

* wip
Signed-off-by: default avatarJeremy Berchtold <jberchtold@nvidia.com>

* revert change to utils.py
Signed-off-by: default avatarJeremy Berchtold <jberchtold@nvidia.com>

---------
Signed-off-by: default avatarJeremy Berchtold <jberchtold@nvidia.com>
parent 14b53313
...@@ -552,7 +552,7 @@ class BaseTester: ...@@ -552,7 +552,7 @@ class BaseTester:
"""Test forward with fp8 enabled""" """Test forward with fp8 enabled"""
# Empty MeshResource is used as we are running on a single device # Empty MeshResource is used as we are running on a single device
with autocast(enabled=True, recipe=fp8_recipe, mesh_resource=MeshResource()): with autocast(enabled=True, recipe=fp8_recipe, mesh_resource=MeshResource()):
self.runner(attrs).test_forward(data_shape, dtype, rtol=1e-4, atol=1e-3) self.runner(attrs).test_forward(data_shape, dtype)
@pytest.mark.skipif(not is_fp8_supported, reason=reason) @pytest.mark.skipif(not is_fp8_supported, reason=reason)
@pytest.mark.parametrize("fp8_recipe", QUANTIZE_RECIPES) @pytest.mark.parametrize("fp8_recipe", QUANTIZE_RECIPES)
...@@ -560,7 +560,7 @@ class BaseTester: ...@@ -560,7 +560,7 @@ class BaseTester:
"""Test backward with fp8 enabled""" """Test backward with fp8 enabled"""
# Empty MeshResource is used as we are running on a single device # Empty MeshResource is used as we are running on a single device
with autocast(enabled=True, recipe=fp8_recipe, mesh_resource=MeshResource()): with autocast(enabled=True, recipe=fp8_recipe, mesh_resource=MeshResource()):
self.runner(attrs).test_backward(data_shape, dtype, rtol=1e-4, atol=1e-3) self.runner(attrs).test_backward(data_shape, dtype)
class TestEncoderLayer(BaseTester): class TestEncoderLayer(BaseTester):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment