Skip to content

Question about running botorch on GPU #1140

Answered by saitcakmak
A-ep93 asked this question in Q&A
Discussion options

You must be logged in to vote

As it's written, your code should be running on the device specified by tkwargs. So, if you have PyTorch setup with cuda support and you have an nvidia GPU available, it should be running on the GPU. You can check this by printing out tkwargs or torch.cuda.is_available().

If you're asking because you are not observing significant speed ups from switching to GPU, this is expected. You're using the analytic EI acquisition function, which does not use expensive matrix-vector multiplication, where the GPUs are typically much faster. We generally recommend GPUs for multi-objective optimization or for acquisition functions that require large q-batch sampling from the GP posterior.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by saitcakmak
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