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

A caral server cannot use multiple GPUs at the same time #3827

Closed
yuexishuihan opened this issue Jan 26, 2021 · 15 comments
Closed

A caral server cannot use multiple GPUs at the same time #3827

yuexishuihan opened this issue Jan 26, 2021 · 15 comments
Assignees
Labels
possible bug stale Issue has not had recent activity

Comments

@yuexishuihan
Copy link

yuexishuihan commented Jan 26, 2021

A caral server cannot use multiple GPUs at the same time.

carla 0.9.11 docker+nvidia docker mod.
I can use one of the GPUs, which I can control, but I can’t use more than one at the same time, and the current GPU utilization rate is not high, only 30-40%.
command

sudo docker run -d -p 2000-2002:2000-2002 --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=0 carlasim/carla:0.9.11 /bin/bash -c 'SDL_VIDEODRIVER=offscreen SDL_HINT_CUDA_DEVICE=0 ./CarlaUE4.sh -ResX=800 -ResY=600 -nosound -windowed -opengl'

NVIDIA_VISIBLE_DEVICES
Does anyone have the same problem as me?
Platform:Ubuntu 20.04.1 LTS
Carla version: 0.9.11
NVRM version: NVIDIA UNIX x86_64 Kernel Module 460.32.03 Sun Dec 27 19:00:34 UTC 2020
1d:00.0 VGA compatible controller: NVIDIA Corporation Device 2204 (rev a1)
1d:00.1 Audio device: NVIDIA Corporation Device 1aef (rev a1)
b4:00.0 VGA compatible controller: NVIDIA Corporation Device 2204 (rev a1)
b4:00.1 Audio device: NVIDIA Corporation Device 1aef (rev a1)
image

@qhaas
Copy link
Contributor

qhaas commented Jan 30, 2021

I have noticed that a single carla process cannot effectively use multiple GPUs at once. I'm not sure if SLI is supported on Linux like it is on Windows with the underlying UnrealEngine, which would explain this.

Worse still, it will not automatically 'load balance' on multi-gpu systems and will just throw multiple server runs onto gpu 0, even if gpu 0 is pegged at 100% and the other GPUs are idle. As you discovered, you can use docker or SDL environment variables (outside of docker) to manually restrict it when running with OpenGL. Unfortunately, using environment variables appears broken with vulkan, at least when using UE 4.25 (which, to be fair, is unsupported by CARLA).

To be fair, I think this is more of an UnrealEngine thing than a CARLA thing.

@yuexishuihan
Copy link
Author

Okay, thank you for your answer. The bad thing is that it seems impossible to use multiple GPUs in a short time.

@qhaas
Copy link
Contributor

qhaas commented Feb 2, 2021

Might want to ask over at UnrealEngine Answers, they recently helped me with UnrealEngine GPU selection questions.

@yuexishuihan
Copy link
Author

Okay.This is a good idea, I will try

@corkyw10
Copy link
Contributor

@bernatx could you have a look at this please?

@qhaas
Copy link
Contributor

qhaas commented Apr 13, 2021

@yuexishuihan , did you discover anything about leveraging multiple GPUs for CARLA? The closest we have come is just running multiple client/servers on the same GPU (i.e. larger number of independent simulations).

@yuexishuihan
Copy link
Author

Not yet, I am currently exploring adding/modifying assets in carla, including cars,
Maps, weather, etc.

@stale
Copy link

stale bot commented Jul 21, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue has not had recent activity label Jul 21, 2021
@jimmyw404
Copy link

I'm very interested in multi GPU or multi computer CARLA simulation! If anyone has gotten multippe gpus to work or has tried to distribute the carla computing please let us know!!!!

@stale stale bot removed the stale Issue has not had recent activity label Aug 14, 2021
@gouchaoer
Copy link
Contributor

any progress?
I am doing realtime 4 camera output in HIL, and I found it's impossible

@stale
Copy link

stale bot commented Jan 9, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue has not had recent activity label Jan 9, 2022
@jimmyw404
Copy link

I'm still very interested in this! Unreal doesn't seem to handle multi-GPU simulation very well, so solving this problem is non-trivial.

@stale stale bot removed the stale Issue has not had recent activity label Jan 9, 2022
@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue has not had recent activity label Apr 16, 2022
@jimmyw404
Copy link

Still very interested in this feature and looking forward to https://github.com/carla-simulator/carla/tree/bernat/multi_gpu !!!

@stale stale bot removed the stale Issue has not had recent activity label Apr 16, 2022
@stale
Copy link

stale bot commented Jun 2, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue has not had recent activity label Jun 2, 2023
@Blyron Blyron closed this as completed Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
possible bug stale Issue has not had recent activity
Projects
None yet
Development

No branches or pull requests

7 participants