Skip to content

Conversation

@zoooo0820
Copy link
Contributor

@zoooo0820 zoooo0820 commented Dec 22, 2023

PR types

Performance optimization

PR changes

Others

Description

Pcard-66985

For basic getitem case if slice is set but it cover the all element in the axis. e.g.x[:10] if x.shape=(4,3,2). The result is same to x. We can add a fast path for this case to speed up models.

Different with dynamic-mode, static mode cannot deal all of this case since there is potential uncertain shape. Here we only deal with the certain shape.

@paddle-bot
Copy link

paddle-bot bot commented Dec 22, 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.

@zoooo0820 zoooo0820 force-pushed the skip_slice_for_static_mode branch from 0374f82 to a44e8a5 Compare December 25, 2023 10:31
@zoooo0820 zoooo0820 force-pushed the skip_slice_for_static_mode branch from a44e8a5 to 5a5c32d Compare December 25, 2023 12:05
Copy link
Contributor

@jeff41404 jeff41404 left a comment

Choose a reason for hiding this comment

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

LGTM

@jeff41404 jeff41404 merged commit 50aebcf into PaddlePaddle:develop Dec 27, 2023
@zoooo0820 zoooo0820 deleted the skip_slice_for_static_mode branch December 27, 2023 07:28
Wanglongzhi2001 pushed a commit to Wanglongzhi2001/Paddle that referenced this pull request Jan 7, 2024
* optimize slice over limit case in static

* fix code
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.

2 participants