Paddle icon indicating copy to clipboard operation
Paddle copied to clipboard

[Custom OP] Add contiguous api support to paddle::Tensor

Open BeingGod opened this issue 1 year ago • 5 comments

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:

  1. Add contiguous api support to paddle::Tensor

BeingGod avatar Oct 16 '24 09:10 BeingGod

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

paddle-bot[bot] avatar Oct 16 '24 09:10 paddle-bot[bot]

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Oct 16 '24 09:10 CLAassistant

PTAL. Thx ! @HydrogenSulfate

BeingGod avatar Oct 16 '24 09:10 BeingGod

@HydrogenSulfate This PR is ready. Can you help me merge it ?

BeingGod avatar Oct 18 '24 10:10 BeingGod

@zyfncg This PR is ready. Can you help me merge it ?

BeingGod avatar Oct 19 '24 08:10 BeingGod

To custom operators the input tensors are contiguous so we don't need it temporary. image

BeingGod avatar Oct 24 '24 06:10 BeingGod

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.

paddle-ci-bot[bot] avatar Oct 30 '24 03:10 paddle-ci-bot[bot]

To custom operators the input tensors are contiguous so we don't need it temporary. image

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.

BeingGod avatar Nov 05 '24 18:11 BeingGod