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

GPU to use #13

Open
snapo opened this issue Jan 1, 2025 · 2 comments
Open

GPU to use #13

snapo opened this issue Jan 1, 2025 · 2 comments

Comments

@snapo
Copy link

snapo commented Jan 1, 2025

Is there a way to tell tensorneat to use GPU:1 instead of GPU:0 ?

@WLS2002
Copy link
Collaborator

WLS2002 commented Jan 2, 2025

Maybe you can try these two methods:
1.
Use export CUDA_VISIBLE_DEVICES=1 before running python script.
or
Add these codes at the begining of your code:

import os
os.environ['CUDA_VISIBLE_DEVICES']='1'

Add these codes at the begining:

import jax
jax.config.update("jax_default_device", jax.devices("gpu")[1])

I hope this can help you, and thank you for using TensorNEAT!

@snapo
Copy link
Author

snapo commented Jan 2, 2025

thank you will give it a try as soon as the current run finnishes (approx. 30-40h)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants