Skip to content

Specify GPU-ID for single-GPU simulation on multi-GPU server #2729

Answered by mitchdz
OliverAh asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Oliver, thanks for your question!

I do believe that cudaq.sample_async is the only function able to target a specific GPU, but I might be wrong off the top of my head.

If you want to target a specific GPU more generally, I'd recommend setting the CUDA_VISIBLE_DEVICES environment variable to a comma separated list of the GPU device IDs you would like to expose.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by OliverAh
Comment options

You must be logged in to vote
1 reply
@mitchdz
Comment options

mitchdz Mar 19, 2025
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants