-
Notifications
You must be signed in to change notification settings - Fork 252
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
【Hackathon 5th No.28】为 Paddle 新增 slice_scatter API #784
Conversation
|
||
## API实现方案 | ||
|
||
此次使用 scatter 的方式实现接口,但是由于 `paddle.scatter` 缺少 `axis` 参数,因此需要内部进行转换: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里其实调用set_value
算子更合适一些,可以参考下
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set_value
是不是修改底层实现了啊?!看到 select_scatter
的实现方式,太简单了 ~~~ 🤣🤣🤣
|
||
添加 Python API: | ||
```python | ||
paddle.slice_scatter(x, src, axis=0, start=None, stop=None, step=1, name=None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
根据赋值的语义,是否src
改成value
更合适一些。
Update 20231214
@zoooo0820 请评审 ~ |
你好,我这边由于个人事务原因可能没有更多精力开发了,欢迎你接手这一工作。我此前根据单一输入的版本完成了部分代码,但还不够完善,因此也就不提交成PR了,在此给出Github Gist,希望能给你提供一些参考。 https://gist.github.com/VOIDMalkuth/c03022f63354f8195573a1f280a5b129 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR types
Others
PR changes
Docs
Description
【Hackathon 5th No.28】为 Paddle 新增 slice_scatter API
参考 #668 中的讨论,实现方案与其不同,采用 scatter 的方式实现,并做以下几点说明:
比如,x 为 [8, 8], src 为 [8, 2],则 axis 只能为 1。
以上在 RFC 中第五章也有写 ~
@VOIDMalkuth 感谢您的 RFC ,参考了 PyTorch 调研以及之前的部分,如果已经实现代码了,尽快提交啊 ~~~ 🤗🤗🤗
@zoooo0820 请评审 ~ 非常感谢!