-
Couldn't load subscription status.
- Fork 5.9k
[PHI]add phi tensor vector array api from fluid #49885
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
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
29b91fe to
d25e126
Compare
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.
可以把phi下其他用到这俩个函数的地方都替换成phi命名空间
paddle/phi/core/tensor_utils.cc
Outdated
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.
这个宏下边包含一些paddle::platform命名空间下的内容,会增加phi头文件解耦难度,并且npu相关的内容可以不用包含在phi下,这个宏里的实现可以先删掉
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.
已经删除
paddle/phi/core/tensor_utils.cc
Outdated
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.
mlu宏里的内容也可以删掉
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.
已经删除
paddle/phi/core/tensor_utils.cc
Outdated
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.
同上
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.
已经删除
paddle/phi/core/tensor_utils.cc
Outdated
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.
同上
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.
已经删除
bcdbea4 to
5b88b56
Compare
|
@YuanRisheng 已经修改,并把TensorToVector也加入了。 |
|
@YuanRisheng CI完成了。 |
paddle/phi/kernels/assign_kernel.cc
Outdated
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.
抱歉,第一次review的时候这里没注意到,这里应该是false,TensorCopy对应的是异步拷贝,对应phi下参数传递false,麻烦再修改一下
Approval等待approve后会通过,coverage及benchmark,等copy修改完ci跑完后,麻烦@luotao1看一下是否能豁免 |
replace all TensorFromVector & TensorToVector AssignKernel async copy
5b88b56 to
fd7e960
Compare
|
PR-CI-OP-benchmark又通过了。 Approval和coverage需要处理 |
|
Coverage流水线已豁免 |
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
|
#47615 解藕paddle/fluid/framework/tensor_util.h |
replace all TensorFromVector & TensorToVector AssignKernel async copy
PR types
Function optimization
PR changes
OPs
Describe
PHI算子解藕代码
将TensorFromVector和TensorFromArray和TensorToVector从fluild的tensor_utils
移植到paddle/phi/core/tensor_utils.cc
对paddle/phi/kernels/assign_kernel.cc实现fluid头文件解藕
全部的PHI算子相关部分解藕
paddle/fluid/framework/tensor_util.h
有一个宏拼写错误 PADDLE_WITH_CUSTOM_DEICE 改为PADDLE_WITH_CUSTOM_DEVICE