-
Notifications
You must be signed in to change notification settings - Fork 5.9k
【PIR API adaptor No.14-15】Assign and Bilinear #58876
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
Closed
Closed
Changes from 4 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
a3b4147
Update assign.py
Liyulingyue f3efe79
Update Bilinear.py
Liyulingyue 61c2f3f
Update test_initializer.py
Liyulingyue d3bfb23
Apply suggestions from code review
Liyulingyue b58508d
Apply suggestions from code review
Liyulingyue c5f5f8e
Merge branch 'PaddlePaddle:develop' into 14
Liyulingyue 30dc8d0
add pir
Liyulingyue db487ac
Apply suggestions from code review
Liyulingyue 6e9c06a
Apply suggestions from code review
Liyulingyue bda4cd5
Apply suggestions from code review
Liyulingyue 7a7f61f
Apply suggestions from code review
Liyulingyue a1954f5
Apply suggestions from code review
Liyulingyue b40b729
Apply suggestions from code review
Liyulingyue 297da6e
Apply suggestions from code review
Liyulingyue File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Liyulingyue marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,7 @@ | |
| from paddle import base | ||
| from paddle.base import framework | ||
| from paddle.base.core import VarDesc | ||
| from paddle.pir_utils import test_with_pir_api | ||
| from paddle.regularizer import L2Decay | ||
|
|
||
| DELTA = 0.00001 | ||
|
|
@@ -541,6 +542,7 @@ def test_msra_initializer_bf16(self): | |
|
|
||
|
|
||
| class TestBilinearInitializer(unittest.TestCase): | ||
| @test_with_pir_api | ||
|
||
| def test_bilinear_initializer(self, dtype="float32"): | ||
| """Test the bilinear initializer with supplied arguments""" | ||
| program = framework.Program() | ||
|
|
@@ -628,6 +630,7 @@ def test_bilinear_initializer_fp16(self): | |
|
|
||
|
|
||
| class TestNumpyArrayInitializer(unittest.TestCase): | ||
| @test_with_pir_api | ||
|
||
| def test_numpy_array_initializer(self, dtype="float32"): | ||
| """Test the numpy array initializer with supplied arguments""" | ||
| import numpy | ||
|
|
@@ -876,6 +879,7 @@ def run_dynamic_graph(dtype): | |
| ) | ||
| return w | ||
|
|
||
| @test_with_pir_api | ||
| def run_static_graph(dtype): | ||
| with static_guard(): | ||
| exe = paddle.static.Executor(paddle.CPUPlace()) | ||
|
|
@@ -914,6 +918,7 @@ def run_dynamic_graph(dtype): | |
| ) | ||
| return w | ||
|
|
||
| @test_with_pir_api | ||
| def run_static_graph(dtype): | ||
| with static_guard(): | ||
| exe = paddle.static.Executor(paddle.CPUPlace()) | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.