there is a conflict between cuda and megengine

Open
#5 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python

Research direction

Start by reproducing FINet training with the reported Python 3.8 environment and the traceback. Inspect megengine/distributed/launcher.py and megengine/distributed/helper.py at the reported checks; done means the CUDA initialization error is explained and a verified resolution or required environment details are documented.

Written by the indexing model from the issue text.

Description

We have met the problem when we train FINet, do you have any idea? Thanks.

Traceback (most recent call last):
File "/home/hongchang/.conda/envs/finet/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/home/hongchang/.conda/envs/finet/lib/python3.8/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/home/hongchang/.conda/envs/finet/lib/python3.8/site-packages/megengine/distributed/launcher.py", line 43, in _run_wrapped
_check_device_initialized(device_type, dev)
File "/home/hongchang/.conda/envs/finet/lib/python3.8/site-packages/megengine/distributed/helper.py", line 195, in _check_device_initialized
raise RuntimeError(errmsg)
RuntimeError: The cuda env is set before the forked thread starts. Please do not use any cuda function or variable before forking.
Process Process-2:

Dominant language
Python
Stars
30
Forks
1
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MegEngine/FINet

All issues in MegEngine/FINet

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.