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

【Hackathon 7th No.28】为 paddle.clip 进行功能增强 #68819

Closed
wants to merge 22 commits into from

Conversation

a162837
Copy link

@a162837 a162837 commented Oct 19, 2024

PR Category

Inference

PR Types

Others

Description

为 paddle.clip 进行功能增强
PaddlePaddle/docs#6924

Copy link

paddle-bot bot commented Oct 19, 2024

你的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.

@CLAassistant
Copy link

CLAassistant commented Oct 19, 2024

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@a162837
Copy link
Author

a162837 commented Oct 19, 2024

你好,我想请问下,对于C++的DenseTensor算子,我该去哪里查看他的实现,比如矩阵数据的表现形式,以及GPU算子注册的实现,我看了那些cu文件,并没有DenseTensor,我是打算将输入全都换成Tensor,然后再重新clip,或者是否函数重载的形式?我并没有找到对应的案例。

@a162837 a162837 changed the title 【Hackathon 7th No.29】为 paddle.clip 进行功能增强 【Hackathon 7th No.28】为 paddle.clip 进行功能增强 Oct 19, 2024
@paddle-bot paddle-bot bot added the contributor External developers label Oct 19, 2024
@zhwesky2010
Copy link
Contributor

【Hackathon 7th】开源贡献个人挑战赛 #68244

那你需要看的内容还比较多,需要熟悉相关源码,这个是开发流程和部分代码解读

https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/dev_guides/api_contributing_guides/api_contributing_guides_cn.html

@a162837
Copy link
Author

a162837 commented Oct 21, 2024

【Hackathon 7th】开源贡献个人挑战赛 #68244

那你需要看的内容还比较多,需要熟悉相关源码,这个是开发流程和部分代码解读

https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/dev_guides/api_contributing_guides/api_contributing_guides_cn.html

我目前的思路是这样的:将x、min、max全部转为tensor之后,在C++层将他们全都转为一维的矩阵形式,然后逐个遍历之后再转回来。

@a162837
Copy link
Author

a162837 commented Oct 21, 2024

【Hackathon 7th】开源贡献个人挑战赛 #68244

那你需要看的内容还比较多,需要熟悉相关源码,这个是开发流程和部分代码解读
https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/dev_guides/api_contributing_guides/api_contributing_guides_cn.html

我目前的思路是这样的:将x、min、max全部转为tensor之后,在C++层将他们全都转为一维的矩阵形式,然后逐个遍历之后再转回来。

图片
就是这个样子

@a162837
Copy link
Author

a162837 commented Oct 21, 2024

图片
然后我也运行过,是可行的

@a162837
Copy link
Author

a162837 commented Oct 21, 2024

图片 然后我也运行过,是可行的

请问如果按照我这个思路,我其实是不需要在cpu、gpu那里增加代码,而是只需要修改impl的代码的对吧?
@zhwesky2010

@a162837
Copy link
Author

a162837 commented Oct 22, 2024

我发现改底层的话需要修改的太多了,而且有些我还不了解,我就是用算子组合的形式了。使用expand+where进行实现,效果是一样的

@a162837
Copy link
Author

a162837 commented Oct 27, 2024

请问静态图如何判断传入的参数是否为Tensor? @zhwesky2010

@a162837
Copy link
Author

a162837 commented Oct 30, 2024

图片
请问这个是什么意思?

@a162837
Copy link
Author

a162837 commented Oct 31, 2024

@luotao1 @zhwesky2010 请问能否帮忙看一下,我觉得我新增的test他并没有执行,因为我本地是可以的,然后还有就是这个
图片

@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators Nov 1, 2024
@PaddlePaddle PaddlePaddle unlocked this conversation Nov 1, 2024
@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators Nov 1, 2024
@PaddlePaddle PaddlePaddle unlocked this conversation Nov 1, 2024
@a162837
Copy link
Author

a162837 commented Nov 2, 2024

是docker镜像挂了? @luotao1

@a162837
Copy link
Author

a162837 commented Nov 3, 2024

图片
这个似乎需要先review才可以

@a162837
Copy link
Author

a162837 commented Nov 4, 2024

已经都好了,请检查一下 @zhwesky2010

@a162837
Copy link
Author

a162837 commented Nov 5, 2024

请问为什么我使用staric.data创建的静态图tensor不算是variable类型吗?而且我添加的代码是都已经跑过了的,他还是说覆盖率不够 @zhwesky2010

@a162837
Copy link
Author

a162837 commented Nov 6, 2024

#69193
请看这个

@zhwesky2010
Copy link
Contributor

这个还是不能在python层写,需改造已有的kernel

@a162837 a162837 closed this Nov 10, 2024
@a162837 a162837 deleted the clip branch November 10, 2024 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants