Skip to content

[Prim] Add index_put_grad for static decomposition#73747

Merged
HydrogenSulfate merged 7 commits intoPaddlePaddle:developfrom
HydrogenSulfate:add_index_put_grad
Jul 3, 2025
Merged

[Prim] Add index_put_grad for static decomposition#73747
HydrogenSulfate merged 7 commits intoPaddlePaddle:developfrom
HydrogenSulfate:add_index_put_grad

Conversation

@HydrogenSulfate
Copy link
Contributor

@HydrogenSulfate HydrogenSulfate commented Jul 1, 2025

PR Category

Operator Mechanism

PR Types

New features

Description

Pcard-75624

  1. index_put作为静态图的基础算子,以此为基础,实现index_put_grad静态图组合算子。添加至基础算子参考:https://github.com/pytorch/pytorch/blob/0364db7cd14ffa67b48ef8c27fefbb3eed2b065d/tools/autograd/derivatives.yaml#L886-L887
  2. 对应单测添加静态图组合算子测试
  3. xvalue添加到no_need_buffer中,避免hold不必要的中间变量;

@paddle-bot
Copy link

paddle-bot bot commented Jul 1, 2025

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

@HydrogenSulfate HydrogenSulfate changed the title [Prim] Add index_put_grad for static composition [Prim] Add index_put_grad for static decomposition Jul 1, 2025
@HydrogenSulfate HydrogenSulfate merged commit 24392e6 into PaddlePaddle:develop Jul 3, 2025
89 of 97 checks passed
@HydrogenSulfate HydrogenSulfate deleted the add_index_put_grad branch July 3, 2025 11:31
github-merge-queue bot pushed a commit to deepmodeling/deepmd-kit that referenced this pull request Jul 10, 2025
support running `input_torch_dynamic.json` with paddle backend(including
CINN)


TODO list:

- [x] PaddlePaddle/Paddle#73601
- [x] PaddlePaddle/Paddle#73622
- [x] PaddlePaddle/Paddle#73737
- [x] PaddlePaddle/Paddle#73747
- [x] PaddlePaddle/Paddle#73809
- [x] PaddlePaddle/Paddle#73761


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

* **Bug Fixes**
* Resolved issues with tensor shape and indexing consistency, preventing
assertion errors during model execution.
* Improved handling of default tensor initialization to avoid JIT
assertion issues.

* **Refactor**
* Standardized tensor dimension handling and broadcasting for improved
clarity and maintainability.
* Enhanced code readability with clearer indexing conventions and
formatting.
* Updated aggregation logic for safer and more efficient tensor
operations.

* **New Features**
* Added an option to control graph index mapping behavior for greater
flexibility in advanced use cases.

* **Tests**
* Introduced comprehensive tests validating descriptor model consistency
with dynamic selection enabled.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
ChiahsinChu pushed a commit to ChiahsinChu/deepmd-kit that referenced this pull request Dec 17, 2025
support running `input_torch_dynamic.json` with paddle backend(including
CINN)


TODO list:

- [x] PaddlePaddle/Paddle#73601
- [x] PaddlePaddle/Paddle#73622
- [x] PaddlePaddle/Paddle#73737
- [x] PaddlePaddle/Paddle#73747
- [x] PaddlePaddle/Paddle#73809
- [x] PaddlePaddle/Paddle#73761


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

* **Bug Fixes**
* Resolved issues with tensor shape and indexing consistency, preventing
assertion errors during model execution.
* Improved handling of default tensor initialization to avoid JIT
assertion issues.

* **Refactor**
* Standardized tensor dimension handling and broadcasting for improved
clarity and maintainability.
* Enhanced code readability with clearer indexing conventions and
formatting.
* Updated aggregation logic for safer and more efficient tensor
operations.

* **New Features**
* Added an option to control graph index mapping behavior for greater
flexibility in advanced use cases.

* **Tests**
* Introduced comprehensive tests validating descriptor model consistency
with dynamic selection enabled.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants