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

Return a zero matrix #92

Open
ChaosPredictor opened this issue Sep 2, 2020 · 2 comments
Open

Return a zero matrix #92

ChaosPredictor opened this issue Sep 2, 2020 · 2 comments

Comments

@ChaosPredictor
Copy link

ChaosPredictor commented Sep 2, 2020

I follow the installation process as it's defined in the README, without apex it doesn't work.
apex installed in the following way:

pip uninstall apex
rm -rf apex

git clone https://github.com/ptrblck/apex.git
cd apex
git checkout apex_no_distributed
pip install -v --no-cache-dir ./

otherwise apex.parallel not found.

with apex I'm getting the following warnings:

Warning: using Python fallback for SyncBatchNorm, possibly because apex was installed without --cuda_ext. The exception raised when attempting to import the cuda backend was: No module named 'syncbn'

predict.py:169: UserWarning: ./result/000000_10.png is a low contrast image
skimage.io.imsave(savename, (temp * 256).astype('uint16'))

and the result is just a matrix of zeros.
more information here

Working on ubuntu 18.04 with conda, python 3.7.4, torch 1.0.0, cuda 10.2
gcc 7.5

Any suggestions?

@ChaosPredictor ChaosPredictor changed the title Return o matrix Return a zero matrix Sep 2, 2020
@ChaosPredictor
Copy link
Author

I still can't understand why, but I found that LGA2 function in DispAgg returns all zeros matrix.

@ChaosPredictor
Copy link
Author

maybe the compile logs can be helpful:

running clean
removing 'build/temp.linux-x86_64-3.7' (and everything under it)
running build
running build_ext
building 'GANet' extension
creating build
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/src
gcc -pthread -B /home/master/anaconda3/envs/GANet/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/master/anaconda3/envs/GANet/lib/python3.7/site-packages/torch/lib/include -I/home/master/anaconda3/envs/GANet/lib/python3.7/site-packages/torch/lib/include/torch/csrc/api/include -I/home/master/anaconda3/envs/GANet/lib/python3.7/site-packages/torch/lib/include/TH -I/home/master/anaconda3/envs/GANet/lib/python3.7/site-packages/torch/lib/include/THC -I/usr/local/cuda-10.2/include -I/home/master/anaconda3/envs/GANet/include/python3.7m -c src/GANet_cuda.cpp -o build/temp.linux-x86_64-3.7/src/GANet_cuda.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=GANet -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
/usr/local/cuda-10.2/bin/nvcc -I/home/master/anaconda3/envs/GANet/lib/python3.7/site-packages/torch/lib/include -I/home/master/anaconda3/envs/GANet/lib/python3.7/site-packages/torch/lib/include/torch/csrc/api/include -I/home/master/anaconda3/envs/GANet/lib/python3.7/site-packages/torch/lib/include/TH -I/home/master/anaconda3/envs/GANet/lib/python3.7/site-packages/torch/lib/include/THC -I/usr/local/cuda-10.2/include -I/home/master/anaconda3/envs/GANet/include/python3.7m -c src/GANet_kernel.cu -o build/temp.linux-x86_64-3.7/src/GANet_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=GANet -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
creating build/lib.linux-x86_64-3.7
g++ -pthread -shared -B /home/master/anaconda3/envs/GANet/compiler_compat -L/home/master/anaconda3/envs/GANet/lib -Wl,-rpath=/home/master/anaconda3/envs/GANet/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/src/GANet_cuda.o build/temp.linux-x86_64-3.7/src/GANet_kernel.o -L/usr/local/cuda-10.2/lib64 -lcudart -o build/lib.linux-x86_64-3.7/GANet.cpython-37m-x86_64-linux-gnu.so
running clean
removing 'build/temp.linux-x86_64-3.7' (and everything under it)
running clean
running build
running build_ext
building 'sync_bn_cpu' extension
creating build
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/src
creating build/temp.linux-x86_64-3.7/src/cpu
gcc -pthread -B /home/master/anaconda3/envs/GANet/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/master/anaconda3/envs/GANet/lib/python3.7/site-packages/torch/lib/include -I/home/master/anaconda3/envs/GANet/lib/python3.7/site-packages/torch/lib/include/torch/csrc/api/include -I/home/master/anaconda3/envs/GANet/lib/python3.7/site-packages/torch/lib/include/TH -I/home/master/anaconda3/envs/GANet/lib/python3.7/site-packages/torch/lib/include/THC -I/home/master/anaconda3/envs/GANet/include/python3.7m -c src/cpu/operator.cpp -o build/temp.linux-x86_64-3.7/src/cpu/operator.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=sync_bn_cpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from src/cpu/operator.h:1:0,
                 from src/cpu/operator.cpp:1:
