Paddle
Paddle copied to clipboard
[Custom OP] Add contiguous api support to paddle::Tensor
PR Category
Operator Mechanism
PR Types
New features
Description
We find some limitation of paddle custom op. The target of this PR is to improve custom op capability. Specifically as following:
- Add contiguous api support to paddle::Tensor
你的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.
PTAL. Thx ! @HydrogenSulfate
@HydrogenSulfate This PR is ready. Can you help me merge it ?
@zyfncg This PR is ready. Can you help me merge it ?
To custom operators the input tensors are contiguous so we don't need it temporary.
Sorry to inform you that 4dc892c's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.
To custom operators the input tensors are contiguous so we don't need it temporary.
In custom operator user may call paddle::experimental::transpose (stride kernel) it will cause tensor becomes non-contiguous.
So it's necessary to implement is_contiguous and contiguous function to paddle::Tensor class.
