Skip to content

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

Merged
1tnguyen merged 2 commits into
NVIDIA:mainfrom
1tnguyen:tnguyen/tensornet-perf-scratchpad
Jul 1, 2024
Merged

1tnguyen merged 2 commits into
NVIDIA:mainfrom
1tnguyen:tnguyen/tensornet-perf-scratchpad

Conversation

@1tnguyen

@1tnguyen 1tnguyen commented Jun 28, 2024 •

Copy link
Copy Markdown
Collaborator

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
@github-actions

Copy link
Copy Markdown

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

@schweitzpgi schweitzpgi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

+1

@github-actions

github-actions Bot commented Jul 1, 2024

Copy link
Copy Markdown

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
@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