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

Single Thread (Reward Function) Running on GPU #50

Open
ziyingsk opened this issue Sep 27, 2024 · 0 comments
Open

Single Thread (Reward Function) Running on GPU #50

ziyingsk opened this issue Sep 27, 2024 · 0 comments

Comments

@ziyingsk
Copy link

I encountered an issue where only one thread (the reward function) was successfully running on the GPU. After some investigation, I was able to resolve the problem.

The function set_freest_gpu() is a custom-written utility designed specifically for multi-GPU systems. In my case, I’m using a remote SSH GPU server, and the function automatically identified the "freest" GPU. However, this GPU was not actually allocated to me, which caused the following error:

RuntimeError: No CUDA GPUs are available

To partially resolve this, I used the following command to manually specify the correct GPU:

export CUDA_VISIBLE_DEVICES=0 # Replace 0 with your actual GPU ID

While this command helped in some cases, it's not a perfect solution since the issue is related to GPU allocation and visibility in shared environments.

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

1 participant