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

单测case增强4 #458

Merged
merged 4 commits into from
Sep 3, 2024
Merged

单测case增强4 #458

merged 4 commits into from
Sep 3, 2024

Conversation

Xuxuanang
Copy link
Contributor

PR Docs

单测case增强4

PR APIs

torch.nn.Transformer
torch.nn.TransformerDecoderLayer
torch.nn.TransformerEncoderLayer
torch.nn.Upsample
torch.nn.functional.embedding
torch.nn.functional.interpolate
torch.nn.functional.log_softmax
torch.nn.functional.max_pool1d
torch.nn.functional.max_pool2d
torch.nn.functional.max_pool3d
torch.nn.functional.max_unpool1d
torch.nn.functional.softmax
torch.nn.functional.upsample
torch.nn.functional.upsample_bilinear
torch.nn.functional.upsample_nearest
torch.norm
torch.optim.Adagrad
torch.optim.SGD

Copy link

paddle-bot bot commented Aug 25, 2024

Thanks for your contribution!

@paddle-bot paddle-bot bot added the contributor External developers label Aug 25, 2024
@@ -12605,7 +12608,7 @@
"min_input_args": 2
},
"torch.nn.functional.softmax": {
"Matcher": "RequireDimMatcher",
"Matcher": "SoftmaxMatcher",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RequireDimMatcher是不是没用了可以删掉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个我在之后的PR再删除吧,因为这个Matcher还涉及到其余几个单测,改动的话需要改其余几个算子的单测,要是都在这里改的话可能提交的文件有些过多了

[[1.0, 2.0, 3.0, 4.0],
[5.0, 6.0, 7.0, 8.0],
[6.0, 7.0, 8.0, 9.0]]])
model = nn.LogSoftmax(dim=None)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没有dim的情况测一下

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

testcase3就是没有dim的情况 以及这个PR修改的这个文件主要是为了防止CI报错,其实在单测case增强3这个PR中对这两个文件修改是同样的

[[1.0, 2.0, 3.0, 4.0],
[5.0, 6.0, 7.0, 8.0],
[6.0, 7.0, 8.0, 9.0]]])
model = nn.Softmax(dim=None)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没有dim的情况测一下

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

testcase3就是没有dim的情况

["result"],
check_value=False,
unsupport=True,
reason="paddle unsupport layer_norm_eps args",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

batch_first测一个

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个在testcase7中有,并且paddle貌似目前也不支持这个参数

tests/test_nn_functional_embedding.py Outdated Show resolved Hide resolved
@@ -148,3 +148,54 @@ def test_case_7():
unsupport=True,
reason="paddle unsupport batch_first args",
)


def test_case_8():
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

新加的bias参数有实质性测试到了的吗

@@ -78,3 +78,44 @@ def test_case_4():
unsupport=True,
reason="paddle unsupport batch_first args",
)


def test_case_5():
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

新加的bias参数有实质性测试到了的吗

@@ -123,3 +123,45 @@ def test_case_7():
"""
)
obj.run(pytorch_code, ["result"], check_value=False)


def test_case_8():
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

新加的bias参数有实质性测试到了的吗

Copy link
Collaborator

@zhwesky2010 zhwesky2010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhwesky2010 zhwesky2010 merged commit 6a0bdf9 into PaddlePaddle:master Sep 3, 2024
8 of 9 checks passed
@Xuxuanang Xuxuanang deleted the CaseAdd4 branch September 4, 2024 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants