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

ninja problem #33

Closed
hhhwww123 opened this issue Aug 10, 2019 · 2 comments
Closed

ninja problem #33

hhhwww123 opened this issue Aug 10, 2019 · 2 comments

Comments

@hhhwww123
Copy link

I downloaded the citys dataset and put it in home/user/.encoding/data.
Then, I run command 'CUDA_VISIBLE_DEVICES=0,1 python train.py --dataset citys
--model deeplab --jpu --aux
--backbone resnet50 --checkname deeplab_res50_citys'
and the issue come out:

Traceback (most recent call last):
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 576, in _build_extension_module
['ninja', '-v'], stderr=subprocess.STDOUT, cwd=build_directory)
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/subprocess.py", line 336, in check_output
**kwargs).stdout
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "train.py", line 16, in
import encoding.utils as utils
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/encoding/init.py", line 13, in
from . import nn, functions, dilated, parallel, utils, models, datasets
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/encoding/nn/init.py", line 12, in
from .syncbn import *
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/encoding/nn/syncbn.py", line 23, in
from ..functions import *
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/encoding/functions/init.py", line 2, in
from .syncbn import *
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/encoding/functions/syncbn.py", line 13, in
from .. import lib
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/encoding/lib/init.py", line 14, in
], build_directory=cpu_path, verbose=False)
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 501, in load
_build_extension_module(name, build_directory)
File "/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 582, in _build_extension_module
name, error.output.decode()))
RuntimeError: Error building extension 'enclib_cpu': [1/2] c++ -MMD -MF syncbn_cpu.o.d -DTORCH_EXTENSION_NAME=enclib_cpu -I/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include -I/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include/TH -I/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include/THC -I/home/weizhaoxiang/anaconda3/envs/pytorch/include/python3.6m -fPIC -std=c++11 -c /home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/encoding/lib/cpu/syncbn_cpu.cpp -o syncbn_cpu.o
FAILED: syncbn_cpu.o
c++ -MMD -MF syncbn_cpu.o.d -DTORCH_EXTENSION_NAME=enclib_cpu -I/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include -I/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include/TH -I/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/lib/include/THC -I/home/weizhaoxiang/anaconda3/envs/pytorch/include/python3.6m -fPIC -std=c++11 -c /home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/encoding/lib/cpu/syncbn_cpu.cpp -o syncbn_cpu.o
/home/weizhaoxiang/anaconda3/envs/pytorch/lib/python3.6/site-packages/encoding/lib/cpu/syncbn_cpu.cpp:1:29: fatal error: torch/extension.h: No such file or directory
compilation terminated.
ninja: build stopped: subcommand failed.

How to solve this problem??

@wuhuikai
Copy link
Owner

Please change your PyTorch to 1.0.x.

@wuhuikai
Copy link
Owner

wuhuikai commented Feb 18, 2020

@hhhwww123 The code in branch latest is now ready, which uses official SyncBatchNorm and can run on all OS with PyTorch>=1.1.0.

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

2 participants