Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【PIR API adaptor No.302】 Migrate paddle.nn.Softmax2D into pir #60247

Merged
merged 1 commit into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion python/paddle/tensor/manipulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1580,7 +1580,7 @@ def rot90(x, k=1, axes=[0, 1], name=None):
"""

helper = LayerHelper("rot90", **locals())
check_type(x, 'X', (Variable, paddle.pir.OpResult), 'rot90')
check_type(x, 'X', (Variable, paddle.pir.Value), 'rot90')
dtype = helper.input_dtype('x')
check_dtype(
dtype,
Expand Down
3 changes: 3 additions & 0 deletions test/legacy_test/test_softmax2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import paddle
from paddle.base import core
from paddle.pir_utils import test_with_pir_api


class TestSoftmax2DAPI(unittest.TestCase):
Expand All @@ -32,6 +33,7 @@ def setUp(self):
else paddle.CPUPlace()
)

@test_with_pir_api
def test_static_api(self):
paddle.enable_static()
with paddle.static.program_guard(paddle.static.Program()):
Expand Down Expand Up @@ -108,6 +110,7 @@ def setUp(self):
else paddle.CPUPlace()
)

@test_with_pir_api
def test_static_error(self):
paddle.enable_static()
with paddle.static.program_guard(paddle.static.Program()):
Expand Down