I’m unable to build the FlowNet 2.0 3 CUDA kernels for the layers channelnorm, resample2d 2, correlation when using PyTorch >= 1.5.1. However, I’m able to successfully build and use them with PyTorch <= 1.4.0. Is there a way to make this work since I need to use PyTorch >= 1.5.1?
Following is a snippet of the long error log that I get:

ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File “/home/software/miniconda2/envs/cu101torch151s2/lib/python3.6/site-packages/torch/utils/cpp_extension.py”, line 1423, in _run_ninja_build
check=True)
File “/home/software/miniconda2/envs/cu101torch151s2/lib/python3.6/subprocess.py”, line 438, 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 “setup.py”, line 32, in 
‘build_ext’: BuildExtension
File “/home/software/miniconda2/envs/cu101torch151s2/lib/python3.6/site-packages/setuptools/init.py”, line 163, in setup
return distutils.core.setup(**attrs)
.
.
.
.
File “/home/software/miniconda2/envs/cu101torch151s2/lib/python3.6/site-packages/torch/utils/cpp_extension.py”, line 1163, in _write_ninja_file_and_compile_objects
error_prefix=‘Error compiling objects for extension’)
File “/home/software/miniconda2/envs/cu101torch151s2/lib/python3.6/site-packages/torch/utils/cpp_extension.py”, line 1436, in _run_ninja_build
raise RuntimeError(message)
RuntimeError: Error compiling objects for extension

For reproducing the error with PyTorch >= 1.5.1 (installed using conda):
# get flownet2-pytorch source
git clone https://github.com/NVIDIA/flownet2-pytorch.git
cd flownet2-pytorch

# install custom layers
bash install.sh