facebookresearch / facebookresearch/SlowFast

OSError: [Errno 12] Cannot allocate memory (My graphics card is 3080,)

Open
#510 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
7.4k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

Hi, I downloaded the Charades dataset and tried to train the dataset with the command:
> python tools/run_net.py --cfg configs/Charades/SLOWFAST_16x8_R50.yaml

BATCH_SIZE: 1
DATA_LOADER:
NUM_WORKERS: 1
PIN_MEMORY: True
NUM_GPUS: 1
NUM_SHARDS: 1
RNG_SEED: 0

I got the following error,
[01/17 16:45:05][INFO] charades.py: 71: Constructing Charades train...
[01/17 16:46:10][INFO] charades.py: 109: Charades dataloader constructed (size: 7811) from /home/SlowFast-main/data/charades/frame_lists/train.csv
[01/17 16:46:10][INFO] charades.py: 71: Constructing Charades val...
[01/17 16:46:25][INFO] charades.py: 109: Charades dataloader constructed (size: 1814) from /home/SlowFast-main/data/charades/frame_lists/val.csv
[01/17 16:46:25][INFO] charades.py: 71: Constructing Charades train...
[01/17 16:47:29][INFO] charades.py: 109: Charades dataloader constructed (size: 7811) from /home/SlowFast-main/data/charades/frame_lists/train.csv
[01/17 16:47:29][INFO] train_net.py: 468: Start epoch: 1
Traceback (most recent call last):
File "tools/run_net.py", line 44, in
main()
File "tools/run_net.py", line 25, in main
launch_job(cfg=cfg, init_method=args.init_method, func=train)
File "/home/SlowFast-main/slowfast/utils/misc.py", line 311, in launch_job
func(cfg=cfg)
File "/home/slowFast-main/tools/train_net.py", line 509, in train
writer,
File "/home/SlowFast-main/tools/train_net.py", line 67, in train_epoch
for cur_iter, (inputs, labels, _, meta) in enumerate(train_loader):
File "/home/anaconda3/envs/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 355, in __iter__
return self._get_iterator()
File "/home/xuwenqiang/anaconda3/envs/flash/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 301, in _get_iterator
return _MultiProcessingDataLoaderIter(self)
File "/home/anaconda3/envs/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 914, in __init__
w.start()
File "/home/python3.7/multiprocessing/process.py", line 112, in start
self._popen = self._Popen(self)
File "/home/anaconda3/envs/lib/python3.7/multiprocessing/context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/home/anaconda3/envs/lib/python3.7/multiprocessing/context.py", line 277, in _Popen
return Popen(process_obj)
File "/home/anaconda3/envs/lib/python3.7/multiprocessing/popen_fork.py", line 20, in __init__
self._launch(process_obj)
File "/home/anaconda3/envs/lib/python3.7/multiprocessing/popen_fork.py", line 70, in _launch
self.pid = os.fork()
OSError: [Errno 12] Cannot allocate memory

I wonder if you could point out what is going wrong.

Many Thanks!

And,please tell me that what is the minimum video memory,RAM,and configuration required for slowfast code?
My graphics card is 3080,is the configuration not enough?

Many Thanks!

Contributor guide

Open the contributing guide

Research direction

Start at tools/run_net.py and tools/train_net.py, then inspect the Charades loader construction reported in charades.py and the PyTorch DataLoader traceback. Reproduce with the shown configuration, especially NUM_WORKERS: 1 and PIN_MEMORY: True, and determine whether the failure is host-memory allocation. Done means documenting a verified configuration or concrete project change that avoids the error.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.