Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tests/graph_optimization/test_graph_opt_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ class TestGraphOptBackend(unittest.TestCase):
"""

def setUp(self):
paddle.seed(2025)

"""Set up test fixtures, compute baseline once for all tests"""
# Setup common test data that will be reused across all tests
self.input_shape = (4, 8)
Expand Down Expand Up @@ -177,9 +179,11 @@ def _run_model_test(self, fd_config, test_name, compare_with_baseline=True):
self.baseline_result,
output.numpy(),
err_msg=f"Test {test_name} failed: output mismatch",
atol=1e-6, # for CINN
atol=1e-4, # for CINN
rtol=1e-2,
)

def tearDown(self):
paddle.jit.sot.opcode_translator.executor.executor_cache.OpcodeExecutorCache().clear()

def test_dynamic_graph(self):
Expand Down
Loading