Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
4 changes: 2 additions & 2 deletions python/paddle/amp/debugging.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from paddle.base import core
from paddle.base.framework import dygraph_only

from ..framework import LayerHelper, in_dynamic_mode
from ..framework import LayerHelper, in_dynamic_or_pir_mode

__all__ = [
"DebugMode",
Expand Down Expand Up @@ -372,7 +372,7 @@ def check_numerics(
stack_height_limit = -1
output_dir = ""

if in_dynamic_mode():
if in_dynamic_or_pir_mode():
return _C_ops.check_numerics(
tensor,
op_type,
Expand Down
2 changes: 2 additions & 0 deletions test/legacy_test/test_nan_inf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import numpy as np

import paddle
from paddle.pir_utils import test_with_pir_api


class TestNanInfBase(unittest.TestCase):
Expand Down Expand Up @@ -299,6 +300,7 @@ def test_eager(self):
debug_mode=paddle.amp.debugging.DebugMode.CHECK_ALL,
)

@test_with_pir_api

This comment was marked as resolved.

def test_static(self):
paddle.enable_static()
shape = [8, 8]
Expand Down