Skip to content
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

Performance improvements for running compute APIs (state,observe,sample) in a loop #1865

Merged
merged 2 commits into from
Jul 1, 2024

Conversation

1tnguyen
Copy link
Collaborator

@1tnguyen 1tnguyen commented Jun 28, 2024

Description

Use a single scratchpad for all tensornet operations.
Scratchpad (to use with tensornet 'compute' API) is created a single time, attached to the simulator class.
All other sub-classes (state-like objects) just keep a reference to this scratch pad.

Rationale:
We observed some performance degradation running these compute API (e.g., state/observe, etc.) in a loop. Theoretically, the performance should be better since the system is warmed up.
The root cause is this scratch pad dealloc-realloc operations.

github-actions bot pushed a commit that referenced this pull request Jun 28, 2024
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

Copy link
Collaborator

@schweitzpgi schweitzpgi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link

github-actions bot commented Jul 1, 2024

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Jul 1, 2024
@1tnguyen 1tnguyen merged commit cee02b1 into NVIDIA:main Jul 1, 2024
125 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jul 1, 2024
@bettinaheim bettinaheim added the release notes Changes need to be captured in the release notes label Jul 29, 2024
@bettinaheim bettinaheim added this to the release 0.8.0 milestone Jul 29, 2024
@bettinaheim bettinaheim changed the title Use a single scratchpad for all tensornet operations Performance improvements for running compute APIs (e.g., state/observe, etc.) in a loop Jul 29, 2024
@bettinaheim bettinaheim changed the title Performance improvements for running compute APIs (e.g., state/observe, etc.) in a loop Performance improvements for running compute APIs (state,observe,sample) in a loop Jul 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
performance release notes Changes need to be captured in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants