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]Migrate Conv2DTranspose into pir #58416

Merged
merged 8 commits into from
Nov 2, 2023

Conversation

0x45f
Copy link
Contributor

@0x45f 0x45f commented Oct 26, 2023

PR types

Others

PR changes

Others

Description

[PIR]Migrate Conv2DTranspose into pir
涉及到两个相关单测的修改

  • test_conv2d_transpose_layer.py:新增了一个pir的单测case,没有改动原来的单测,因为原来的单测中调用了static.nn.xx下的静态图专用接口,这类接口没有适配
  • test_conv2d_transpose_op.py: TestConv2DTransposeAPI、TestConv2DTransposeOpException调用了paddle.static.nn.conv2d_transpose接口,没有打开;TestTensorOutputSize1单测中调用了save_inference_model,目前不支持save,没有打开。其他的继承自OpTest的单测都已经打开了
  • test_conv2d_transpose_mkldnn_op:这个文件中mkldnn的单测没有打开,打开后精度无法对齐

Pcard-67164

@paddle-bot
Copy link

paddle-bot bot commented Oct 26, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot bot added the contributor External developers label Oct 26, 2023
def runTest(self):
place = base.CPUPlace()
self._test_equivalence(place)

if base.core.is_compiled_with_cuda():
Copy link
Contributor Author

Choose a reason for hiding this comment

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

在self._test_equivalence函数内会重新设置place为CPUPlace,所以这个case相当于跑了两次CPU测试。如果跑GPU测试的话在CI上会有精度问题,所以在这个PR中删除了GPU的测试代码。

self.check_output_with_place(
place,
atol=1e-5,
check_dygraph=(not self.use_mkldnn),
Copy link
Contributor

Choose a reason for hiding this comment

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

感觉如果是mkldnn单测的话,这里是不是没有啥意义

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这里我是直接把父类的函数copy过来了~

Copy link
Contributor

@YuanRisheng YuanRisheng Nov 2, 2023

Choose a reason for hiding this comment

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

子类既然是单独去测mkldnn的,那copy过来的代码继续加check_dygraph=(not self.use_mkldnn)本身没啥意义,是不是应该默认就关闭check dygraph的检查呢,不然会对后边看到代码的人造成困扰

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修改一下,感谢~

@phlrain phlrain self-requested a review November 2, 2023 06:12
@0x45f 0x45f merged commit d144f5c into PaddlePaddle:develop Nov 2, 2023
28 checks passed
@0x45f 0x45f deleted the pir-Conv2DTranspose branch November 2, 2023 06:22
@paddle-bot paddle-bot bot removed the contributor External developers label Nov 3, 2023
zeroRains pushed a commit to zeroRains/Paddle that referenced this pull request Nov 8, 2023
danleifeng pushed a commit to danleifeng/Paddle that referenced this pull request Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants