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

Modifying default target to be GPU, if present #842

Merged
merged 6 commits into from
Nov 3, 2023

Conversation

khalatepradnya
Copy link
Collaborator

@khalatepradnya khalatepradnya commented Oct 30, 2023

  • Default to GPU state-vector simulator when GPU is detected and to the CPU simulator otherwise.
  • Refactored the check for GPUs into a common function.

Checklist:

  • I have added tests to cover my changes.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • Works for CUDA Quantum in C++
  • Works for CUDA Quantum in Python

@copy-pr-bot
Copy link

copy-pr-bot bot commented Oct 30, 2023

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@khalatepradnya khalatepradnya self-assigned this Oct 30, 2023
@github-actions
Copy link

github-actions bot commented Oct 30, 2023

CLA Assistant Lite bot All Contributors have signed the CLA.

@khalatepradnya
Copy link
Collaborator Author

I have read the Contributor License Agreement and I hereby accept the Terms.

@khalatepradnya khalatepradnya marked this pull request as ready for review November 2, 2023 05:07
Copy link
Collaborator

@bmhowe23 bmhowe23 left a comment

Choose a reason for hiding this comment

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

I downloaded this PR and ran it successfully on my local machine w/ a GPU 👍. What was the decision on an environment variable override of the auto-detected default?

tools/nvqpp/nvq++.in Show resolved Hide resolved
runtime/nvqir/qpp/qpp-cpu.config Outdated Show resolved Hide resolved
@khalatepradnya
Copy link
Collaborator Author

I downloaded this PR and ran it successfully on my local machine w/ a GPU 👍. What was the decision on an environment variable override of the auto-detected default?

Thanks for checking. I too was able to run with and w/o GPU after rebuilding the containers. The environment variable will be done later in a separate PR.

Copy link
Collaborator

@bmhowe23 bmhowe23 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

  simulator otherwise.
* Refactored the check for GPUs into a common function.
* Introduced a check for GPU(s) in the Python workflow
* Updated tutorial doc about 'default' target
* Renamed the default target (not the default platform) to 'qpp-cpu'
@khalatepradnya
Copy link
Collaborator Author

khalatepradnya commented Nov 3, 2023

/ok to test

Command Bot: Processing...

Copy link

github-actions bot commented Nov 3, 2023

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

github-actions bot pushed a commit that referenced this pull request Nov 3, 2023
@khalatepradnya khalatepradnya merged commit e9afc59 into NVIDIA:main Nov 3, 2023
105 checks passed
@khalatepradnya khalatepradnya deleted the feature/default-target branch November 3, 2023 19:29
@github-actions github-actions bot locked and limited conversation to collaborators Nov 3, 2023
@bettinaheim bettinaheim added release notes Changes need to be captured in the release notes breaking change Change breaks backwards compatibility labels Nov 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking change Change breaks backwards compatibility release notes Changes need to be captured in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants