Compilation failed for me. I get the following warnings and errors:
running install
running bdist_egg
running egg_info
creating PyTorch_EMD.egg-info
writing PyTorch_EMD.egg-info/PKG-INFO
writing dependency_links to PyTorch_EMD.egg-info/dependency_links.txt
writing top-level names to PyTorch_EMD.egg-info/top_level.txt
writing manifest file 'PyTorch_EMD.egg-info/SOURCES.txt'
reading manifest file 'PyTorch_EMD.egg-info/SOURCES.txt'
writing manifest file 'PyTorch_EMD.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/emd
copying pkg/layer/emd_loss_layer.py -> build/lib.linux-x86_64-3.7/emd
copying pkg/layer/__init__.py -> build/lib.linux-x86_64-3.7/emd
running build_ext
building '_emd' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/pkg
creating build/temp.linux-x86_64-3.7/pkg/src
creating build/temp.linux-x86_64-3.7/pkg/src/cuda
gcc -pthread -B /mnt/171D5FBC6E8E9B9A/anaconda3/envs/torch/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Ipkg/include -I/mnt/171D5FBC6E8E9B9A/anaconda3/envs/torch/lib/python3.7/site-packages/torch/lib/include -I/mnt/171D5FBC6E8E9B9A/anaconda3/envs/torch/lib/python3.7/site-packages/torch/lib/include/torch/csrc/api/include -I/mnt/171D5FBC6E8E9B9A/anaconda3/envs/torch/lib/python3.7/site-packages/torch/lib/include/TH -I/mnt/171D5FBC6E8E9B9A/anaconda3/envs/torch/lib/python3.7/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/mnt/171D5FBC6E8E9B9A/anaconda3/envs/torch/include/python3.7m -c pkg/src/emd.cpp -o build/temp.linux-x86_64-3.7/pkg/src/emd.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_emd -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/bin/nvcc -Ipkg/include -I/mnt/171D5FBC6E8E9B9A/anaconda3/envs/torch/lib/python3.7/site-packages/torch/lib/include -I/mnt/171D5FBC6E8E9B9A/anaconda3/envs/torch/lib/python3.7/site-packages/torch/lib/include/torch/csrc/api/include -I/mnt/171D5FBC6E8E9B9A/anaconda3/envs/torch/lib/python3.7/site-packages/torch/lib/include/TH -I/mnt/171D5FBC6E8E9B9A/anaconda3/envs/torch/lib/python3.7/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/mnt/171D5FBC6E8E9B9A/anaconda3/envs/torch/include/python3.7m -c pkg/src/cuda/emd.cu -o build/temp.linux-x86_64-3.7/pkg/src/cuda/emd.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=_emd -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
pkg/include/cuda/emd.cuh(39): warning: specified alignment (4) is different from alignment (8) specified on a previous declaration
detected during instantiation of "void approx_match_kernel(int64_t, int64_t, int64_t, int64_t, const T *, const T *, T *, T *) [with T=float]"
(237): here
pkg/include/cuda/emd.cuh(262): warning: specified alignment (4) is different from alignment (8) specified on a previous declaration
detected during instantiation of "void match_cost_kernel(int64_t, int64_t, int64_t, int64_t, const T *, const T *, const T *, T *) [with T=float]"
(318): here
pkg/include/cuda/emd.cuh(342): warning: specified alignment (4) is different from alignment (8) specified on a previous declaration
detected during instantiation of "void match_cost_grad2_kernel(int64_t, int64_t, int64_t, int64_t, const T *, const T *, const T *, T *) [with T=float]"
(444): here
pkg/include/cuda/emd.cuh(168): error: calling a __host__ function("std::fmax<double, float> ") from a __global__ function("approx_match_kernel<float> ") is not allowed
pkg/include/cuda/emd.cuh(168): error: identifier "std::fmax<double, float> " is undefined in device code
2 errors detected in the compilation of "/tmp/tmpxft_000035dc_00000000-6_emd.cpp1.ii".
I'm using Ubuntu 18.10, pytorch 1.0.1 and CUDA 10.0 with a GeForce GTX 1080.
Are these errors a bug, or have I missed something in the installation procedure?
Compilation failed for me. I get the following warnings and errors:
I'm using Ubuntu 18.10, pytorch 1.0.1 and CUDA 10.0 with a GeForce GTX 1080.
Are these errors a bug, or have I missed something in the installation procedure?