/home/master/anaconda3/envs/GANet/lib/python3.7/site-packages/torch/lib/include/torch/csrc/api/include/torch/torch.h:7:2: warning: #warning "Including torch/torch.h for C++ extensions is deprecated. Please include torch/extension.h" [-Wcpp]
 #warning \
  ^~~~~~~
gcc -pthread -B /home/master/anaconda3/envs/GANet/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/master/anaconda3/envs/GANet/lib/python3.7/site-packages/torch/lib/include -I/home/master/anaconda3/envs/GANet/lib/python3.7/site-packages/torch/lib/include/torch/csrc/api/include -I/home/master/anaconda3/envs/GANet/lib/python3.7/site-packages/torch/lib/include/TH -I/home/master/anaconda3/envs/GANet/lib/python3.7/site-packages/torch/lib/include/THC -I/home/master/anaconda3/envs/GANet/include/python3.7m -c src/cpu/sync_bn.cpp -o build/temp.linux-x86_64-3.7/src/cpu/sync_bn.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=sync_bn_cpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
creating build/lib.linux-x86_64-3.7
g++ -pthread -shared -B /home/master/anaconda3/envs/GANet/compiler_compat -L/home/master/anaconda3/envs/GANet/lib -Wl,-rpath=/home/master/anaconda3/envs/GANet/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/src/cpu/operator.o build/temp.linux-x86_64-3.7/src/cpu/sync_bn.o -o build/lib.linux-x86_64-3.7/sync_bn_cpu.cpython-37m-x86_64-linux-gnu.so
running build
running build_ext
building 'sync_bn_gpu' extension
creating build/temp.linux-x86_64-3.7/src/gpu
gcc -pthread -B /home/master/anaconda3/envs/GANet/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/master/anaconda3/envs/GANet/lib/python3.7/site-packages/torch/lib/include -I/home/master/anaconda3/envs/GANet/lib/python3.7/site-packages/torch/lib/include/torch/csrc/api/include -I/home/master/anaconda3/envs/GANet/lib/python3.7/site-packages/torch/lib/include/TH -I/home/master/anaconda3/envs/GANet/lib/python3.7/site-packages/torch/lib/include/THC -I/usr/local/cuda-10.2/include -I/home/master/anaconda3/envs/GANet/include/python3.7m -c src/gpu/operator.cpp -o build/temp.linux-x86_64-3.7/src/gpu/operator.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=sync_bn_gpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
/usr/local/cuda-10.2/bin/nvcc -I/home/master/anaconda3/envs/GANet/lib/python3.7/site-packages/torch/lib/include -I/home/master/anaconda3/envs/GANet/lib/python3.7/site-packages/torch/lib/include/torch/csrc/api/include -I/home/master/anaconda3/envs/GANet/lib/python3.7/site-packages/torch/lib/include/TH -I/home/master/anaconda3/envs/GANet/lib/python3.7/site-packages/torch/lib/include/THC -I/usr/local/cuda-10.2/include -I/home/master/anaconda3/envs/GANet/include/python3.7m -c src/gpu/sync_bn_cuda.cu -o build/temp.linux-x86_64-3.7/src/gpu/sync_bn_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=sync_bn_gpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
g++ -pthread -shared -B /home/master/anaconda3/envs/GANet/compiler_compat -L/home/master/anaconda3/envs/GANet/lib -Wl,-rpath=/home/master/anaconda3/envs/GANet/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/src/gpu/operator.o build/temp.linux-x86_64-3.7/src/gpu/sync_bn_cuda.o -L/usr/local/cuda-10.2/lib64 -lcudart -o build/lib.linux-x86_64-3.7/sync_bn_gpu.cpython-37m-x86_64-linux-gnu.so

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

1 participant