microsoft / microsoft/vattention
RuntimeError: No CUDA GPUs are available
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 523
- Forks
- 46
- Avg merge
- 9h 23m
- Merged PRs (30d)
- 1
Description
I run the python3 offline_inference.py, then I meet this error.
INFO 05-19 10:39:22 base_llm_engine.py:190] Initializing workers with distributed init method: tcp://172.17.0.4:36106
len(self.workers):[Actor(RayWorker, b387e8cfcb6791f20607568201000000)]
rank:0 and worker:Actor(RayWorker, b387e8cfcb6791f20607568201000000) and local_rank:0
Traceback (most recent call last):
File "/root/autodl-tmp/vattention/sarathi-lean/examples/offline_inference.py", line 26, in <module>
llm_engine = LLMEngine.from_engine_args(
File "/root/miniconda3/envs/vattn/lib/python3.10/site-packages/sarathi-0.1.7-py3.10-linux-x86_64.egg/sarathi/engine/llm_engine.py", line 17, in from_engine_args
engine = BaseLLMEngine(*engine_configs)
File "/root/miniconda3/envs/vattn/lib/python3.10/site-packages/sarathi-0.1.7-py3.10-linux-x86_64.egg/sarathi/engine/base_llm_engine.py", line 111, in __init__
self._init_workers_ray()
File "/root/miniconda3/envs/vattn/lib/python3.10/site-packages/sarathi-0.1.7-py3.10-linux-x86_64.egg/sarathi/engine/base_llm_engine.py", line 221, in _init_workers_ray
self._run_workers(
File "/root/miniconda3/envs/vattn/lib/python3.10/site-packages/sarathi-0.1.7-py3.10-linux-x86_64.egg/sarathi/engine/base_llm_engine.py", line 440, in _run_workers
all_outputs = ray.get(all_outputs)
File "/root/miniconda3/envs/vattn/lib/python3.10/site-packages/ray/_private/auto_init_hook.py", line 18, in auto_init_wrapper
return fn(*args, **kwargs)
File "/root/miniconda3/envs/vattn/lib/python3.10/site-packages/ray/_private/client_mode_hook.py", line 103, in wrapper
return func(*args, **kwargs)
File "/root/miniconda3/envs/vattn/lib/python3.10/site-packages/ray/_private/worker.py", line 2540, in get
raise value.as_instanceof_cause()
ray.exceptions.RayTaskError(RuntimeError): [36mray::RayWorker.execute_method()[39m (pid=25233, ip=172.17.0.4, actor_id=b387e8cfcb6791f20607568201000000, repr=<sarathi.engine.ray_utils.RayWorker object at 0x7fed2d109300>)
File "/root/miniconda3/envs/vattn/lib/python3.10/site-packages/sarathi-0.1.7-py3.10-linux-x86_64.egg/sarathi/engine/ray_utils.py", line 32, in execute_method
return executor(*args, **kwargs)
File "/root/miniconda3/envs/vattn/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "/root/miniconda3/envs/vattn/lib/python3.10/site-packages/sarathi-0.1.7-py3.10-linux-x86_64.egg/sarathi/utils/threading_utils.py", line 17, in synced_method
return method(self, *args, **kwargs)
File "/root/miniconda3/envs/vattn/lib/python3.10/site-packages/sarathi-0.1.7-py3.10-linux-x86_64.egg/sarathi/worker/base_worker.py", line 99, in init_model
torch.cuda.set_device(self.device)
File "/root/miniconda3/envs/vattn/lib/python3.10/site-packages/torch/cuda/__init__.py", line 420, in set_device
torch._C._cuda_setDevice(device)
File "/root/miniconda3/envs/vattn/lib/python3.10/site-packages/torch/cuda/__init__.py", line 314, in _lazy_init
torch._C._cuda_init()
RuntimeError: No CUDA GPUs are available
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running python3 offline_inference.py from examples/offline_inference.py and checking the initialization path through BaseLLMEngine._init_workers_ray and base_worker.py:init_model. Confirm whether the failure is reproducible and whether the issue requires a code change or a documented CUDA prerequisite; done means the example starts without the reported RuntimeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100