Skip to content

[CANN]:Replace aclrtMemsetSync with InplaceZero operator for zero tensor creation #14002

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

luyhcsu
Copy link

@luyhcsu luyhcsu commented Jun 4, 2025

In performance tests on the Atlas 300V NPU, we observed that the aclrtMemsetSync operation introduced significant latency when creating zero tensors.

To address this, we replaced aclrtMemsetSync with the InplaceZero operator. This change allows zero tensors to be created more efficiently and consistently within the computation graph, avoiding costly synchronization and improving execution performance.

This also helps ensure better integration with graph-level optimizations and memory management.

Make sure to read the contributing guidelines before submitting a PR

…te zero tensors more efficiently and consistently within the computation graph
@hipudding hipudding added the Ascend NPU issues specific to Ascend NPUs label Jun 4, 2025
@hipudding hipudding self-requested a review June 4, 2025 02:59
@github-actions github-actions bot added the ggml changes relating to the ggml tensor library for machine learning label Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ascend NPU issues specific to Ascend NPUs ggml changes relating to the ggml tensor library for machine learning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants