Skip to content

[Zero-Dim] support 0d tensor for shape and squeeze onednn kernel#52832

Merged
zhwesky2010 merged 2 commits into
PaddlePaddle:developfrom
YangQun1:yangqun/support-0d-tensor-for-shape-squeeze
Apr 24, 2023
Merged

[Zero-Dim] support 0d tensor for shape and squeeze onednn kernel#52832
zhwesky2010 merged 2 commits into
PaddlePaddle:developfrom
YangQun1:yangqun/support-0d-tensor-for-shape-squeeze

Conversation

@YangQun1
Copy link
Copy Markdown
Contributor

PR types

New features

PR changes

OPs

Describe

Fix #51364
Support 0-d tensor for shape and squeeze onednn kernel

@paddle-bot
Copy link
Copy Markdown

paddle-bot Bot commented Apr 12, 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why add to this?

Copy link
Copy Markdown
Contributor Author

@YangQun1 YangQun1 Apr 14, 2023

Choose a reason for hiding this comment

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

without this change, squeeze needs the input tensor to have at least 100 elements. otherwise, the ut will fail during teardown. But I'm not sure about why we have this constraint in python/paddle/fluid/tests/unittests/eager_op_test.py:431

AssertionError: Input's shape should be large than or equal to 100 for squeeze Op.

@zhwesky2010
Copy link
Copy Markdown
Contributor

zhwesky2010 commented Apr 14, 2023

@YangQun1 CI has failed, need to fix, we need this PR, because squeeze will change to 0D this or next week.

@YangQun1 YangQun1 force-pushed the yangqun/support-0d-tensor-for-shape-squeeze branch from a8b1b1d to 84acef2 Compare April 14, 2023 07:52
@zhwesky2010
Copy link
Copy Markdown
Contributor

AssertionError: Detect there is KernelSignature for `shape` op, please set the `self.python_api` if you set check_dygraph = True

@YangQun1 YangQun1 force-pushed the yangqun/support-0d-tensor-for-shape-squeeze branch from 84acef2 to 119983b Compare April 17, 2023 02:53
@YangQun1 YangQun1 force-pushed the yangqun/support-0d-tensor-for-shape-squeeze branch from 119983b to 5c31019 Compare April 17, 2023 05:27
@onecatcn onecatcn assigned onecatcn and zyfncg and unassigned onecatcn Apr 17, 2023
@YangQun1
Copy link
Copy Markdown
Contributor Author

@zhouwei25 Hi, there is a trt case failed in PR-CI-Coverage, it seems to not related to onednn:

2023-04-17 15:19:46 The following tests FAILED:
2023-04-17 15:19:46 	1766 - test_trt_convert_yolo_box (Failed)

Copy link
Copy Markdown
Contributor

@hong19860320 hong19860320 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 c0a604e into PaddlePaddle:develop Apr 24, 2023
lijialin03 pushed a commit to lijialin03/Paddle that referenced this pull request Apr 25, 2023
…dlePaddle#52832)

* support 0d tensor for shape and squeeze onednn kernel

* set python api for shape op ut
zhwesky2010 pushed a commit to zhwesky2010/Paddle that referenced this pull request May 8, 2023
…dlePaddle#52832)

* support 0d tensor for shape and squeeze onednn kernel

* set python api for shape op ut
XiaoguangHu01 pushed a commit that referenced this pull request May 9, 2023
#53601)

* [Zero-Dim] fix functool.reduce more safe with intial value, to support empty list (#53182)

* [Zero-Dim] support 0d tensor for shape and squeeze onednn kernel (#52832)

* support 0d tensor for shape and squeeze onednn kernel

* set python api for shape op ut

* [Zero-Dim] distributed scatter/all_to_all support input 0D tensor (#53186)

* [Zero-Dim] Support paddle.sum/mean/loss api output 0D,test=allcase (#52739)

* [CINN Support 0D-Tensor] CINN supports 0D-Tensor with trick temporarily (#53382)

* [CINN Support 0D-Tensor] CINN supports 0D-Tensor with trick temporarily

* Add unittest

* [CINN Support 0D-Tensor] CINN hack squeeze2 with trick temporarily (#53454)

* fix test_autograd_dynamic (#53473)

Co-authored-by: zhwesky2010 <[email protected]>

---------

Co-authored-by: YangQun <[email protected]>
Co-authored-by: HongyuJia <[email protected]>
Co-authored-by: HydrogenSulfate <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers Intel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

oneDNN operators need to support 0D Tensor

6 participants