Code Monkey home page Code Monkey logo

dirt's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dirt's Issues

Segmentation fault using GL functions

Dirt is successfully installed, but the process finishes with exit code #139, when it wants to use a gl function (e.g. glGetString(GL_RENDERER) ) in gl_common.h.

I set OpenGL preference to GLVND in cmake as suggested, but it did not help:
set(OpenGL_GL_PREFERENCE "GLVND")

Any idea would be appreciated. Thanks!

Unusuable in Colaboratory

Not sure if it can be made to work but I get the following when trying to install using

!pip install git+https://github.com/pmh47/dirt.git

Building wheels for collected packages: dirt
Running setup.py bdist_wheel for dirt ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-req-build-6f63mzbe/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/pip-wheel-6vxaqauc --python-tag cp36:
running bdist_wheel
running build
-- The CXX compiler identification is GNU 7.3.0
-- The CUDA compiler identification is NVIDIA 9.2.148
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc -- works
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
CMake Warning (dev) at /usr/local/lib/python2.7/dist-packages/cmake/data/share/cmake-3.12/Modules/FindOpenGL.cmake:270 (message):
Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
available. Run "cmake --help-policy CMP0072" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.

FindOpenGL found both a legacy GL library:

  OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so

and GLVND libraries for OpenGL and GLX:

  OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
  OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so

OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
compatibility with CMake 3.10 and below the legacy GL library will be used.

Call Stack (most recent call first):
CMakeLists.txt:5 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pip-req-build-6f63mzbe/build
Scanning dependencies of target rasterise
[ 14%] Building CXX object CMakeFiles/rasterise.dir/rasterise_egl.cpp.o
[ 28%] Building CUDA object CMakeFiles/rasterise.dir/rasterise_egl.cu.o
/tmp/pip-req-build-6f63mzbe/csrc/rasterise_egl.cu:9:0: warning: "CUDA_AXIS_KERNEL_LOOP" redefined
#define CUDA_AXIS_KERNEL_LOOP(i, n, axis) \

In file included from /tmp/pip-req-build-6f63mzbe/csrc/rasterise_egl.cu:6:0:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/util/cuda_kernel_helper.h:30:0: note: this is the location of the previous definition
#define CUDA_AXIS_KERNEL_LOOP(i, n, axis) \

/usr/local/lib/python2.7/dist-packages/tensorflow/include/absl/strings/string_view.h(496): error: constexpr function return is non-constant

/usr/local/lib/python2.7/dist-packages/tensorflow/include/google/protobuf/arena_impl.h(55): warning: integer conversion resulted in a change of sign

/usr/local/lib/python2.7/dist-packages/tensorflow/include/google/protobuf/arena_impl.h(309): warning: integer conversion resulted in a change of sign

/usr/local/lib/python2.7/dist-packages/tensorflow/include/google/protobuf/arena_impl.h(310): warning: integer conversion resulted in a change of sign

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(651): warning: missing return statement at end of non-void function "Eigen::internal::igammac_cf_impl<Scalar, mode>::run [with Scalar=float, mode=Eigen::internal::VALUE]"
detected during:
instantiation of "Scalar Eigen::internal::igammac_cf_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=float, mode=Eigen::internal::VALUE]"
(855): here
instantiation of "Scalar Eigen::internal::igamma_generic_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=float, mode=Eigen::internal::VALUE]"
(2096): here
instantiation of "Eigen::internal::igamma_retval<Eigen::internal::global_math_functions_filtering_base<Scalar, void>::type>::type Eigen::numext::igamma(const Scalar &, const Scalar &) [with Scalar=float]"
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsHalf.h(34): here

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(712): warning: missing return statement at end of non-void function "Eigen::internal::igamma_series_impl<Scalar, mode>::run [with Scalar=float, mode=Eigen::internal::VALUE]"
detected during:
instantiation of "Scalar Eigen::internal::igamma_series_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=float, mode=Eigen::internal::VALUE]"
(863): here
instantiation of "Scalar Eigen::internal::igamma_generic_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=float, mode=Eigen::internal::VALUE]"
(2096): here
instantiation of "Eigen::internal::igamma_retval<Eigen::internal::global_math_functions_filtering_base<Scalar, void>::type>::type Eigen::numext::igamma(const Scalar &, const Scalar &) [with Scalar=float]"
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsHalf.h(34): here

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(651): warning: missing return statement at end of non-void function "Eigen::internal::igammac_cf_impl<Scalar, mode>::run [with Scalar=float, mode=Eigen::internal::DERIVATIVE]"
detected during:
instantiation of "Scalar Eigen::internal::igammac_cf_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=float, mode=Eigen::internal::DERIVATIVE]"
(855): here
instantiation of "Scalar Eigen::internal::igamma_generic_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=float, mode=Eigen::internal::DERIVATIVE]"
(2102): here
instantiation of "Eigen::internal::igamma_der_a_retval<Eigen::internal::global_math_functions_filtering_base<Scalar, void>::type>::type Eigen::numext::igamma_der_a(const Scalar &, const Scalar &) [with Scalar=float]"
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsHalf.h(38): here

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(712): warning: missing return statement at end of non-void function "Eigen::internal::igamma_series_impl<Scalar, mode>::run [with Scalar=float, mode=Eigen::internal::DERIVATIVE]"
detected during:
instantiation of "Scalar Eigen::internal::igamma_series_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=float, mode=Eigen::internal::DERIVATIVE]"
(863): here
instantiation of "Scalar Eigen::internal::igamma_generic_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=float, mode=Eigen::internal::DERIVATIVE]"
(2102): here
instantiation of "Eigen::internal::igamma_der_a_retval<Eigen::internal::global_math_functions_filtering_base<Scalar, void>::type>::type Eigen::numext::igamma_der_a(const Scalar &, const Scalar &) [with Scalar=float]"
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsHalf.h(38): here

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(651): warning: missing return statement at end of non-void function "Eigen::internal::igammac_cf_impl<Scalar, mode>::run [with Scalar=float, mode=Eigen::internal::SAMPLE_DERIVATIVE]"
detected during:
instantiation of "Scalar Eigen::internal::igammac_cf_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=float, mode=Eigen::internal::SAMPLE_DERIVATIVE]"
(855): here
instantiation of "Scalar Eigen::internal::igamma_generic_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=float, mode=Eigen::internal::SAMPLE_DERIVATIVE]"
(2108): here
instantiation of "Eigen::internal::gamma_sample_der_alpha_retval<Eigen::internal::global_math_functions_filtering_base<Scalar, void>::type>::type Eigen::numext::gamma_sample_der_alpha(const Scalar &, const Scalar &) [with Scalar=float]"
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsHalf.h(42): here

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(712): warning: missing return statement at end of non-void function "Eigen::internal::igamma_series_impl<Scalar, mode>::run [with Scalar=float, mode=Eigen::internal::SAMPLE_DERIVATIVE]"
detected during:
instantiation of "Scalar Eigen::internal::igamma_series_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=float, mode=Eigen::internal::SAMPLE_DERIVATIVE]"
(863): here
instantiation of "Scalar Eigen::internal::igamma_generic_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=float, mode=Eigen::internal::SAMPLE_DERIVATIVE]"
(2108): here
instantiation of "Eigen::internal::gamma_sample_der_alpha_retval<Eigen::internal::global_math_functions_filtering_base<Scalar, void>::type>::type Eigen::numext::gamma_sample_der_alpha(const Scalar &, const Scalar &) [with Scalar=float]"
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsHalf.h(42): here

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(651): warning: missing return statement at end of non-void function "Eigen::internal::igammac_cf_impl<Scalar, mode>::run [with Scalar=double, mode=Eigen::internal::VALUE]"
detected during:
instantiation of "Scalar Eigen::internal::igammac_cf_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=double, mode=Eigen::internal::VALUE]"
(855): here
instantiation of "Scalar Eigen::internal::igamma_generic_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=double, mode=Eigen::internal::VALUE]"
(2096): here
instantiation of "Eigen::internal::igamma_retval<Eigen::internal::global_math_functions_filtering_base<Scalar, void>::type>::type Eigen::numext::igamma(const Scalar &, const Scalar &) [with Scalar=double]"
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/arch/CUDA/CudaSpecialFunctions.h(120): here

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(712): warning: missing return statement at end of non-void function "Eigen::internal::igamma_series_impl<Scalar, mode>::run [with Scalar=double, mode=Eigen::internal::VALUE]"
detected during:
instantiation of "Scalar Eigen::internal::igamma_series_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=double, mode=Eigen::internal::VALUE]"
(863): here
instantiation of "Scalar Eigen::internal::igamma_generic_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=double, mode=Eigen::internal::VALUE]"
(2096): here
instantiation of "Eigen::internal::igamma_retval<Eigen::internal::global_math_functions_filtering_base<Scalar, void>::type>::type Eigen::numext::igamma(const Scalar &, const Scalar &) [with Scalar=double]"
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/arch/CUDA/CudaSpecialFunctions.h(120): here

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(651): warning: missing return statement at end of non-void function "Eigen::internal::igammac_cf_impl<Scalar, mode>::run [with Scalar=double, mode=Eigen::internal::DERIVATIVE]"
detected during:
instantiation of "Scalar Eigen::internal::igammac_cf_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=double, mode=Eigen::internal::DERIVATIVE]"
(855): here
instantiation of "Scalar Eigen::internal::igamma_generic_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=double, mode=Eigen::internal::DERIVATIVE]"
(2102): here
instantiation of "Eigen::internal::igamma_der_a_retval<Eigen::internal::global_math_functions_filtering_base<Scalar, void>::type>::type Eigen::numext::igamma_der_a(const Scalar &, const Scalar &) [with Scalar=double]"
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/arch/CUDA/CudaSpecialFunctions.h(135): here

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(712): warning: missing return statement at end of non-void function "Eigen::internal::igamma_series_impl<Scalar, mode>::run [with Scalar=double, mode=Eigen::internal::DERIVATIVE]"
detected during:
instantiation of "Scalar Eigen::internal::igamma_series_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=double, mode=Eigen::internal::DERIVATIVE]"
(863): here
instantiation of "Scalar Eigen::internal::igamma_generic_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=double, mode=Eigen::internal::DERIVATIVE]"
(2102): here
instantiation of "Eigen::internal::igamma_der_a_retval<Eigen::internal::global_math_functions_filtering_base<Scalar, void>::type>::type Eigen::numext::igamma_der_a(const Scalar &, const Scalar &) [with Scalar=double]"
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/arch/CUDA/CudaSpecialFunctions.h(135): here

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(651): warning: missing return statement at end of non-void function "Eigen::internal::igammac_cf_impl<Scalar, mode>::run [with Scalar=double, mode=Eigen::internal::SAMPLE_DERIVATIVE]"
detected during:
instantiation of "Scalar Eigen::internal::igammac_cf_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=double, mode=Eigen::internal::SAMPLE_DERIVATIVE]"
(855): here
instantiation of "Scalar Eigen::internal::igamma_generic_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=double, mode=Eigen::internal::SAMPLE_DERIVATIVE]"
(2108): here
instantiation of "Eigen::internal::gamma_sample_der_alpha_retval<Eigen::internal::global_math_functions_filtering_base<Scalar, void>::type>::type Eigen::numext::gamma_sample_der_alpha(const Scalar &, const Scalar &) [with Scalar=double]"
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/arch/CUDA/CudaSpecialFunctions.h(154): here

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(712): warning: missing return statement at end of non-void function "Eigen::internal::igamma_series_impl<Scalar, mode>::run [with Scalar=double, mode=Eigen::internal::SAMPLE_DERIVATIVE]"
detected during:
instantiation of "Scalar Eigen::internal::igamma_series_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=double, mode=Eigen::internal::SAMPLE_DERIVATIVE]"
(863): here
instantiation of "Scalar Eigen::internal::igamma_generic_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=double, mode=Eigen::internal::SAMPLE_DERIVATIVE]"
(2108): here
instantiation of "Eigen::internal::gamma_sample_der_alpha_retval<Eigen::internal::global_math_functions_filtering_base<Scalar, void>::type>::type Eigen::numext::gamma_sample_der_alpha(const Scalar &, const Scalar &) [with Scalar=double]"
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/arch/CUDA/CudaSpecialFunctions.h(154): here

1 error detected in the compilation of "/tmp/tmpxft_000001b0_00000000-6_rasterise_egl.cpp1.ii".
CMakeFiles/rasterise.dir/build.make:75: recipe for target 'CMakeFiles/rasterise.dir/rasterise_egl.cu.o' failed
make[2]: *** [CMakeFiles/rasterise.dir/rasterise_egl.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/rasterise.dir/all' failed
make[1]: *** [CMakeFiles/rasterise.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-req-build-6f63mzbe/setup.py", line 46, in
'Programming Language :: Python :: 2.7',
File "/usr/local/lib/python3.6/dist-packages/setuptools/init.py", line 143, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.6/dist-packages/wheel/bdist_wheel.py", line 188, in run
self.run_command('build')
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-req-build-6f63mzbe/setup.py", line 24, in run
build_csrc()
File "/tmp/pip-req-build-6f63mzbe/setup.py", line 20, in build_csrc
subprocess.check_call(['make', '-j{}'.format(build_cpus)], cwd=build_path)
File "/usr/lib/python3.6/subprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make', '-j2']' returned non-zero exit status 2.


Failed building wheel for dirt
Running setup.py clean for dirt
Failed to build dirt
Installing collected packages: tensorflow-gpu, dirt
Running setup.py install for dirt ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-req-build-6f63mzbe/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-moxeakdp/install-record.txt --single-version-externally-managed --compile:
running install
running build
CMake Warning (dev) at /usr/local/lib/python2.7/dist-packages/cmake/data/share/cmake-3.12/Modules/FindOpenGL.cmake:270 (message):
Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
available. Run "cmake --help-policy CMP0072" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.

  FindOpenGL found both a legacy GL library:

    OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so

  and GLVND libraries for OpenGL and GLX:

    OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so
    OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so

  OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
  compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
  CMakeLists.txt:5 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pip-req-build-6f63mzbe/build
[ 14%] Building CUDA object CMakeFiles/rasterise.dir/rasterise_egl.cu.o
[ 28%] Building CXX object CMakeFiles/rasterise.dir/rasterise_grad_egl.cpp.o
/tmp/pip-req-build-6f63mzbe/csrc/rasterise_egl.cu:9:0: warning: "CUDA_AXIS_KERNEL_LOOP" redefined
 #define CUDA_AXIS_KERNEL_LOOP(i, n, axis)                                  \

In file included from /tmp/pip-req-build-6f63mzbe/csrc/rasterise_egl.cu:6:0:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/util/cuda_kernel_helper.h:30:0: note: this is the location of the previous definition
 #define CUDA_AXIS_KERNEL_LOOP(i, n, axis) \

/usr/local/lib/python2.7/dist-packages/tensorflow/include/absl/strings/string_view.h(496): error: constexpr function return is non-constant

/usr/local/lib/python2.7/dist-packages/tensorflow/include/google/protobuf/arena_impl.h(55): warning: integer conversion resulted in a change of sign

/usr/local/lib/python2.7/dist-packages/tensorflow/include/google/protobuf/arena_impl.h(309): warning: integer conversion resulted in a change of sign

/usr/local/lib/python2.7/dist-packages/tensorflow/include/google/protobuf/arena_impl.h(310): warning: integer conversion resulted in a change of sign

/tmp/pip-req-build-6f63mzbe/csrc/rasterise_grad_egl.cpp: In lambda function:
/tmp/pip-req-build-6f63mzbe/csrc/rasterise_grad_egl.cpp:49:90: warning: ignoring return value of ‘tensorflow::Status tensorflow::shape_inference::InferenceContext::ReplaceDim(tensorflow::shape_inference::ShapeHandle, tensorflow::int64, tensorflow::shape_inference::DimensionHandle, tensorflow::shape_inference::ShapeHandle*)’, declared with attribute warn_unused_result [-Wunused-result]
         c->ReplaceDim(c->input(0), 2, c->Dim(c->input(2), 3), &grad_vertex_colours_shape);  // i.e. vertex-colors has same shape as vertices, but with final dimension replaced by channel count
                                                                                          ^
In file included from /tmp/pip-req-build-6f63mzbe/csrc/rasterise_grad_egl.cpp:13:0:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/shape_inference.h:453:10: note: declared here
   Status ReplaceDim(ShapeHandle s, int64 dim_index, DimensionHandle new_dim,
          ^~~~~~~~~~
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(651): warning: missing return statement at end of non-void function "Eigen::internal::igammac_cf_impl<Scalar, mode>::run [with Scalar=float, mode=Eigen::internal::VALUE]"
          detected during:
            instantiation of "Scalar Eigen::internal::igammac_cf_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=float, mode=Eigen::internal::VALUE]"
(855): here
            instantiation of "Scalar Eigen::internal::igamma_generic_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=float, mode=Eigen::internal::VALUE]"
(2096): here
            instantiation of "Eigen::internal::igamma_retval<Eigen::internal::global_math_functions_filtering_base<Scalar, void>::type>::type Eigen::numext::igamma(const Scalar &, const Scalar &) [with Scalar=float]"
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsHalf.h(34): here

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(712): warning: missing return statement at end of non-void function "Eigen::internal::igamma_series_impl<Scalar, mode>::run [with Scalar=float, mode=Eigen::internal::VALUE]"
          detected during:
            instantiation of "Scalar Eigen::internal::igamma_series_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=float, mode=Eigen::internal::VALUE]"
(863): here
            instantiation of "Scalar Eigen::internal::igamma_generic_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=float, mode=Eigen::internal::VALUE]"
(2096): here
            instantiation of "Eigen::internal::igamma_retval<Eigen::internal::global_math_functions_filtering_base<Scalar, void>::type>::type Eigen::numext::igamma(const Scalar &, const Scalar &) [with Scalar=float]"
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsHalf.h(34): here

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(651): warning: missing return statement at end of non-void function "Eigen::internal::igammac_cf_impl<Scalar, mode>::run [with Scalar=float, mode=Eigen::internal::DERIVATIVE]"
          detected during:
            instantiation of "Scalar Eigen::internal::igammac_cf_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=float, mode=Eigen::internal::DERIVATIVE]"
(855): here
            instantiation of "Scalar Eigen::internal::igamma_generic_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=float, mode=Eigen::internal::DERIVATIVE]"
(2102): here
            instantiation of "Eigen::internal::igamma_der_a_retval<Eigen::internal::global_math_functions_filtering_base<Scalar, void>::type>::type Eigen::numext::igamma_der_a(const Scalar &, const Scalar &) [with Scalar=float]"
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsHalf.h(38): here

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(712): warning: missing return statement at end of non-void function "Eigen::internal::igamma_series_impl<Scalar, mode>::run [with Scalar=float, mode=Eigen::internal::DERIVATIVE]"
          detected during:
            instantiation of "Scalar Eigen::internal::igamma_series_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=float, mode=Eigen::internal::DERIVATIVE]"
(863): here
            instantiation of "Scalar Eigen::internal::igamma_generic_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=float, mode=Eigen::internal::DERIVATIVE]"
(2102): here
            instantiation of "Eigen::internal::igamma_der_a_retval<Eigen::internal::global_math_functions_filtering_base<Scalar, void>::type>::type Eigen::numext::igamma_der_a(const Scalar &, const Scalar &) [with Scalar=float]"
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsHalf.h(38): here

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(651): warning: missing return statement at end of non-void function "Eigen::internal::igammac_cf_impl<Scalar, mode>::run [with Scalar=float, mode=Eigen::internal::SAMPLE_DERIVATIVE]"
          detected during:
            instantiation of "Scalar Eigen::internal::igammac_cf_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=float, mode=Eigen::internal::SAMPLE_DERIVATIVE]"
(855): here
            instantiation of "Scalar Eigen::internal::igamma_generic_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=float, mode=Eigen::internal::SAMPLE_DERIVATIVE]"
(2108): here
            instantiation of "Eigen::internal::gamma_sample_der_alpha_retval<Eigen::internal::global_math_functions_filtering_base<Scalar, void>::type>::type Eigen::numext::gamma_sample_der_alpha(const Scalar &, const Scalar &) [with Scalar=float]"
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsHalf.h(42): here

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(712): warning: missing return statement at end of non-void function "Eigen::internal::igamma_series_impl<Scalar, mode>::run [with Scalar=float, mode=Eigen::internal::SAMPLE_DERIVATIVE]"
          detected during:
            instantiation of "Scalar Eigen::internal::igamma_series_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=float, mode=Eigen::internal::SAMPLE_DERIVATIVE]"
(863): here
            instantiation of "Scalar Eigen::internal::igamma_generic_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=float, mode=Eigen::internal::SAMPLE_DERIVATIVE]"
(2108): here
            instantiation of "Eigen::internal::gamma_sample_der_alpha_retval<Eigen::internal::global_math_functions_filtering_base<Scalar, void>::type>::type Eigen::numext::gamma_sample_der_alpha(const Scalar &, const Scalar &) [with Scalar=float]"
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsHalf.h(42): here

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(651): warning: missing return statement at end of non-void function "Eigen::internal::igammac_cf_impl<Scalar, mode>::run [with Scalar=double, mode=Eigen::internal::VALUE]"
          detected during:
            instantiation of "Scalar Eigen::internal::igammac_cf_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=double, mode=Eigen::internal::VALUE]"
(855): here
            instantiation of "Scalar Eigen::internal::igamma_generic_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=double, mode=Eigen::internal::VALUE]"
(2096): here
            instantiation of "Eigen::internal::igamma_retval<Eigen::internal::global_math_functions_filtering_base<Scalar, void>::type>::type Eigen::numext::igamma(const Scalar &, const Scalar &) [with Scalar=double]"
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/arch/CUDA/CudaSpecialFunctions.h(120): here

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(712): warning: missing return statement at end of non-void function "Eigen::internal::igamma_series_impl<Scalar, mode>::run [with Scalar=double, mode=Eigen::internal::VALUE]"
          detected during:
            instantiation of "Scalar Eigen::internal::igamma_series_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=double, mode=Eigen::internal::VALUE]"
(863): here
            instantiation of "Scalar Eigen::internal::igamma_generic_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=double, mode=Eigen::internal::VALUE]"
(2096): here
            instantiation of "Eigen::internal::igamma_retval<Eigen::internal::global_math_functions_filtering_base<Scalar, void>::type>::type Eigen::numext::igamma(const Scalar &, const Scalar &) [with Scalar=double]"
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/arch/CUDA/CudaSpecialFunctions.h(120): here

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(651): warning: missing return statement at end of non-void function "Eigen::internal::igammac_cf_impl<Scalar, mode>::run [with Scalar=double, mode=Eigen::internal::DERIVATIVE]"
          detected during:
            instantiation of "Scalar Eigen::internal::igammac_cf_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=double, mode=Eigen::internal::DERIVATIVE]"
(855): here
            instantiation of "Scalar Eigen::internal::igamma_generic_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=double, mode=Eigen::internal::DERIVATIVE]"
(2102): here
            instantiation of "Eigen::internal::igamma_der_a_retval<Eigen::internal::global_math_functions_filtering_base<Scalar, void>::type>::type Eigen::numext::igamma_der_a(const Scalar &, const Scalar &) [with Scalar=double]"
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/arch/CUDA/CudaSpecialFunctions.h(135): here

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(712): warning: missing return statement at end of non-void function "Eigen::internal::igamma_series_impl<Scalar, mode>::run [with Scalar=double, mode=Eigen::internal::DERIVATIVE]"
          detected during:
            instantiation of "Scalar Eigen::internal::igamma_series_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=double, mode=Eigen::internal::DERIVATIVE]"
(863): here
            instantiation of "Scalar Eigen::internal::igamma_generic_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=double, mode=Eigen::internal::DERIVATIVE]"
(2102): here
            instantiation of "Eigen::internal::igamma_der_a_retval<Eigen::internal::global_math_functions_filtering_base<Scalar, void>::type>::type Eigen::numext::igamma_der_a(const Scalar &, const Scalar &) [with Scalar=double]"
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/arch/CUDA/CudaSpecialFunctions.h(135): here

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(651): warning: missing return statement at end of non-void function "Eigen::internal::igammac_cf_impl<Scalar, mode>::run [with Scalar=double, mode=Eigen::internal::SAMPLE_DERIVATIVE]"
          detected during:
            instantiation of "Scalar Eigen::internal::igammac_cf_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=double, mode=Eigen::internal::SAMPLE_DERIVATIVE]"
(855): here
            instantiation of "Scalar Eigen::internal::igamma_generic_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=double, mode=Eigen::internal::SAMPLE_DERIVATIVE]"
(2108): here
            instantiation of "Eigen::internal::gamma_sample_der_alpha_retval<Eigen::internal::global_math_functions_filtering_base<Scalar, void>::type>::type Eigen::numext::gamma_sample_der_alpha(const Scalar &, const Scalar &) [with Scalar=double]"
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/arch/CUDA/CudaSpecialFunctions.h(154): here

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/SpecialFunctionsImpl.h(712): warning: missing return statement at end of non-void function "Eigen::internal::igamma_series_impl<Scalar, mode>::run [with Scalar=double, mode=Eigen::internal::SAMPLE_DERIVATIVE]"
          detected during:
            instantiation of "Scalar Eigen::internal::igamma_series_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=double, mode=Eigen::internal::SAMPLE_DERIVATIVE]"
(863): here
            instantiation of "Scalar Eigen::internal::igamma_generic_impl<Scalar, mode>::run(Scalar, Scalar) [with Scalar=double, mode=Eigen::internal::SAMPLE_DERIVATIVE]"
(2108): here
            instantiation of "Eigen::internal::gamma_sample_der_alpha_retval<Eigen::internal::global_math_functions_filtering_base<Scalar, void>::type>::type Eigen::numext::gamma_sample_der_alpha(const Scalar &, const Scalar &) [with Scalar=double]"
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../src/SpecialFunctions/arch/CUDA/CudaSpecialFunctions.h(154): here

1 error detected in the compilation of "/tmp/tmpxft_000001ea_00000000-6_rasterise_egl.cpp1.ii".
CMakeFiles/rasterise.dir/build.make:75: recipe for target 'CMakeFiles/rasterise.dir/rasterise_egl.cu.o' failed
make[2]: *** [CMakeFiles/rasterise.dir/rasterise_egl.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/rasterise.dir/all' failed
make[1]: *** [CMakeFiles/rasterise.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-req-build-6f63mzbe/setup.py", line 46, in <module>
    'Programming Language :: Python :: 2.7',
  File "/usr/local/lib/python3.6/dist-packages/setuptools/__init__.py", line 143, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python3.6/dist-packages/setuptools/command/install.py", line 61, in run
    return orig.install.run(self)
  File "/usr/lib/python3.6/distutils/command/install.py", line 589, in run
    self.run_command('build')
  File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/tmp/pip-req-build-6f63mzbe/setup.py", line 24, in run
    build_csrc()
  File "/tmp/pip-req-build-6f63mzbe/setup.py", line 20, in build_csrc
    subprocess.check_call(['make', '-j{}'.format(build_cpus)], cwd=build_path)
  File "/usr/lib/python3.6/subprocess.py", line 291, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make', '-j2']' returned non-zero exit status 2.

segmentation fault for square_test.py

hi, i have successfully built dirt with the cmake command
cmake ../csrc -DOpenGL_PREFERENCE=GLVND

below is the ldd librastarise.so output gdb stack:
librastarise

GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python...(no debugging symbols found)...done.
Starting program: /usr/bin/python tests/square_test.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff3ea6700 (LWP 4841)]
[New Thread 0x7ffff36a5700 (LWP 4842)]
[New Thread 0x7ffff0ea4700 (LWP 4843)]
[New Thread 0x7fffec6a3700 (LWP 4844)]
[New Thread 0x7fffe9ea2700 (LWP 4845)]
[New Thread 0x7fffe76a1700 (LWP 4846)]
[New Thread 0x7fffe4ea0700 (LWP 4847)]
[Thread 0x7fffe4ea0700 (LWP 4847) exited]
[Thread 0x7fffe76a1700 (LWP 4846) exited]
[Thread 0x7fffe9ea2700 (LWP 4845) exited]
[Thread 0x7fffec6a3700 (LWP 4844) exited]
[Thread 0x7ffff0ea4700 (LWP 4843) exited]
[Thread 0x7ffff36a5700 (LWP 4842) exited]
[Thread 0x7ffff3ea6700 (LWP 4841) exited]
WARNING:tensorflow:From tests/square_test.py:41: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.

[New Thread 0x7fffe4ea0700 (LWP 4851)]
2019-09-12 15:50:00.782730: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcuda.so.1
[New Thread 0x7fffe76a1700 (LWP 4852)]
2019-09-12 15:50:00.795398: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1005] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-09-12 15:50:00.795987: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 0 with properties:
name: GeForce GTX 1070 major: 6 minor: 1 memoryClockRate(GHz): 1.683
pciBusID: 0000:01:00.0
2019-09-12 15:50:00.799918: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudart.so.10.0
2019-09-12 15:50:00.808814: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcublas.so.10.0
2019-09-12 15:50:00.813297: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcufft.so.10.0
2019-09-12 15:50:00.816800: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcurand.so.10.0
2019-09-12 15:50:00.823417: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcusolver.so.10.0
2019-09-12 15:50:00.828508: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcusparse.so.10.0
2019-09-12 15:50:00.834386: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudnn.so.7
2019-09-12 15:50:00.834486: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1005] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-09-12 15:50:00.835360: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1005] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-09-12 15:50:00.836154: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1763] Adding visible gpu devices: 0
2019-09-12 15:50:00.836557: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
[New Thread 0x7fffe9ea2700 (LWP 4853)]
[New Thread 0x7fffec6a3700 (LWP 4854)]
[New Thread 0x7fff94c90700 (LWP 4855)]
[New Thread 0x7fff83249700 (LWP 4856)]
[New Thread 0x7fff82a48700 (LWP 4857)]
[New Thread 0x7fff82247700 (LWP 4858)]
[New Thread 0x7fff81a46700 (LWP 4859)]
[New Thread 0x7fff81245700 (LWP 4860)]
[New Thread 0x7fff80a44700 (LWP 4861)]
[New Thread 0x7fff3d3c8700 (LWP 4862)]
[New Thread 0x7fff3cbc7700 (LWP 4863)]
[New Thread 0x7fff0ffff700 (LWP 4864)]
[New Thread 0x7fff0f7fe700 (LWP 4865)]
2019-09-12 15:50:00.904098: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1005] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-09-12 15:50:00.904740: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x416ad30 executing computations on platform CUDA. Devices:
2019-09-12 15:50:00.904771: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): GeForce GTX 1070, Compute Capability 6.1
[Thread 0x7fff3d3c8700 (LWP 4862) exited]
[New Thread 0x7fff3d3c8700 (LWP 4866)]
[New Thread 0x7fff0effd700 (LWP 4867)]
[New Thread 0x7fff0e7fc700 (LWP 4868)]
2019-09-12 15:50:00.924626: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 3600000000 Hz
[New Thread 0x7fff0effd700 (LWP 4869)]
[Thread 0x7fff0effd700 (LWP 4867) exited]
[New Thread 0x7fff0dffb700 (LWP 4870)]
[New Thread 0x7fff0d7fa700 (LWP 4871)]
[New Thread 0x7fff0cff9700 (LWP 4872)]
[New Thread 0x7fff05fff700 (LWP 4873)]
[New Thread 0x7fff057fe700 (LWP 4874)]
[New Thread 0x7fff04ffd700 (LWP 4875)]
[New Thread 0x7ffef9fff700 (LWP 4876)]
2019-09-12 15:50:00.925739: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x41dbdf0 executing computations on platform Host. Devices:
2019-09-12 15:50:00.925756: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): ,
[New Thread 0x7ffef97fe700 (LWP 4877)]
2019-09-12 15:50:00.925922: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1005] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-09-12 15:50:00.926432: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 0 with properties:
name: GeForce GTX 1070 major: 6 minor: 1 memoryClockRate(GHz): 1.683
pciBusID: 0000:01:00.0
2019-09-12 15:50:00.926461: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudart.so.10.0
2019-09-12 15:50:00.926471: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcublas.so.10.0
2019-09-12 15:50:00.926481: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcufft.so.10.0
2019-09-12 15:50:00.926490: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcurand.so.10.0
2019-09-12 15:50:00.926499: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcusolver.so.10.0
2019-09-12 15:50:00.926508: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcusparse.so.10.0
2019-09-12 15:50:00.926516: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudnn.so.7
2019-09-12 15:50:00.926553: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1005] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-09-12 15:50:00.927056: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1005] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-09-12 15:50:00.927535: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1763] Adding visible gpu devices: 0
2019-09-12 15:50:00.927557: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudart.so.10.0
2019-09-12 15:50:00.928306: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1181] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-09-12 15:50:00.928318: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1187] 0
2019-09-12 15:50:00.928324: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1200] 0: N
2019-09-12 15:50:00.928431: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1005] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-09-12 15:50:00.928942: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1005] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-09-12 15:50:00.929440: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1326] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 7182 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1070, pci bus id: 0000:01:00.0, compute capability: 6.1)
[New Thread 0x7ffef8ffd700 (LWP 4878)]
[New Thread 0x7ffecbfff700 (LWP 4879)]
[New Thread 0x7ffecb7fe700 (LWP 4880)]
[New Thread 0x7ffecaffd700 (LWP 4881)]
[New Thread 0x7ffeca7fc700 (LWP 4882)]
[New Thread 0x7ffec9ffb700 (LWP 4883)]
[New Thread 0x7ffec97fa700 (LWP 4884)]
[New Thread 0x7ffec8ff9700 (LWP 4885)]
[New Thread 0x7ffeb3fff700 (LWP 4886)]
[New Thread 0x7ffeb37fe700 (LWP 4887)]

Thread 1 "python" received signal SIGSEGV, Segmentation fault.
0x00007fff99042577 in tensorflow::Status tensorflow::shape_inference::InferenceContext::GetAttr(absl::string_view, int*) const () from /home/drive/dirt/dirt/librasterise.so
#0 0x00007fff99042577 in tensorflow::Status tensorflow::shape_inference::InferenceContext::GetAttr(absl::string_view, int*) const () from /home/drive/dirt/dirt/librasterise.so
#1 0x00007fff9903b8a6 in {lambda(tensorflow::shape_inference::InferenceContext*)#1}::operator()(tensorflow::shape_inference::InferenceContext*) const () from /home/drive/dirt/dirt/librasterise.so
#2 0x00007fff9903bb3e in {lambda(tensorflow::shape_inference::InferenceContext*)#1}::_FUN(tensorflow::shape_inference::InferenceContext*) () from /home/drive/dirt/dirt/librasterise.so
#3 0x00007fff99042c69 in std::_Function_handler<tensorflow::Status (tensorflow::shape_inference::InferenceContext*), tensorflow::Status ()(tensorflow::shape_inference::InferenceContext)>::_M_invoke(std::_Any_data const&, tensorflow::shape_inference::InferenceContext*&&) () from /home/drive/dirt/dirt/librasterise.so
#4 0x00007fffa64fda9d in tensorflow::shape_inference::InferenceContext::Run(std::function<tensorflow::Status (tensorflow::shape_inference::InferenceContext*)> const&) ()
from /home/drive/.local/lib/python2.7/site-packages/tensorflow/python/../libtensorflow_framework.so.1
#5 0x00007fffaf772350 in tensorflow::ShapeRefiner::RunShapeFn(tensorflow::Node const*, tensorflow::OpRegistrationData const*, tensorflow::ExtendedInferenceContext*) ()
from /home/drive/.local/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so
#6 0x00007fffaf773e78 in tensorflow::ShapeRefiner::AddNode(tensorflow::Node const*) () from /home/drive/.local/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so
#7 0x00007fffac5c175a in TF_FinishOperation () from /home/drive/.local/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so
#8 0x00007fffa9e34bd6 in _wrap_TF_FinishOperation () from /home/drive/.local/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so
#9 0x00000000004bd1da in PyEval_EvalFrameEx ()
#10 0x00000000004ba916 in PyEval_EvalCodeEx ()
#11 0x00000000004c2c3c in PyEval_EvalFrameEx ()
#12 0x00000000004ba916 in PyEval_EvalCodeEx ()
#13 0x00000000004d6353 in ?? ()
#14 0x00000000004eec7e in ?? ()
#15 0x00000000004ee836 in ?? ()
#16 0x00000000004ab6fb in ?? ()
#17 0x00000000004c235d in PyEval_EvalFrameEx ()
#18 0x00000000004ba916 in PyEval_EvalCodeEx ()
#19 0x00000000004d6353 in ?? ()
#20 0x00000000004a63fe in PyObject_Call ()
#21 0x00000000004c35d8 in PyEval_EvalFrameEx ()
#22 0x00000000004ba916 in PyEval_EvalCodeEx ()
#23 0x00000000004c2c3c in PyEval_EvalFrameEx ()
#24 0x00000000004ba916 in PyEval_EvalCodeEx ()
#25 0x00000000004c24ea in PyEval_EvalFrameEx ()
#26 0x00000000004ba916 in PyEval_EvalCodeEx ()
#27 0x00000000004c24ea in PyEval_EvalFrameEx ()
#28 0x00000000004ba916 in PyEval_EvalCodeEx ()
#29 0x00000000004c24ea in PyEval_EvalFrameEx ()
#30 0x00000000004ba916 in PyEval_EvalCodeEx ()
#31 0x00000000004c24ea in PyEval_EvalFrameEx ()
#32 0x00000000004c210f in PyEval_EvalFrameEx ()
#33 0x00000000004c210f in PyEval_EvalFrameEx ()
#34 0x00000000004ba916 in PyEval_EvalCodeEx ()
#35 0x00000000004eb1bf in ?? ()
#36 0x00000000004e5e52 in PyRun_FileExFlags ()
#37 0x00000000004e4706 in PyRun_SimpleFileExFlags ()
#38 0x000000000049380e in Py_Main ()
#39 0x00007ffff7810830 in __libc_start_main (main=0x4932b0

, argc=2, argv=0x7fffffffdd58, init=, fini=, rtld_fini=, stack_end=0x7fffffffdd48)
---Type to continue, or q to quit---q
at ../csu/lQuit
A debugging session is active.

Inferior 1 [process 4837] will be killed.

could you please check what went wrong in the installation?.

Adding transparency support?

I'd like to render a stack of transparent shapes, and I'm wondering how easy this would be to achieve.

Currently, I'm rendering shape-by-shape and then alpha-compositing them in separate tensorflow operations, but this is slower than I'd like and I'm finding I'm debugging a number of problems where tf is trying to move things back and forth between the CPU and GPU.

I had a go at hacking together support, but I couldn't get it working. I don't really know opengl programming, so that is probably part of the problem.

Here's what I tried:

  • In shaders.cpp convert vec3 to vec4 for colour_in and colous_out in the forward shaders:

    dirt/csrc/shaders.cpp

    Lines 16 to 43 in 45119bb

    shaders::Shader const shaders::forward_vertex {
    "forward_vertex", GL_VERTEX_SHADER, HEADER R"glsl(
    layout(location = 0) in vec4 position;
    layout(location = 1) in vec3 colour_in;
    layout(location = 0) smooth out vec3 colour_out;
    void main() {
    gl_Position = position;
    colour_out = colour_in;
    }
    )glsl"
    };
    shaders::Shader const shaders::forward_fragment{
    "forward_fragment", GL_FRAGMENT_SHADER, HEADER R"glsl(
    layout(location = 0) smooth in vec3 colour_in;
    layout(location = 0) out vec4 colour_out;
    void main() {
    colour_out = vec4(colour_in, 1.f);
    }
    )glsl"
    };
  • In rasterise_egl.cpp allow import of RGBA colours:

    dirt/csrc/rasterise_egl.cpp

    Lines 308 to 309 in 45119bb

    Tensor const &vertex_colors_tensor = context->input(2);
    OP_REQUIRES(context, vertex_colors_tensor.shape().dims() == 3 && vertex_colors_tensor.shape().dim_size(1) == vertices_tensor.shape().dim_size(1) && vertex_colors_tensor.shape().dim_size(2) == objects.channels, errors::InvalidArgument("Rasterise expects vertex_colors to be 3D, and vertex_colors.shape == [None, vertices.shape[1], channels]"));
  • Change the call to glVertexAttribPointer to take objects of size 4 instead of objects.channels:
    glVertexAttribPointer(1, objects.channels, GL_FLOAT, GL_FALSE, 0, (void *) 0);
  • Added glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); at the end of initialise_per_thread_objects:
    glEnable(GL_SCISSOR_TEST);

This still draws the triangles that I expect in the colours that I expect, but they are still opaque, not transparent. (The triangles I'm feeding in have random numbers for their vertex colour alpha components.)

Any ideas what else I might need to change to make this work?

[edit]: I was incorrect about the triangle colours:

If I pass an alpha of <1, the triangles are rendered in a lighter colour. So:

  • If I render a triangle with colours [1., 0., 0., 0.5], [1., 0., 0., 0.5], [1., 0., 0., 0.5] then I get a pink triangle. which is what I would expect.
  • If I add another triangle that crosses the pink one, with colours [0., 0., 1., 0.5], [0., 0., 1., 0.5], [0., 0., 1., 0.5] then it is rendered in light blue
  • But, where they intersect, the blue colour overwrites the pink instead of merging with it. I would expect to see a purple colour, but instead, the blue triangle is a uniform colour and occludes the pink one.

Reference

Hi, I was going through your code and noticed some external reference, i.e. see notes p37-38. Would it be possible to have these references ?

Christophe

setup error when use colab

Building wheels for collected packages: dirt
Building wheel for dirt (setup.py) ... error
ERROR: Failed building wheel for dirt
Running setup.py clean for dirt
Failed to build dirt
ERROR: tensorflow 1.15.0 has requirement tensorboard<1.16.0,>=1.15.0, but you'll have tensorboard 2.0.1 which is incompatible.
ERROR: tensorflow 1.15.0 has requirement tensorflow-estimator==1.15.1, but you'll have tensorflow-estimator 2.0.1 which is incompatible.
ERROR: tensorboard 2.0.1 has requirement grpcio>=1.24.3, but you'll have grpcio 1.15.0 which is incompatible.
ERROR: google-colab 1.0.0 has requirement google-auth~=1.4.0, but you'll have google-auth 1.6.3 which is incompatible.
Installing collected packages: google-auth, tensorboard, tensorflow-estimator, tensorflow-gpu, dirt
Found existing installation: google-auth 1.4.2
Uninstalling google-auth-1.4.2:
Successfully uninstalled google-auth-1.4.2
Found existing installation: tensorboard 1.15.0
Uninstalling tensorboard-1.15.0:
Successfully uninstalled tensorboard-1.15.0
Found existing installation: tensorflow-estimator 1.15.1
Uninstalling tensorflow-estimator-1.15.1:
Successfully uninstalled tensorflow-estimator-1.15.1
Running setup.py install for dirt ... error
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-idwy8yj3/setup.py'"'"'; file='"'"'/tmp/pip-req-build-idwy8yj3/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-e3r18up2/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

tensorflow.python.framework.errors_impl.NotFoundError: ....../dirt-master/dirt/librasterise.so: undefined symbol: glGetProgramInfoLog

When I run $ python tests/square_test.py, I get an error as follow:

Traceback (most recent call last):
  File "tests/square_test.py", line 4, in <module>
    import dirt
  File "/home/chenww/octopus/Dependencies/dirt-master/dirt/__init__.py", line 2, in <module>
    from .rasterise_ops import rasterise, rasterise_batch
  File "/home/chenww/octopus/Dependencies/dirt-master/dirt/rasterise_ops.py", line 7, in <module>
    _rasterise_module = tf.load_op_library(_lib_path + '/librasterise.so')
  File "/home/chenww/octopus/Dependencies/dirt-master/env/local/lib/python3.5/site-packages/tensorflow/python/framework/load_library.py", line 58, in load_op_library
    lib_handle = py_tf.TF_LoadLibrary(library_filename, status)
  File "/home/chenww/octopus/Dependencies/dirt-master/env/local/lib/python3.5/site-packages/tensorflow/python/framework/errors_impl.py", line 516, in __exit__
    c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: /home/chenww/octopus/Dependencies/dirt-master/dirt/librasterise.so: undefined symbol: glGetProgramInfoLog

====================================================================

run : $ ldd dirt/librasterise.so

linux-vdso.so.1 =>  (0x00007fff56bf6000)
	libtensorflow_framework.so => /home/chenww/octopus/Dependencies/dirt-master/env/local/lib/python3.5/site-packages/tensorflow/libtensorflow_framework.so (0x00007f4eed2b4000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f4eed08f000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f4eece71000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4eecc6d000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f4eec88a000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f4eec580000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f4eec368000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4eebf9e000)
	/lib64/ld-linux-x86-64.so.2 (0x000055ae736e8000)
	libcublas.so.9.0 => /usr/local/cuda-9.0/lib64/libcublas.so.9.0 (0x00007f4ee8b66000)
	libcuda.so.1 => /usr/lib/x86_64-linux-gnu/libcuda.so.1 (0x00007f4ee7fc6000)
	libcudnn.so.7 => /usr/local/cuda-9.0/lib64/libcudnn.so.7 (0x00007f4ed4686000)
	libcufft.so.9.0 => /usr/local/cuda-9.0/lib64/libcufft.so.9.0 (0x00007f4ecc5e5000)
	libcurand.so.9.0 => /usr/local/cuda-9.0/lib64/libcurand.so.9.0 (0x00007f4ec8681000)
	libcudart.so.9.0 => /usr/local/cuda-9.0/lib64/libcudart.so.9.0 (0x00007f4ec8413000)
	libnvidia-fatbinaryloader.so.390.87 => /usr/lib/x86_64-linux-gnu/libnvidia-fatbinaryloader.so.390.87 (0x00007f4ec81c7000)

what's wrong ? thank you @pmh47 Paul

Inverse rendering problem (From edge to vertex)

I know that the software can render image of a mesh. Is it possible to inverse project the image back to get the corresponding vertices. I have some detected silhouette edge of the mesh image and will like to get the corresponding vertex indexes. Thank you for your response

Does this work on headless systems?

More of a question than an issue, but was just wondering. I didn't see you use EGL so not sure if this just works on a headless system, as most of servers where we train our models are headless.

Yet another differentiable TF rasterer

Hi @pmh47 ,

first of all greetings for your great work (and implementation I would say!). I definitely have something to study in the next days!

Just for the sake of completeness, we recently released the code for a very basic differentiable renderer in TensorFlow, published at ECCVW. You can find it here: https://github.com/ndrplz/tensorflow-mesh-renderer

It's much more basic (and slower I guess) than yours, but on the upside it's just one python file, so maybe someone could be interested at least for educational purpose. Feel free to add it to the list of alternatives if you like!

Keep up your great work!
Best,
Andrea

More details on graphics + compute mode in README

Hi,

Could you give more details on this point in the README file:

You should ensure that compute + graphics mode is enabled (through nvidia-smi) for your GPU

How can I ensure that? I looked at nvidia-smi manpage but it wasn't obvious to me, and google shows references to a tool call gpumodeswitch that I don't know how to get.

--Thi

extensions not available

Hi, thanks for your great work!
I compiled and installed dirt successfully but an error occurs when I run the test script tests/square_test.py.


python tests/square_test.py
2019-04-10 16:23:48.485565: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-04-10 16:23:51.010225: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1392] Found device 0 with properties:
name: GeForce GTX 1080 Ti major: 6 minor: 1 memoryClockRate(GHz): 1.582
pciBusID: 0000:02:00.0
totalMemory: 10.91GiB freeMemory: 10.75GiB
2019-04-10 16:23:51.281038: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1392] Found device 1 with properties:
name: GeForce GTX 1080 Ti major: 6 minor: 1 memoryClockRate(GHz): 1.582
pciBusID: 0000:03:00.0
totalMemory: 10.91GiB freeMemory: 10.75GiB
2019-04-10 16:23:51.564684: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1392] Found device 2 with properties:
name: GeForce GTX 1080 Ti major: 6 minor: 1 memoryClockRate(GHz): 1.582
pciBusID: 0000:83:00.0
totalMemory: 10.91GiB freeMemory: 1.71GiB
2019-04-10 16:23:51.894811: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1392] Found device 3 with properties:
name: GeForce GTX 1080 Ti major: 6 minor: 1 memoryClockRate(GHz): 1.582
pciBusID: 0000:84:00.0
totalMemory: 10.91GiB freeMemory: 10.75GiB
2019-04-10 16:23:51.897135: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1471] Adding visible gpu devices: 0, 1, 2, 3
2019-04-10 16:23:53.256778: I tensorflow/core/common_runtime/gpu/gpu_device.cc:952] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-04-10 16:23:53.256819: I tensorflow/core/common_runtime/gpu/gpu_device.cc:958] 0 1 2 3
2019-04-10 16:23:53.256830: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 0: N Y N N
2019-04-10 16:23:53.256838: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 1: Y N N N
2019-04-10 16:23:53.256844: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 2: N N N Y
2019-04-10 16:23:53.256851: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 3: N N Y N
2019-04-10 16:23:53.257792: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1084] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10403 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1080 Ti, pci bus id: 0000:02:00.0, compute capability: 6.1)
2019-04-10 16:23:53.424878: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1084] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:1 with 10403 MB memory) -> physical GPU (device: 1, name: GeForce GTX 1080 Ti, pci bus id: 0000:03:00.0, compute capability: 6.1)
2019-04-10 16:23:53.594674: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1084] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:2 with 1461 MB memory) -> physical GPU (device: 2, name: GeForce GTX 1080 Ti, pci bus id: 0000:83:00.0, compute capability: 6.1)
2019-04-10 16:23:53.619942: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1084] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:3 with 10403 MB memory) -> physical GPU (device: 3, name: GeForce GTX 1080 Ti, pci bus id: 0000:84:00.0, compute capability: 6.1)
2019-04-10 16:23:53.875018: F /tmp/pip-req-build-hPrDXQ/csrc/gl_common.h:46] extensions eglQueryDevicesEXT, eglQueryDeviceAttribEXT and eglGetPlatformDisplayEXT not available
[1] 656228 abort (core dumped) python tests/square_test.py


I checked that all the requirements in README are met. I also searched and didn't find a solution in https://github.com/pmh47/dirt/issues/2.
I ran the following lines but it looks like there is nothing wrong.

import dirt.rasterise_ops import subprocess subprocess.call(['ldd', dirt.rasterise_ops._lib_path + '/librasterise.so'])

    linux-vdso.so.1 (0x00007ffc33d25000)
    libEGL.so.1 => /usr/lib/x86_64-linux-gnu/libEGL.so.1 (0x00007f161761f000)
    libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007f161737b000)
    libGLU.so.1 => /usr/lib/x86_64-linux-gnu/libGLU.so.1 (0x00007f161710d000)
    libtensorflow_framework.so => /data00/home/wangxinlong/anaconda2/lib/python2.7/site-packages/tensorflow/libtensorflow_framework.so (0x00007f1616125000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f1615f1d000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1615d00000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1615afc000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f16157f1000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f16154f0000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f16152da000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1614f2f000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f1617bd4000)
    libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f1614d2d000)
    libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f16149ea000)
    libxcb-dri2.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0 (0x00007f16147e5000)
    libxcb-xfixes.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-xfixes.so.0 (0x00007f16145dd000)
    libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007f16143d3000)
    libxcb-shape.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shape.so.0 (0x00007f16141cf000)
    libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f1613fad000)
    libwayland-client.so.0 => /usr/lib/x86_64-linux-gnu/libwayland-client.so.0 (0x00007f1613d9e000)
    libwayland-server.so.0 => /usr/lib/x86_64-linux-gnu/libwayland-server.so.0 (0x00007f1613b8c000)
    libgbm.so.1 => /usr/lib/x86_64-linux-gnu/libgbm.so.1 (0x00007f161397e000)
    libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f1613755000)
    libdrm.so.2 => /usr/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007f1613548000)
    libGLX.so.0 => /usr/lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f1613318000)
    libGLdispatch.so.0 => /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f161304a000)
    libcublas.so.9.0 => /usr/local/cuda-9.0/lib64/libcublas.so.9.0 (0x00007f160fc14000)
    libcuda.so.1 => /usr/lib/x86_64-linux-gnu/libcuda.so.1 (0x00007f160ed97000)
    libcudnn.so.7 => /usr/local/cuda-9.0/lib64/libcudnn.so.7 (0x00007f15fc011000)
    libcufft.so.9.0 => /usr/local/cuda-9.0/lib64/libcufft.so.9.0 (0x00007f15f3f70000)
    libcurand.so.9.0 => /usr/local/cuda-9.0/lib64/libcurand.so.9.0 (0x00007f15f000c000)
    libcudart.so.9.0 => /usr/local/cuda-9.0/lib64/libcudart.so.9.0 (0x00007f15efd9f000)
    libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f15efb9b000)
    libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f15ef996000)
    libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f15ef78d000)
    libglapi.so.0 => /usr/lib/x86_64-linux-gnu/libglapi.so.0 (0x00007f15ef563000)
    libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f15ef351000)
    libnvidia-fatbinaryloader.so.384.81 => /usr/lib/x86_64-linux-gnu/libnvidia-fatbinaryloader.so.384.81 (0x00007f15ef0ff000)

Thanks for your help in advance. Any suggestion will be greatly appreciated:)

gl_common.h:42:42: error: ‘PFNEGLQUERYDEVICESEXTPROC’ was not declared in this scope

(octopus) test@True3d-pc2:/octopus/dirt-master/build$ cmake ../csrc
-- The CXX compiler identification is GNU 4.8.4
-- The CUDA compiler identification is NVIDIA 9.0.176
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working CUDA compiler: /usr/local/cuda-9.0/bin/nvcc
-- Check for working CUDA compiler: /usr/local/cuda-9.0/bin/nvcc -- works
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/test/octopus/dirt-master/build
(octopus) test@True3d-pc2:
/octopus/dirt-master/build$ make
Scanning dependencies of target rasterise
[ 14%] Building CXX object CMakeFiles/rasterise.dir/rasterise_egl.cpp.o
In file included from /home/test/octopus/dirt-master/csrc/rasterise_egl.cpp:28:0:
/home/test/octopus/dirt-master/csrc/gl_common.h: In function ‘void gl_common::initialise_context(int)’:
/home/test/octopus/dirt-master/csrc/gl_common.h:42:42: error: ‘PFNEGLQUERYDEVICESEXTPROC’ was not declared in this scope
auto const eglQueryDevicesEXT = (PFNEGLQUERYDEVICESEXTPROC) eglGetProcAddress("eglQueryDevicesEXT");
^
/home/test/octopus/dirt-master/csrc/gl_common.h:43:47: error: ‘PFNEGLQUERYDEVICEATTRIBEXTPROC’ was not declared in this scope
auto const eglQueryDeviceAttribEXT = (PFNEGLQUERYDEVICEATTRIBEXTPROC) eglGetProcAddress("eglQueryDeviceAttribEXT");
^
/home/test/octopus/dirt-master/csrc/gl_common.h:44:48: error: ‘PFNEGLGETPLATFORMDISPLAYEXTPROC’ was not declared in this scope
auto const eglGetPlatformDisplayEXT = (PFNEGLGETPLATFORMDISPLAYEXTPROC) eglGetProcAddress("eglGetPlatformDisplayEXT");
^
/home/test/octopus/dirt-master/csrc/gl_common.h:50:9: error: ‘EGLDeviceEXT’ was not declared in this scope
EGLDeviceEXT eglDevs[MAX_DEVICES];
^
/home/test/octopus/dirt-master/csrc/gl_common.h:50:22: error: expected ‘;’ before ‘eglDevs’
EGLDeviceEXT eglDevs[MAX_DEVICES];
^
/home/test/octopus/dirt-master/csrc/gl_common.h:52:46: error: ‘eglDevs’ was not declared in this scope
if (!eglQueryDevicesEXT(MAX_DEVICES, eglDevs, &numDevices) || numDevices == 0)
^
/home/test/octopus/dirt-master/csrc/gl_common.h:59:17: error: ‘EGLAttrib’ was not declared in this scope
EGLAttrib cudaDeviceId = -1;
^
/home/test/octopus/dirt-master/csrc/gl_common.h:59:27: error: expected ‘;’ before ‘cudaDeviceId’
EGLAttrib cudaDeviceId = -1;
^
/home/test/octopus/dirt-master/csrc/gl_common.h:60:41: error: ‘eglDevs’ was not declared in this scope
eglQueryDeviceAttribEXT(eglDevs[eglDeviceIndex], EGL_CUDA_DEVICE_NV, &cudaDeviceId);
^
/home/test/octopus/dirt-master/csrc/gl_common.h:60:66: error: ‘EGL_CUDA_DEVICE_NV’ was not declared in this scope
eglQueryDeviceAttribEXT(eglDevs[eglDeviceIndex], EGL_CUDA_DEVICE_NV, &cudaDeviceId);
^
/home/test/octopus/dirt-master/csrc/gl_common.h:60:87: error: ‘cudaDeviceId’ was not declared in this scope
eglQueryDeviceAttribEXT(eglDevs[eglDeviceIndex], EGL_CUDA_DEVICE_NV, &cudaDeviceId);
^
In file included from /home/test/octopus/dirt-master/csrc/rasterise_egl.cpp:28:0:
/home/test/octopus/dirt-master/csrc/gl_common.h:70:54: error: ‘EGL_PLATFORM_DEVICE_EXT’ was not declared in this scope
auto const eglDpy = eglGetPlatformDisplayEXT(EGL_PLATFORM_DEVICE_EXT, eglDevs[eglDeviceIndex], 0);
^
/home/test/octopus/dirt-master/csrc/gl_common.h:70:79: error: ‘eglDevs’ was not declared in this scope
auto const eglDpy = eglGetPlatformDisplayEXT(EGL_PLATFORM_DEVICE_EXT, eglDevs[eglDeviceIndex], 0);
^
/home/test/octopus/dirt-master/csrc/rasterise_egl.cpp: In member function ‘void RegisteredBuffer::ensure_size(const size_t&)’:
/home/test/wangxuan/octopus/dirt-master/csrc/rasterise_egl.cpp:81:76: error: ‘glNamedBufferData’ was not declared in this scope
glNamedBufferData(gl_index, required_size, nullptr, GL_DYNAMIC_COPY);
^
make[2]: *** [CMakeFiles/rasterise.dir/rasterise_egl.cpp.o] Error 1
make[1]: *** [CMakeFiles/rasterise.dir/all] Error 2
make: *** [all] Error 2

when I RUN python tests/square_test.py ,there is an error 段错误 (核心已转储)

2019-09-01 16:17:58.393811: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
2019-09-01 16:17:58.473721: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:897] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-09-01 16:17:58.474137: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1392] Found device 0 with properties:
name: GeForce GTX 1060 6GB major: 6 minor: 1 memoryClockRate(GHz): 1.7335
pciBusID: 0000:01:00.0
totalMemory: 5.93GiB freeMemory: 5.59GiB
2019-09-01 16:17:58.474167: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1471] Adding visible gpu devices: 0
2019-09-01 16:17:58.697347: I tensorflow/core/common_runtime/gpu/gpu_device.cc:952] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-09-01 16:17:58.697398: I tensorflow/core/common_runtime/gpu/gpu_device.cc:958] 0
2019-09-01 16:17:58.697407: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 0: N
2019-09-01 16:17:58.697582: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1084] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 5364 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1060 6GB, pci bus id: 0000:01:00.0, compute capability: 6.1)
2019-09-01 16:17:58.886362: I /tmp/pip-req-build-1Fy_YH/csrc/gl_common.h:66] selected egl device #0 to match cuda device #0 for thread 0x7f8ce57fa700
段错误 (核心已转储)

TensorFlow 1.14 in docker causes segfault

Using TensorFlow 1.14 in the Dockerfile results in a segfault in square_test.py. Backtrace:

#0  0x00007fff9f2877b7 in tensorflow::Status tensorflow::shape_inference::InferenceContext::GetAttr<int>(absl::string_view, int*) const ()
   from /usr/local/lib/python2.7/dist-packages/dirt/librasterise.so
#1  0x00007fff9f280ae6 in {lambda(tensorflow::shape_inference::InferenceContext*)#1}::operator()(tensorflow::shape_inference::InferenceContext*) const ()
   from /usr/local/lib/python2.7/dist-packages/dirt/librasterise.so
#2  0x00007fff9f280d7e in {lambda(tensorflow::shape_inference::InferenceContext*)#1}::_FUN(tensorflow::shape_inference::InferenceContext*) ()
   from /usr/local/lib/python2.7/dist-packages/dirt/librasterise.so
#3  0x00007fff9f287ea9 in std::_Function_handler<tensorflow::Status (tensorflow::shape_inference::InferenceContext*), tensorflow::Status (*)(tensorflow::shape_inference::InferenceContext*)>::_M_invoke(std::_Any_data const&, tensorflow::shape_inference::InferenceContext*&&) ()
   from /usr/local/lib/python2.7/dist-packages/dirt/librasterise.so
#4  0x00007fffa6ef6a9d in tensorflow::shape_inference::InferenceContext::Run(std::function<tensorflow::Status (tensorflow::shape_inference::InferenceContext*)> const&)
    () from /usr/local/lib/python2.7/dist-packages/tensorflow/python/../libtensorflow_framework.so.1
#5  0x00007fffb016b350 in tensorflow::ShapeRefiner::RunShapeFn(tensorflow::Node const*, tensorflow::OpRegistrationData const*, tensorflow::ExtendedInferenceContext*) ()
   from /usr/local/lib/python2.7/dist-packages/tensorflow/python/_pywrap_tensorflow_internal.so
#6  0x00007fffb016ce78 in tensorflow::ShapeRefiner::AddNode(tensorflow::Node const*) ()
   from /usr/local/lib/python2.7/dist-packages/tensorflow/python/_pywrap_tensorflow_internal.so
#7  0x00007fffacfba75a in TF_FinishOperation () from /usr/local/lib/python2.7/dist-packages/tensorflow/python/_pywrap_tensorflow_internal.so
#8  0x00007fffaa82dbd6 in _wrap_TF_FinishOperation () from /usr/local/lib/python2.7/dist-packages/tensorflow/python/_pywrap_tensorflow_internal.so
#9  0x00000000004bc4aa in PyEval_EvalFrameEx ()
#10 0x00000000004b9b66 in PyEval_EvalCodeEx ()
#11 0x00000000004c1f56 in PyEval_EvalFrameEx ()
#12 0x00000000004b9b66 in PyEval_EvalCodeEx ()
#13 0x00000000004d57a3 in ?? ()
#14 0x00000000004eef5e in ?? ()
#15 0x00000000004eeb66 in ?? ()
#16 0x00000000004aaafb in ?? ()
#17 0x00000000004c166d in PyEval_EvalFrameEx ()
#18 0x00000000004b9b66 in PyEval_EvalCodeEx ()
#19 0x00000000004d57a3 in ?? ()
#20 0x00000000004a587e in PyObject_Call ()
#21 0x00000000004be51e in PyEval_EvalFrameEx ()
#22 0x00000000004b9b66 in PyEval_EvalCodeEx ()
#23 0x00000000004c1f56 in PyEval_EvalFrameEx ()
#24 0x00000000004b9b66 in PyEval_EvalCodeEx ()
#25 0x00000000004c17c6 in PyEval_EvalFrameEx ()
#26 0x00000000004b9b66 in PyEval_EvalCodeEx ()
#27 0x00000000004c17c6 in PyEval_EvalFrameEx ()
#28 0x00000000004b9b66 in PyEval_EvalCodeEx ()
#29 0x00000000004c17c6 in PyEval_EvalFrameEx ()
#30 0x00000000004c141f in PyEval_EvalFrameEx ()
#31 0x00000000004c141f in PyEval_EvalFrameEx ()
#32 0x00000000004b9b66 in PyEval_EvalCodeEx ()
#33 0x00000000004eb69f in ?? ()
#34 0x00000000004e58f2 in PyRun_FileExFlags ()
#35 0x00000000004e41a6 in PyRun_SimpleFileExFlags ()
#36 0x00000000004938ce in Py_Main ()
#37 0x00007ffff7810830 in __libc_start_main (main=0x493370 <main>, argc=2, argv=0x7fffffffe458, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, 

setp up error

`Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing /home/yaolin/Documents/dirt
Requirement already satisfied: tensorflow-gpu>=1.4 in /usr/local/lib/python2.7/dist-packages (from dirt==0.2.0) (1.10.0)
Requirement already satisfied: numpy in /usr/local/lib/python2.7/dist-packages (from dirt==0.2.0) (1.14.5)
Requirement already satisfied: setuptools<=39.1.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (39.1.0)
Requirement already satisfied: astor>=0.6.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (0.7.1)
Requirement already satisfied: enum34>=1.1.6 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (1.1.6)
Requirement already satisfied: gast>=0.2.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (0.2.2)
Requirement already satisfied: tensorboard<1.11.0,>=1.10.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (1.10.0)
Requirement already satisfied: six>=1.10.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (1.12.0)
Requirement already satisfied: wheel in /usr/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (0.29.0)
Requirement already satisfied: absl-py>=0.1.6 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (0.7.1)
Requirement already satisfied: backports.weakref>=1.0rc1 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (1.0.post1)
Requirement already satisfied: termcolor>=1.1.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (1.1.0)
Requirement already satisfied: grpcio>=1.8.6 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (1.20.1)
Requirement already satisfied: protobuf>=3.6.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (3.7.1)
Requirement already satisfied: mock>=2.0.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (3.0.3)
Requirement already satisfied: werkzeug>=0.11.10 in /usr/local/lib/python2.7/dist-packages (from tensorboard<1.11.0,>=1.10.0->tensorflow-gpu>=1.4->dirt==0.2.0) (0.15.2)
Requirement already satisfied: futures>=3.1.1; python_version < "3" in /usr/local/lib/python2.7/dist-packages (from tensorboard<1.11.0,>=1.10.0->tensorflow-gpu>=1.4->dirt==0.2.0) (3.2.0)
Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python2.7/dist-packages (from tensorboard<1.11.0,>=1.10.0->tensorflow-gpu>=1.4->dirt==0.2.0) (3.1)
Requirement already satisfied: funcsigs>=1; python_version < "3.3" in /usr/local/lib/python2.7/dist-packages (from mock>=2.0.0->tensorflow-gpu>=1.4->dirt==0.2.0) (1.0.2)
Building wheels for collected packages: dirt
Building wheel for dirt (setup.py) ... error
ERROR: Complete output from command /usr/bin/python -u -c 'import setuptools, tokenize;file='"'"'/tmp/pip-req-build-TFkMzh/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-J03Czp --python-tag cp27:
ERROR: running bdist_wheel
running build
-- The CXX compiler identification is GNU 5.4.0
-- The CUDA compiler identification is unknown
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:3 (project):
No CMAKE_CUDA_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment
variable "CUDACXX" or the CMake cache entry CMAKE_CUDA_COMPILER to the full
path to the compiler, or to the compiler name if it is in the PATH.

-- Configuring incomplete, errors occurred!
See also "/tmp/pip-req-build-TFkMzh/build/CMakeFiles/CMakeOutput.log".
See also "/tmp/pip-req-build-TFkMzh/build/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-req-build-TFkMzh/setup.py", line 46, in
'Programming Language :: Python :: 2.7',
File "/usr/local/lib/python2.7/dist-packages/setuptools/init.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/dist-packages/wheel/bdist_wheel.py", line 179, in run
self.run_command('build')
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/tmp/pip-req-build-TFkMzh/setup.py", line 24, in run
build_csrc()
File "/tmp/pip-req-build-TFkMzh/setup.py", line 18, in build_csrc
subprocess.check_call(['cmake', os.path.join(base_path, 'csrc')], cwd=build_path)
File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-req-build-TFkMzh/csrc']' returned non-zero exit status 1

ERROR: Failed building wheel for dirt
Running setup.py clean for dirt
Failed to build dirt
Installing collected packages: dirt
Running setup.py install for dirt ... error
ERROR: Complete output from command /usr/bin/python -u -c 'import setuptools, tokenize;file='"'"'/tmp/pip-req-build-TFkMzh/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-uLdiH5/install-record.txt --single-version-externally-managed --compile:
ERROR: running install
running build
-- The CUDA compiler identification is unknown
CMake Error at CMakeLists.txt:3 (project):
No CMAKE_CUDA_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "CUDACXX" or the CMake cache entry CMAKE_CUDA_COMPILER to the full
  path to the compiler, or to the compiler name if it is in the PATH.


-- Configuring incomplete, errors occurred!
See also "/tmp/pip-req-build-TFkMzh/build/CMakeFiles/CMakeOutput.log".
See also "/tmp/pip-req-build-TFkMzh/build/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-req-build-TFkMzh/setup.py", line 46, in <module>
    'Programming Language :: Python :: 2.7',
  File "/usr/local/lib/python2.7/dist-packages/setuptools/__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python2.7/dist-packages/setuptools/command/install.py", line 61, in run
    return orig.install.run(self)
  File "/usr/lib/python2.7/distutils/command/install.py", line 601, in run
    self.run_command('build')
  File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/tmp/pip-req-build-TFkMzh/setup.py", line 24, in run
    build_csrc()
  File "/tmp/pip-req-build-TFkMzh/setup.py", line 18, in build_csrc
    subprocess.check_call(['cmake', os.path.join(base_path, 'csrc')], cwd=build_path)
  File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-req-build-TFkMzh/csrc']' returned non-zero exit status 1
----------------------------------------

ERROR: Command "/usr/bin/python -u -c 'import setuptools, tokenize;file='"'"'/tmp/pip-req-build-TFkMzh/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-uLdiH5/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-req-build-TFkMzh/
`

texture rendering artifact

Thanks @pmh47 for releasing the code. I have tried some demos using my own data. Some artifact appeared when I testedsamples/textured.py.
image
I have modified the code slightly(just the input part). Here are the code and data.
Could you please explain what causes such blemish? Really appreciate your help!

texture coordinate problem

Hi,I read your texture.py code and found that in rasterise_defered function you concate vertics coordinate 、texture coordinate and vertex normal together ,but in mostly scence the dimension of vertices and texture coordinate(vt)are not the same,which means that they can not use tf.concat to concat together,for example ,in smpl body models ,there are 6890 vertics and 7576 vt coordinate,how to solve this issue?

cudaGraphicsGLRegisterImage failed: cudaErrorNotSupported

Hello!

I'm trying to use the dirt on the following configuration:

  • GeForce RTX 2080 Ti
  • Ubuntu 18.04
  • Cuda 10.0.130, Nvidia driver 410.48, cuDNN 7.5.1.10
  • Python 2.7.15rc1, pip 9.0.1

I successfully built the dirt using these commands

git clone https://github.com/pmh47/dirt.git
cd dirt
mkdir build ; cd build
vim ../csrc/CMakeLists.txt
#add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
cmake ../csrc
vim CMakeFiles/rasterise.dir/flags.make
#add CUDA_FLAGS = -DNDEBUG
make
cd ..
pip install -e .

Tests (lighting_tests.py and square_test.py) passed without any errors.

And now I'm trying to use the dirt with octopus

...
2019-04-25 07:57:54.313242: I /opt/dirt/csrc/gl_common.h:84] successfully created new GL context on thread 0x7f371f9f6700 (EGL = 1.5, GL = 4.6.0 NVIDIA 410.48, renderer = GeForce RTX 2080 Ti/PCIe/SSE2)
2019-04-25 07:57:54.322804: I /opt/dirt/csrc/rasterise_egl.cpp:266] reinitialised framebuffer with size 1080 x 1080
2019-04-25 07:57:54.333154: I /opt/dirt/csrc/gl_common.h:66] selected egl device #0 to match cuda device #0 for thread 0x7f371c9bd700
2019-04-25 07:57:54.360844: I /opt/dirt/csrc/gl_common.h:84] successfully created new GL context on thread 0x7f371c9bd700 (EGL = 1.5, GL = 4.6.0 NVIDIA 410.48, renderer = GeForce RTX 2080 Ti/PCIe/SSE2)
2019-04-25 07:57:54.366606: F /opt/dirt/csrc/rasterise_grad_egl.cpp:194] cudaGraphicsGLRegisterImage failed: cudaErrorNotSupported
run_demo.sh: line 2: 27784 Aborted                 (core dumped) python infer_single.py sample data/sample/segmentations data/sample/keypoints --out_dir out

At the end I receive

cudaGraphicsGLRegisterImage failed: cudaErrorNotSupported

what can be a problem?

P.S.: My
ls -l /usr/lib/*/GL

-rw-r--r-- 1 root root   67900 мая 23  2018 /usr/lib/girepository-1.0/GstGL-1.0.typelib
lrwxrwxrwx 1 root root      20 фев  9 01:02 /usr/lib/x86_64-linux-gnu/libEGL_mesa.so.0 -> libEGL_mesa.so.0.0.0
-rw-r--r-- 1 root root  242840 фев  9 01:02 /usr/lib/x86_64-linux-gnu/libEGL_mesa.so.0.0.0
lrwxrwxrwx 1 root root      23 апр 25 05:54 /usr/lib/x86_64-linux-gnu/libEGL_nvidia.so.0 -> libEGL_nvidia.so.410.48
-rwxr-xr-x 1 root root 1031552 апр 25 05:54 /usr/lib/x86_64-linux-gnu/libEGL_nvidia.so.410.48
lrwxrwxrwx 1 root root      41 апр 25 07:40 /usr/lib/x86_64-linux-gnu/libEGL.so -> /usr/lib/x86_64-linux-gnu/libEGL.so.1.0.0
lrwxrwxrwx 1 root root      41 апр 25 08:48 /usr/lib/x86_64-linux-gnu/libEGL.so.1 -> /usr/lib/x86_64-linux-gnu/libEGL.so.1.0.0
-rw-r--r-- 1 root root   80448 авг 15  2018 /usr/lib/x86_64-linux-gnu/libEGL.so.1.0.0
lrwxrwxrwx 1 root root      22 авг 15  2018 /usr/lib/x86_64-linux-gnu/libGLdispatch.so -> libGLdispatch.so.0.0.0
lrwxrwxrwx 1 root root      22 апр 25 05:54 /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 -> libGLdispatch.so.0.0.0
-rw-r--r-- 1 root root  612792 авг 15  2018 /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0.0.0
lrwxrwxrwx 1 root root      29 апр 25 05:54 /usr/lib/x86_64-linux-gnu/libGLESv1_CM_nvidia.so.1 -> libGLESv1_CM_nvidia.so.410.48
-rwxr-xr-x 1 root root   60200 апр 25 05:54 /usr/lib/x86_64-linux-gnu/libGLESv1_CM_nvidia.so.410.48
lrwxrwxrwx 1 root root      21 авг 15  2018 /usr/lib/x86_64-linux-gnu/libGLESv1_CM.so -> libGLESv1_CM.so.1.0.0
lrwxrwxrwx 1 root root      21 авг 15  2018 /usr/lib/x86_64-linux-gnu/libGLESv1_CM.so.1 -> libGLESv1_CM.so.1.0.0
-rw-r--r-- 1 root root   43328 авг 15  2018 /usr/lib/x86_64-linux-gnu/libGLESv1_CM.so.1.0.0
lrwxrwxrwx 1 root root      26 апр 25 05:54 /usr/lib/x86_64-linux-gnu/libGLESv2_nvidia.so.2 -> libGLESv2_nvidia.so.410.48
-rwxr-xr-x 1 root root  111400 апр 25 05:54 /usr/lib/x86_64-linux-gnu/libGLESv2_nvidia.so.410.48
lrwxrwxrwx 1 root root      18 авг 15  2018 /usr/lib/x86_64-linux-gnu/libGLESv2.so -> libGLESv2.so.2.0.0
lrwxrwxrwx 1 root root      18 апр 25 05:54 /usr/lib/x86_64-linux-gnu/libGLESv2.so.2 -> libGLESv2.so.2.0.0
-rw-r--r-- 1 root root   72000 авг 15  2018 /usr/lib/x86_64-linux-gnu/libGLESv2.so.2.0.0
-rw-r--r-- 1 root root     671 апр 25 05:54 /usr/lib/x86_64-linux-gnu/libGL.la
lrwxrwxrwx 1 root root      14 авг 15  2018 /usr/lib/x86_64-linux-gnu/libGL.so -> libGL.so.1.0.0
lrwxrwxrwx 1 root root      40 апр 25 07:36 /usr/lib/x86_64-linux-gnu/libGL.so.1 -> /usr/lib/x86_64-linux-gnu/libGL.so.1.0.0
-rw-r--r-- 1 root root  567624 авг 15  2018 /usr/lib/x86_64-linux-gnu/libGL.so.1.0.0
lrwxrwxrwx 1 root root      15 апр 24 20:17 /usr/lib/x86_64-linux-gnu/libGLU.so.1 -> libGLU.so.1.3.1
-rw-r--r-- 1 root root  453352 мая 22  2016 /usr/lib/x86_64-linux-gnu/libGLU.so.1.3.1
lrwxrwxrwx 1 root root      23 апр 25 05:54 /usr/lib/x86_64-linux-gnu/libGLX_indirect.so.0 -> libGLX_nvidia.so.410.48
lrwxrwxrwx 1 root root      20 фев  9 01:02 /usr/lib/x86_64-linux-gnu/libGLX_mesa.so.0 -> libGLX_mesa.so.0.0.0
-rw-r--r-- 1 root root  479992 фев  9 01:02 /usr/lib/x86_64-linux-gnu/libGLX_mesa.so.0.0.0
lrwxrwxrwx 1 root root      23 апр 25 05:54 /usr/lib/x86_64-linux-gnu/libGLX_nvidia.so.0 -> libGLX_nvidia.so.410.48
-rwxr-xr-x 1 root root 1270576 апр 25 05:54 /usr/lib/x86_64-linux-gnu/libGLX_nvidia.so.410.48
lrwxrwxrwx 1 root root      15 авг 15  2018 /usr/lib/x86_64-linux-gnu/libGLX.so -> libGLX.so.0.0.0
lrwxrwxrwx 1 root root      41 апр 25 08:49 /usr/lib/x86_64-linux-gnu/libGLX.so.0 -> /usr/lib/x86_64-linux-gnu/libGLX.so.0.0.0
-rw-r--r-- 1 root root   68144 авг 15  2018 /usr/lib/x86_64-linux-gnu/libGLX.so.0.0.0
lrwxrwxrwx 1 root root      18 авг 15  2018 /usr/lib/x86_64-linux-gnu/libOpenGL.so -> libOpenGL.so.0.0.0
lrwxrwxrwx 1 root root      18 авг 15  2018 /usr/lib/x86_64-linux-gnu/libOpenGL.so.0 -> libOpenGL.so.0.0.0
-rw-r--r-- 1 root root  186688 авг 15  2018 /usr/lib/x86_64-linux-gnu/libOpenGL.so.0.0.0

and

ldd dirt/librasterise.so

	linux-vdso.so.1 (0x00007fffb677a000)
	libEGL.so.1 => /usr/lib/x86_64-linux-gnu/libEGL.so.1 (0x00007f1db5dbf000)
	libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007f1db5b33000)
	libtensorflow_framework.so => /usr/local/lib/python2.7/dist-packages/tensorflow/libtensorflow_framework.so (0x00007f1db4a12000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f1db480a000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1db45eb000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1db43e7000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f1db405e000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1db3cc0000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f1db3aa8000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1db36b7000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f1db62cb000)
	libGLdispatch.so.0 => /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f1db3401000)
	libGLX.so.0 => /usr/lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f1db31d0000)
	libcuda.so.1 => /usr/lib/x86_64-linux-gnu/libcuda.so.1 (0x00007f1db20da000)
	libcudnn.so.7 => /usr/lib/x86_64-linux-gnu/libcudnn.so.7 (0x00007f1d9cabb000)
	libcudart.so.10.0 => /opt/cuda/cuda-10.0/lib64/libcudart.so.10.0 (0x00007f1d9c841000)
	libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f1d9c509000)
	libnvidia-fatbinaryloader.so.410.48 => /usr/lib/x86_64-linux-gnu/libnvidia-fatbinaryloader.so.410.48 (0x00007f1d9c2bc000)
	libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f1d9c094000)
	libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f1d9be90000)
	libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f1d9bc8a000)
	libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f1d9ba75000)

make error

will@will-pc:~/dirt/build$ make
[ 28%] Building CUDA object CMakeFiles/rasterise.dir/rasterise_egl.cu.o
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/util/ConfigureVectorization.h:384:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/Core:22,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/Tensor:14,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/tensor.h:21,
from /home/will/dirt/csrc/rasterise_egl.cu:5:
/usr/local/cuda-10.0/bin/../targets/x86_64-linux/include/host_defines.h:54:2: warning: #warning "host_defines.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda_runtime.h instead." [-Wcpp]
#warning "host_defines.h is an internal header file and must not be used directly. This file will be removed in a future CUDA release. Please use cuda_runtime_api.h or cuda
^
/home/will/dirt/csrc/rasterise_egl.cu:9:0: warning: "CUDA_AXIS_KERNEL_LOOP" redefined
#define CUDA_AXIS_KERNEL_LOOP(i, n, axis)
^
In file included from /home/will/dirt/csrc/rasterise_egl.cu:6:0:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/util/cuda_kernel_helper.h:30:0: note: this is the location of the previous definition
#define CUDA_AXIS_KERNEL_LOOP(i, n, axis)
^
/usr/local/lib/python2.7/dist-packages/tensorflow/include/absl/strings/string_view.h(496): error: constexpr function return is non-constant

/usr/local/lib/python2.7/dist-packages/tensorflow/include/google/protobuf/arena_impl.h(55): warning: integer conversion resulted in a change of sign

/usr/local/lib/python2.7/dist-packages/tensorflow/include/google/protobuf/arena_impl.h(309): warning: integer conversion resulted in a change of sign

/usr/local/lib/python2.7/dist-packages/tensorflow/include/google/protobuf/arena_impl.h(310): warning: integer conversion resulted in a change of sign

1 error detected in the compilation of "/tmp/tmpxft_0000110d_00000000-6_rasterise_egl.cpp1.ii".
CMakeFiles/rasterise.dir/build.make:75: recipe for target 'CMakeFiles/rasterise.dir/rasterise_egl.cu.o' failed
make[2]: *** [CMakeFiles/rasterise.dir/rasterise_egl.cu.o] Error 1
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/rasterise.dir/all' failed
make[1]: *** [CMakeFiles/rasterise.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

build env ubuntu1604, python 2.7, cuda 10.1, tensorflow-gpu 1.13.1
it reported /usr/local/lib/python2.7/dist-packages/tensorflow/include/absl/strings/string_view.h(496): error: constexpr function return is non-constant

could anyone give some advice? thanks.

undefined symbol when running tests

`(octopus) zhangtianyi@likun-ThinkStation:~/github/dirt$ python tests/lighting_tests.py
Traceback (most recent call last):
File "tests/lighting_tests.py", line 6, in
import dirt.rasterise_ops
File "/home/zhangtianyi/anaconda3/envs/octopus/lib/python2.7/site-packages/dirt/init.py", line 2, in
from .rasterise_ops import rasterise, rasterise_batch, rasterise_deferred, rasterise_batch_deferred
File "/home/zhangtianyi/anaconda3/envs/octopus/lib/python2.7/site-packages/dirt/rasterise_ops.py", line 6, in
_rasterise_module = tf.load_op_library(_lib_path + '/librasterise.so')
File "/home/zhangtianyi/anaconda3/envs/octopus/lib/python2.7/site-packages/tensorflow/python/framework/load_library.py", line 61, in load_op_library
lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: /home/zhangtianyi/anaconda3/envs/octopus/lib/python2.7/site-packages/dirt/librasterise.so: undefined symbol: _Z24launch_background_uploadRP9cudaArrayRKN10tensorflow6TensorEiiRKN5Eigen9GpuDeviceE

`
Using ubuntu 16.04 cuda10.1 py2.7 tf1.14

BTW,
when I do pip install . There is an error
` Complete output (50 lines):
running bdist_wheel
running build
-- The CXX compiler identification is GNU 4.9.3
-- The CUDA compiler identification is unknown
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:7 (project):
The CMAKE_CUDA_COMPILER:

  /user/local/cuda/bin/nvcc

is not a full path to an existing compiler tool.

After edit /etc/environment and SET CMAKE_CUDA_COMPILER in the cmakelists.txt. I still got the error. So I changeproject(dirt LANGUAGES CXX CUDA)toproject(dirt)` and successfully installed dirt.
Would this cause the UNDEFINED SYMBOL above?

segmnentation fault when running test code

Hi, I've compiled your code successfully on my ubuntu server. But when I run the test code, it shows a segmentation fault (core dumped). It seems that something is wrong with egl. I'm new to opengl, and I searched for solutions on internet but didn't find proper result. Could you tell me how to fix this problem?
Thank you!

rasterise_grad_egl.cu.o error in the newest code

My error is as following:
/tmp/pip-req-build-cevrhevw/csrc/rasterise_grad_egl.cu(99) (col. 26): error: Internal Compiler Error (codegen): "function-scope static variables cannot be initialized!"

CMakeFiles/rasterise.dir/build.make:134: recipe for target 'CMakeFiles/rasterise.dir/rasterise_grad_egl.cu.o' failed
make[2]: *** [CMakeFiles/rasterise.dir/rasterise_grad_egl.cu.o] Error 2
make[2]: *** Waiting for unfinished jobs....
fatbinary warning : option 'key' has been deprecated
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/rasterise.dir/all' failed
make[1]: *** [CMakeFiles/rasterise.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

In the new cloned code, the definition of struct Vec3 { ... }; is already above the function assemble_grads in a anonymous namespace, but the error appeares again.

My env:
nvcc V8.0.61
gcc 5.4.0
tf-1.8.0
cuda-9.0

How to install GLVND OpenGL libaries?

Soorry to ask this simply question. I'm really new in OpenGL and others. I was pulzeed by segementation error several days. I guess the lack of GLVND OpenGL is the key point.
SO anyone can teach me how to install GLVND OpenGL libaries?? And what the difference between LEGACY and GLVND? And the link of mesa3D and those two?

pip install error

Building wheels for collected packages: dirt
Building wheel for dirt (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/dl/anaconda2/envs/tf-g/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-jXBqjA/setup.py'"'"'; file='"'"'/tmp/pip-req-build-jXBqjA/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-nMxDpP --python-tag cp27
cwd: /tmp/pip-req-build-jXBqjA/
Complete output (69 lines):
running bdist_wheel
running build
-- The CXX compiler identification is GNU 5.4.0
-- The CUDA compiler identification is unknown
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working CUDA compiler: /usr/bin/nvcc
-- Check for working CUDA compiler: /usr/bin/nvcc -- broken
CMake Error at /opt/cmake-3.10.3/share/cmake-3.10/Modules/CMakeTestCUDACompiler.cmake:46 (message):
The CUDA compiler

  "/usr/bin/nvcc"

is not able to compile a simple test program.

It fails with the following output:

  Change Dir: /tmp/pip-req-build-jXBqjA/build/CMakeFiles/CMakeTmp

Can this library render textured models?

I have a .obj, .mtl, and png texture file. Is it possible to render a complete textured version of the model using this library? I wasn't too sure as I don't see any examples taking mtl files as input.

Order independent transparency?

First for all thanks for making this open source! For a 3D veteran like me, these differentiable rendering engine are very exciting. I'm a compleet newbie in AI, so I apologize for asking stupid questions.

I don't understand exactly how DIRT works - I most likely need to re-read your paper and all references 100 times, meaning I need another life ;-) And I have absolutely no idea how to integrate this module into a tensorflow graph, but I guess this will become clear the more I learn about Tensorflow. I do have a very specific problem that I want to solve, so that is a good starting point.

I was wondering if it would be possible to incorporate order-independent-transparency in this renderer?

So basically instead of a pixel being obscured, every pixel is a linear combination of N weighted depth sorted points on the ray through that pixel, but done in hardware (DirectX has rasterizer order views for this, and OpenGL might support this with extensions, but basically the GPU hardware can deal with this)

Would this approach make a DR more suitable for back-propagation? Because after watching the OpenDR presentation, it seemed the edge pixels are problematic because you need to track the pixel underneath. Order independent transparency could help here?

Another interesting approach would be statistical moment-based shadow mapping and order independent transparency, but I don't know enough of these new techniques.

And of course supporting Physically based rendering would be insane ;-)

Cmake Error:Could NOT find OpenGL

Hi,when I install dirt, this error happened.

Here are the full outputs:

Complete output (50 lines):
running bdist_wheel
running build
-- The CXX compiler identification is GNU 7.4.0
-- The CUDA compiler identification is NVIDIA 10.0.130
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working CUDA compiler: /usr/local/cuda-10.0/bin/nvcc
-- Check for working CUDA compiler: /usr/local/cuda-10.0/bin/nvcc -- works
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
CMake Error at /usr/local/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY
OPENGL_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/local/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/local/share/cmake-3.15/Modules/FindOpenGL.cmake:397 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:5 (find_package)

But when I input "ls -l /usr/lib/*/GL", here are the output:

lrwxrwxrwx 1 root root 23 10月 19 11:58 /usr/lib/i386-linux-gnu/libEGL_nvidia.so.0 -> libEGL_nvidia.so.430.50
-rwxr-xr-x 1 root root 1045012 10月 19 11:58 /usr/lib/i386-linux-gnu/libEGL_nvidia.so.430.50
lrwxrwxrwx 1 root root 22 5月 10 20:17 /usr/lib/i386-linux-gnu/libGLdispatch.so.0 -> libGLdispatch.so.0.0.0
-rw-r--r-- 1 root root 317024 5月 10 20:17 /usr/lib/i386-linux-gnu/libGLdispatch.so.0.0.0
lrwxrwxrwx 1 root root 29 10月 19 11:58 /usr/lib/i386-linux-gnu/libGLESv1_CM_nvidia.so.1 -> libGLESv1_CM_nvidia.so.430.50
-rwxr-xr-x 1 root root 48360 10月 19 11:58 /usr/lib/i386-linux-gnu/libGLESv1_CM_nvidia.so.430.50
lrwxrwxrwx 1 root root 26 10月 19 11:58 /usr/lib/i386-linux-gnu/libGLESv2_nvidia.so.2 -> libGLESv2_nvidia.so.430.50
-rwxr-xr-x 1 root root 87876 10月 19 11:58 /usr/lib/i386-linux-gnu/libGLESv2_nvidia.so.430.50
-rw-r--r-- 1 root root 651 10月 19 11:58 /usr/lib/i386-linux-gnu/libGL.la
lrwxrwxrwx 1 root root 14 5月 10 20:17 /usr/lib/i386-linux-gnu/libGL.so.1 -> libGL.so.1.0.0
-rw-r--r-- 1 root root 390680 5月 10 20:17 /usr/lib/i386-linux-gnu/libGL.so.1.0.0
lrwxrwxrwx 1 root root 15 5月 22 2016 /usr/lib/i386-linux-gnu/libGLU.so.1 -> libGLU.so.1.3.1
-rw-r--r-- 1 root root 493308 5月 22 2016 /usr/lib/i386-linux-gnu/libGLU.so.1.3.1
lrwxrwxrwx 1 root root 23 10月 19 11:58 /usr/lib/i386-linux-gnu/libGLX_indirect.so.0 -> libGLX_nvidia.so.430.50
lrwxrwxrwx 1 root root 20 8月 27 14:42 /usr/lib/i386-linux-gnu/libGLX_mesa.so.0 -> libGLX_mesa.so.0.0.0
-rw-r--r-- 1 root root 481916 8月 27 14:42 /usr/lib/i386-linux-gnu/libGLX_mesa.so.0.0.0
lrwxrwxrwx 1 root root 23 10月 19 11:58 /usr/lib/i386-linux-gnu/libGLX_nvidia.so.0 -> libGLX_nvidia.so.430.50
-rwxr-xr-x 1 root root 969544 10月 19 11:58 /usr/lib/i386-linux-gnu/libGLX_nvidia.so.430.50
lrwxrwxrwx 1 root root 15 5月 10 20:17 /usr/lib/i386-linux-gnu/libGLX.so.0 -> libGLX.so.0.0.0
-rw-r--r-- 1 root root 71304 5月 10 20:17 /usr/lib/i386-linux-gnu/libGLX.so.0.0.0
lrwxrwxrwx 1 root root 20 10月 7 14:17 /usr/lib/x86_64-linux-gnu/libEGL_mesa.so.0 -> libEGL_mesa.so.0.0.0
-rw-r--r-- 1 root root 271640 7月 18 23:44 /usr/lib/x86_64-linux-gnu/libEGL_mesa.so.0.0.0
lrwxrwxrwx 1 root root 23 10月 19 11:58 /usr/lib/x86_64-linux-gnu/libEGL_nvidia.so.0 -> libEGL_nvidia.so.430.50
-rwxr-xr-x 1 root root 1272912 10月 19 11:58 /usr/lib/x86_64-linux-gnu/libEGL_nvidia.so.430.50
lrwxrwxrwx 1 root root 15 10月 7 14:17 /usr/lib/x86_64-linux-gnu/libEGL.so.1 -> libEGL.so.1.0.0
-rw-r--r-- 1 root root 80448 5月 10 20:17 /usr/lib/x86_64-linux-gnu/libEGL.so.1.0.0
lrwxrwxrwx 1 root root 22 10月 7 14:17 /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 -> libGLdispatch.so.0.0.0
-rw-r--r-- 1 root root 612792 5月 10 20:17 /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0.0.0
lrwxrwxrwx 1 root root 29 10月 19 11:58 /usr/lib/x86_64-linux-gnu/libGLESv1_CM_nvidia.so.1 -> libGLESv1_CM_nvidia.so.430.50
-rwxr-xr-x 1 root root 61136 10月 19 11:58 /usr/lib/x86_64-linux-gnu/libGLESv1_CM_nvidia.so.430.50
lrwxrwxrwx 1 root root 26 10月 19 11:58 /usr/lib/x86_64-linux-gnu/libGLESv2_nvidia.so.2 -> libGLESv2_nvidia.so.430.50
-rwxr-xr-x 1 root root 110904 10月 19 11:58 /usr/lib/x86_64-linux-gnu/libGLESv2_nvidia.so.430.50
lrwxrwxrwx 1 root root 18 10月 7 14:17 /usr/lib/x86_64-linux-gnu/libGLESv2.so.2 -> libGLESv2.so.2.0.0
-rw-r--r-- 1 root root 72000 5月 10 20:17 /usr/lib/x86_64-linux-gnu/libGLESv2.so.2.0.0
lrwxrwxrwx 1 root root 16 8月 25 2017 /usr/lib/x86_64-linux-gnu/libGLEW.so.2.0 -> libGLEW.so.2.0.0
-rw-r--r-- 1 root root 587816 8月 25 2017 /usr/lib/x86_64-linux-gnu/libGLEW.so.2.0.0
-rw-r--r-- 1 root root 671 10月 19 11:58 /usr/lib/x86_64-linux-gnu/libGL.la
lrwxrwxrwx 1 root root 14 10月 7 14:17 /usr/lib/x86_64-linux-gnu/libGL.so.1 -> libGL.so.1.0.0
-rw-r--r-- 1 root root 567624 5月 10 20:17 /usr/lib/x86_64-linux-gnu/libGL.so.1.0.0
lrwxrwxrwx 1 root root 15 10月 7 14:17 /usr/lib/x86_64-linux-gnu/libGLU.so.1 -> libGLU.so.1.3.1
-rw-r--r-- 1 root root 453352 5月 22 2016 /usr/lib/x86_64-linux-gnu/libGLU.so.1.3.1
lrwxrwxrwx 1 root root 23 10月 19 11:58 /usr/lib/x86_64-linux-gnu/libGLX_indirect.so.0 -> libGLX_nvidia.so.430.50
lrwxrwxrwx 1 root root 20 8月 27 14:42 /usr/lib/x86_64-linux-gnu/libGLX_mesa.so.0 -> libGLX_mesa.so.0.0.0
-rw-r--r-- 1 root root 484184 8月 27 14:42 /usr/lib/x86_64-linux-gnu/libGLX_mesa.so.0.0.0
lrwxrwxrwx 1 root root 23 10月 19 11:58 /usr/lib/x86_64-linux-gnu/libGLX_nvidia.so.0 -> libGLX_nvidia.so.430.50
-rwxr-xr-x 1 root root 1142976 10月 19 11:58 /usr/lib/x86_64-linux-gnu/libGLX_nvidia.so.430.50
lrwxrwxrwx 1 root root 15 10月 7 14:17 /usr/lib/x86_64-linux-gnu/libGLX.so.0 -> libGLX.so.0.0.0
-rw-r--r-- 1 root root 68144 5月 10 20:17 /usr/lib/x86_64-linux-gnu/libGLX.so.0.0.0
lrwxrwxrwx 1 root root 20 5月 24 2016 /usr/lib/x86_64-linux-gnu/libQtOpenGL.so.4 -> libQtOpenGL.so.4.8.7
lrwxrwxrwx 1 root root 20 5月 24 2016 /usr/lib/x86_64-linux-gnu/libQtOpenGL.so.4.8 -> libQtOpenGL.so.4.8.7
-rw-r--r-- 1 root root 1052024 5月 24 2016 /usr/lib/x86_64-linux-gnu/libQtOpenGL.so.4.8.7
lrwxrwxrwx 1 root root 41 12月 18 2017 /usr/lib/x86_64-linux-gnu/libvtkRenderingContextOpenGL-6.3.so.6.3 -> libvtkRenderingContextOpenGL-6.3.so.6.3.0
-rw-r--r-- 1 root root 200312 12月 18 2017 /usr/lib/x86_64-linux-gnu/libvtkRenderingContextOpenGL-6.3.so.6.3.0
lrwxrwxrwx 1 root root 50 12月 18 2017 /usr/lib/x86_64-linux-gnu/libvtkRenderingContextOpenGLPython27D-6.3.so.6.3 -> libvtkRenderingContextOpenGLPython27D-6.3.so.6.3.0
-rw-r--r-- 1 root root 14840 12月 18 2017 /usr/lib/x86_64-linux-gnu/libvtkRenderingContextOpenGLPython27D-6.3.so.6.3.0
lrwxrwxrwx 1 root root 44 12月 18 2017 /usr/lib/x86_64-linux-gnu/libvtkRenderingContextOpenGLTCL-6.3.so.6.3 -> libvtkRenderingContextOpenGLTCL-6.3.so.6.3.0
-rw-r--r-- 1 root root 14648 12月 18 2017 /usr/lib/x86_64-linux-gnu/libvtkRenderingContextOpenGLTCL-6.3.so.6.3.0
lrwxrwxrwx 1 root root 33 12月 18 2017 /usr/lib/x86_64-linux-gnu/libvtkRenderingGL2PS-6.3.so.6.3 -> libvtkRenderingGL2PS-6.3.so.6.3.0
-rw-r--r-- 1 root root 113840 12月 18 2017 /usr/lib/x86_64-linux-gnu/libvtkRenderingGL2PS-6.3.so.6.3.0
lrwxrwxrwx 1 root root 42 12月 18 2017 /usr/lib/x86_64-linux-gnu/libvtkRenderingGL2PSPython27D-6.3.so.6.3 -> libvtkRenderingGL2PSPython27D-6.3.so.6.3.0
-rw-r--r-- 1 root root 23264 12月 18 2017 /usr/lib/x86_64-linux-gnu/libvtkRenderingGL2PSPython27D-6.3.so.6.3.0
lrwxrwxrwx 1 root root 37 12月 18 2017 /usr/lib/x86_64-linux-gnu/libvtkRenderingGLtoPSTCL-6.3.so.6.3 -> libvtkRenderingGLtoPSTCL-6.3.so.6.3.0
-rw-r--r-- 1 root root 18752 12月 18 2017 /usr/lib/x86_64-linux-gnu/libvtkRenderingGLtoPSTCL-6.3.so.6.3.0
lrwxrwxrwx 1 root root 34 12月 18 2017 /usr/lib/x86_64-linux-gnu/libvtkRenderingOpenGL-6.3.so.6.3 -> libvtkRenderingOpenGL-6.3.so.6.3.0
-rw-r--r-- 1 root root 2734512 12月 18 2017 /usr/lib/x86_64-linux-gnu/libvtkRenderingOpenGL-6.3.so.6.3.0
lrwxrwxrwx 1 root root 43 12月 18 2017 /usr/lib/x86_64-linux-gnu/libvtkRenderingOpenGLPython27D-6.3.so.6.3 -> libvtkRenderingOpenGLPython27D-6.3.so.6.3.0
-rw-r--r-- 1 root root 1005760 12月 18 2017 /usr/lib/x86_64-linux-gnu/libvtkRenderingOpenGLPython27D-6.3.so.6.3.0
lrwxrwxrwx 1 root root 37 12月 18 2017 /usr/lib/x86_64-linux-gnu/libvtkRenderingOpenGLTCL-6.3.so.6.3 -> libvtkRenderingOpenGLTCL-6.3.so.6.3.0
-rw-r--r-- 1 root root 727128 12月 18 2017 /usr/lib/x86_64-linux-gnu/libvtkRenderingOpenGLTCL-6.3.so.6.3.0
lrwxrwxrwx 1 root root 40 12月 18 2017 /usr/lib/x86_64-linux-gnu/libvtkRenderingVolumeOpenGL-6.3.so.6.3 -> libvtkRenderingVolumeOpenGL-6.3.so.6.3.0
-rw-r--r-- 1 root root 685800 12月 18 2017 /usr/lib/x86_64-linux-gnu/libvtkRenderingVolumeOpenGL-6.3.so.6.3.0
lrwxrwxrwx 1 root root 49 12月 18 2017 /usr/lib/x86_64-linux-gnu/libvtkRenderingVolumeOpenGLPython27D-6.3.so.6.3 -> libvtkRenderingVolumeOpenGLPython27D-6.3.so.6.3.0
-rw-r--r-- 1 root root 129792 12月 18 2017 /usr/lib/x86_64-linux-gnu/libvtkRenderingVolumeOpenGLPython27D-6.3.so.6.3.0
lrwxrwxrwx 1 root root 43 12月 18 2017 /usr/lib/x86_64-linux-gnu/libvtkRenderingVolumeOpenGLTCL-6.3.so.6.3 -> libvtkRenderingVolumeOpenGLTCL-6.3.so.6.3.0
-rw-r--r-- 1 root root 92944 12月 18 2017 /usr/lib/x86_64-linux-gnu/libvtkRenderingVolumeOpenGLTCL-6.3.so.6.3.0

Dose the output means that I have OpenGL in my computer? How can i solve this problem? Thx

No such file or directory

i installed dirt successfully,but when i ran import dirt,it will appear this

import dirt
Traceback (most recent call last):
File "", line 1, in
File "dirt/init.py", line 2, in
from rasterise_ops import rasterise, rasterise_batch
File "dirt/rasterise_ops.py", line 7, in
_rasterise_module = tf.load_op_library(_lib_path + '/librasterise.so')
File "/home/longway/.local/lib/python2.7/site-packages/tensorflow/python/framework/load_library.py", line 56, in load_op_library
lib_handle = py_tf.TF_LoadLibrary(library_filename, status)
File "/home/longway/.local/lib/python2.7/site-packages/tensorflow/python/framework/errors_impl.py", line 473, in exit
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: dirt/librasterise.so: cannot open shared object file: No such file or directory
@pmh47 can you hello me?my environment is cuda8.0+cudnn6.0+tensorflow-gpu1.4.0+gcc4.9

Cannot compile rasterise_egl.cpp

Hi!

I am trying to compile the dirt on an HPC system. I use tensorflow-gpu==1.6.0 , and cuda 9.2.148 , GCC compilers (either 5.4 or 7.3) and development way, that is, with cmake. CMake passes.

First , it has headers that do not exist.

/home/gshamov/dir/dirt/csrc/rasterise_egl.cpp:19:10: fatal error: cuda/include/cuda.h: No such file or directory
#include <cuda/include/cuda.h>
^~~~~~~~~~~~~~~~~~~~~

I replace them with the like of #include "cuda.h". Then it gets a whole bunch of errors of this sort:

In file included from /home/gshamov/dir/dirt/csrc/rasterise_egl.cpp:28:0:
/home/gshamov/dir/dirt/csrc/gl_common.h: In function ‘GLuint gl_common::create_shader(const shaders::Shader&)’:
/home/gshamov/dir/dirt/csrc/gl_common.h:107:38: error: invalid conversion from ‘const char* const*’ to ‘const GLchar** {aka const char**}’ [-fpermissive]
glShaderSource(gl_shader, 1, &source_ptr, &source_length);
^~~~~~~~~~~
In file included from /cvmfs/soft.computecanada.ca/easybuild/software/2017/avx2/Compiler/gcc7.3/cuda/9.2.148/extras/CUPTI/include/GL/gl.h:1630:0,
from /home/gshamov/dir/dirt/csrc/rasterise_egl.cpp:6:
/cvmfs/soft.computecanada.ca/easybuild/software/2017/avx2/Compiler/gcc7.3/cuda/9.2.148/extras/CUPTI/include/GL/glext.h:4265:22: note: initializing argument 3 of ‘void glShaderSource(GLuint, GLsizei, const GLchar**, const GLint*)’
extern void APIENTRY glShaderSource (GLuint, GLsizei, const GLchar* *, const GLint *);
^~~~~~~~~~~~~~
/home/gshamov/dir/dirt/csrc/rasterise_egl.cpp: In member function ‘void RegisteredBuffer::ensure_size(const size_t&)’:
/home/gshamov/dir/dirt/csrc/rasterise_egl.cpp:81:9: error: ‘glNamedBufferData’ was not declared in this scope
glNamedBufferData(gl_index, required_size, nullptr, GL_DYNAMIC_COPY);
^~~~~~~~~~~~~~~~~
/home/gshamov/dir/dirt/csrc/rasterise_egl.cpp:81:9: note: suggested alternative: ‘glNamedBufferDataEXT’
glNamedBufferData(gl_index, required_size, nullptr, GL_DYNAMIC_COPY);
^~~~~~~~~~~~~~~~~
glNamedBufferDataEXT
/home/gshamov/dir/dirt/csrc/rasterise_egl.cpp: In static member function ‘static void RasteriseOpGpu::reinitialise_framebuffer(RasteriseOpGpu::PerThreadObjects&)’:
/home/gshamov/dir/dirt/csrc/rasterise_egl.cpp:236:9: error: ‘glTexStorage2D’ was not declared in this scope
glTexStorage2D(GL_TEXTURE_2D, 1, GL_RGBA32F, objects.buffer_width, objects.buffer_height);
^~~~~~~~~~~~~~
/home/gshamov/dir/dirt/csrc/rasterise_egl.cpp:236:9: note: suggested alternative: ‘glTexSubImage2D’
glTexStorage2D(GL_TEXTURE_2D, 1, GL_RGBA32F, objects.buffer_width, objects.buffer_height);
^~~~~~~~~~~~~~
glTexSubImage2D
/home/gshamov/dir/dirt/csrc/rasterise_egl.cpp: In lambda function:
/home/gshamov/dir/dirt/csrc/rasterise_egl.cpp:373:17: error: ‘glDrawElementsBaseVertex’ was not declared in this scope
glDrawElementsBaseVertex(
^~~~~~~~~~~~~~~~~~~~~~~~
/home/gshamov/dir/dirt/csrc/rasterise_egl.cpp:373:17: note: suggested alternative: ‘glDrawElementsInstancedEXT’
glDrawElementsBaseVertex(
^~~~~~~~~~~~~~~~~~~~~~~~
glDrawElementsInstancedEXT
make[2]: *** [CMakeFiles/rasterise.dir/build.make:63: CMakeFiles/rasterise.dir/rasterise_egl.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/rasterise.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

Could you please advise?

Support of rendering multiple channels

Hi,

Thanks a lot for open sourcing the project, it is awesome!
After a few tries, it seems that the current rasterise function only supports 1 or 3 channels, I wonder if it is possible to rasterise more channels? For example, rasterizing texture and normals together without calling them separately.
I could also modify the codes myself, if you can kindly show me which part to change.

Many thanks,
Shiyang

undefined symbol: glNamedBufferData when running test code

Hi, when I run the tests/square_test.py. It said,
undefined symbol: glNamedBufferData when running test code
1
the result of $ ldd dirt/librasterise.so is as below.
2
There might be something wrong with my GL or EGL library, but I don't know hot to solve it, could you give me some advice?

Error while doing pip install .

Processing /home/ankur/ankur/project/dirt
Requirement already satisfied: tensorflow-gpu>=1.4 in /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages (from dirt==0.2.0) (1.13.1)
Requirement already satisfied: numpy in /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages (from dirt==0.2.0) (1.16.3)
Requirement already satisfied: keras-preprocessing>=1.0.5 in /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (1.0.9)
Requirement already satisfied: enum34>=1.1.6 in /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (1.1.6)
Requirement already satisfied: astor>=0.6.0 in /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (0.7.1)
Requirement already satisfied: backports.weakref>=1.0rc1 in /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (1.0.post1)
Requirement already satisfied: wheel in /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (0.33.4)
Requirement already satisfied: mock>=2.0.0 in /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (2.0.0)
Requirement already satisfied: tensorflow-estimator<1.14.0rc0,>=1.13.0 in /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (1.13.0)
Requirement already satisfied: gast>=0.2.0 in /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (0.2.2)
Requirement already satisfied: termcolor>=1.1.0 in /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (1.1.0)
Requirement already satisfied: protobuf>=3.6.1 in /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (3.7.1)
Requirement already satisfied: absl-py>=0.1.6 in /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (0.7.1)
Requirement already satisfied: tensorboard<1.14.0,>=1.13.0 in /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (1.13.1)
Requirement already satisfied: six>=1.10.0 in /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (1.12.0)
Requirement already satisfied: keras-applications>=1.0.6 in /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (1.0.7)
Requirement already satisfied: grpcio>=1.8.6 in /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (1.16.1)
Requirement already satisfied: funcsigs>=1 in /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages (from mock>=2.0.0->tensorflow-gpu>=1.4->dirt==0.2.0) (1.0.2)
Requirement already satisfied: pbr>=0.11 in /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages (from mock>=2.0.0->tensorflow-gpu>=1.4->dirt==0.2.0) (5.1.3)
Requirement already satisfied: setuptools in /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages (from protobuf>=3.6.1->tensorflow-gpu>=1.4->dirt==0.2.0) (41.0.1)
Requirement already satisfied: futures>=3.1.1; python_version < "3" in /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages (from tensorboard<1.14.0,>=1.13.0->tensorflow-gpu>=1.4->dirt==0.2.0) (3.2.0)
Requirement already satisfied: werkzeug>=0.11.15 in /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages (from tensorboard<1.14.0,>=1.13.0->tensorflow-gpu>=1.4->dirt==0.2.0) (0.15.2)
Requirement already satisfied: markdown>=2.6.8 in /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages (from tensorboard<1.14.0,>=1.13.0->tensorflow-gpu>=1.4->dirt==0.2.0) (3.1)
Requirement already satisfied: h5py in /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages (from keras-applications>=1.0.6->tensorflow-gpu>=1.4->dirt==0.2.0) (2.9.0)
Building wheels for collected packages: dirt
Building wheel for dirt (setup.py) ... error
ERROR: Complete output from command /home/ankur/.conda/envs/octopus/bin/python -u -c 'import setuptools, tokenize;file='"'"'/tmp/pip-req-build-HwzLYf/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-k8nsjz --python-tag cp27:
ERROR: running bdist_wheel
running build
-- The CXX compiler identification is GNU 7.4.0
-- The CUDA compiler identification is NVIDIA 9.1.85
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working CUDA compiler: /usr/bin/nvcc
-- Check for working CUDA compiler: /usr/bin/nvcc -- works
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pip-req-build-HwzLYf/build
Scanning dependencies of target rasterise
[ 14%] Building CXX object CMakeFiles/rasterise.dir/rasterise_egl.cpp.o
[ 28%] Building CUDA object CMakeFiles/rasterise.dir/rasterise_egl.cu.o
[ 42%] Building CXX object CMakeFiles/rasterise.dir/rasterise_grad_egl.cpp.o
[ 57%] Building CUDA object CMakeFiles/rasterise.dir/rasterise_grad_egl.cu.o
In file included from /usr/include/crt/math_functions.h:8835:0,
from /usr/include/crt/common_functions.h:271,
from /usr/include/common_functions.h:50,
from /usr/include/cuda_runtime.h:115,
from :0:
/usr/include/c++/6/cmath:45:23: fatal error: math.h: No such file or directory
#include_next <math.h>
^
compilation terminated.
In file included from /usr/include/crt/math_functions.h:8835:0,
from /usr/include/crt/common_functions.h:271,
from /usr/include/common_functions.h:50,
from /usr/include/cuda_runtime.h:115,
from :0:
/usr/include/c++/6/cmath:45:23: fatal error: math.h: No such file or directory
#include_next <math.h>
^
compilation terminated.
CMakeFiles/rasterise.dir/build.make:86: recipe for target 'CMakeFiles/rasterise.dir/rasterise_egl.cu.o' failed
make[2]: *** [CMakeFiles/rasterise.dir/rasterise_egl.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/rasterise.dir/build.make:134: recipe for target 'CMakeFiles/rasterise.dir/rasterise_grad_egl.cu.o' failed
make[2]: *** [CMakeFiles/rasterise.dir/rasterise_grad_egl.cu.o] Error 1
In file included from /tmp/pip-req-build-HwzLYf/csrc/rasterise_egl.cpp:24:0:
/home/ankur/.conda/envs/octopus/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceCuda.h:3:2: warning: #warning "Deprecated header file, please either include the main Eigen/CXX11/Tensor header or the respective TensorDeviceGpu.h file" [-Wcpp]
#warning "Deprecated header file, please either include the main Eigen/CXX11/Tensor header or the respective TensorDeviceGpu.h file"
^~~~~~~
In file included from /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h:16:0,
from /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceCuda.h:6,
from /tmp/pip-req-build-HwzLYf/csrc/rasterise_egl.cpp:24:
/home/ankur/.conda/envs/octopus/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/src/Tensor/TensorGpuHipCudaDefines.h:85:0: warning: "gpu_assert" redefined
#define gpu_assert(COND) assert(COND)

In file included from /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages/tensorflow/include/third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1:0,
from /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages/tensorflow/include/tensorflow/core/framework/numeric_types.h:20,
from /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages/tensorflow/include/tensorflow/core/framework/allocator.h:23,
from /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages/tensorflow/include/tensorflow/core/framework/op_kernel.h:23,
from /tmp/pip-req-build-HwzLYf/csrc/rasterise_egl.cpp:14:
/home/ankur/.conda/envs/octopus/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/Tensor:106:0: note: this is the location of the previous definition
#define gpu_assert(x)

In file included from /tmp/pip-req-build-HwzLYf/csrc/rasterise_grad_egl.cpp:22:0:
/home/ankur/.conda/envs/octopus/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceCuda.h:3:2: warning: #warning "Deprecated header file, please either include the main Eigen/CXX11/Tensor header or the respective TensorDeviceGpu.h file" [-Wcpp]
#warning "Deprecated header file, please either include the main Eigen/CXX11/Tensor header or the respective TensorDeviceGpu.h file"
^~~~~~~
In file included from /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h:16:0,
from /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceCuda.h:6,
from /tmp/pip-req-build-HwzLYf/csrc/rasterise_grad_egl.cpp:22:
/home/ankur/.conda/envs/octopus/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/src/Tensor/TensorGpuHipCudaDefines.h:85:0: warning: "gpu_assert" redefined
#define gpu_assert(COND) assert(COND)

In file included from /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages/tensorflow/include/third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1:0,
from /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages/tensorflow/include/tensorflow/core/framework/numeric_types.h:20,
from /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages/tensorflow/include/tensorflow/core/framework/allocator.h:23,
from /home/ankur/.conda/envs/octopus/lib/python2.7/site-packages/tensorflow/include/tensorflow/core/framework/op_kernel.h:23,
from /tmp/pip-req-build-HwzLYf/csrc/rasterise_grad_egl.cpp:12:
/home/ankur/.conda/envs/octopus/lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/Tensor:106:0: note: this is the location of the previous definition
#define gpu_assert(x)

/tmp/pip-req-build-HwzLYf/csrc/rasterise_grad_egl.cpp: In lambda function:
/tmp/pip-req-build-HwzLYf/csrc/rasterise_grad_egl.cpp:49:90: warning: ignoring return value of ‘tensorflow::Status tensorflow::shape_inference::InferenceContext::ReplaceDim(tensorflow::shape_inference::ShapeHandle, tensorflow::int64, tensorflow::shape_inference::DimensionHandle, tensorflow::shape_inference::ShapeHandle*)’, declared with attribute warn_unused_result [-Wunused-result]
c->ReplaceDim(c->input(0), 2, c->Dim(c->input(2), 3), &grad_vertex_colours_shape); // i.e. vertex-colors has same shape as vertices, but with final dimension replaced by channel count
^
In file included from /tmp/pip-req-build-HwzLYf/csrc/rasterise_grad_egl.cpp:13:0:
/home/ankur/.conda/envs/octopus/lib/python2.7/site-packages/tensorflow/include/tensorflow/core/framework/shape_inference.h:453:10: note: declared here
Status ReplaceDim(ShapeHandle s, int64 dim_index, DimensionHandle new_dim,
^~~~~~~~~~
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/rasterise.dir/all' failed
make[1]: *** [CMakeFiles/rasterise.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-req-build-HwzLYf/setup.py", line 46, in
'Programming Language :: Python :: 2.7',
File "/home/ankur/.conda/envs/octopus/lib/python2.7/site-packages/setuptools/init.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/home/ankur/.conda/envs/octopus/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/home/ankur/.conda/envs/octopus/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/home/ankur/.conda/envs/octopus/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/home/ankur/.conda/envs/octopus/lib/python2.7/site-packages/wheel/bdist_wheel.py", line 192, in run
self.run_command('build')
File "/home/ankur/.conda/envs/octopus/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/home/ankur/.conda/envs/octopus/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/tmp/pip-req-build-HwzLYf/setup.py", line 24, in run
build_csrc()
File "/tmp/pip-req-build-HwzLYf/setup.py", line 20, in build_csrc
subprocess.check_call(['make', '-j{}'.format(build_cpus)], cwd=build_path)
File "/home/ankur/.conda/envs/octopus/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make', '-j4']' returned non-zero exit status 2

ERROR: Failed building wheel for dirt
Running setup.py clean for dirt
Failed to build dirt
Installing collected packages: dirt
Running setup.py install for dirt ... error
ERROR: Complete output from command /home/ankur/.conda/envs/octopus/bin/python -u -c 'import setuptools, tokenize;file='"'"'/tmp/pip-req-build-HwzLYf/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-SNJ0Xz/install-record.txt --single-version-externally-managed --compile:
ERROR: running install
running build
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pip-req-build-HwzLYf/build
[ 14%] Building CUDA object CMakeFiles/rasterise.dir/rasterise_egl.cu.o
[ 28%] Building CUDA object CMakeFiles/rasterise.dir/rasterise_grad_egl.cu.o
[ 42%] Building CXX object CMakeFiles/rasterise.dir/shaders.cpp.o
In file included from /usr/include/crt/math_functions.h:8835:0,
from /usr/include/crt/common_functions.h:271,
from /usr/include/common_functions.h:50,
from /usr/include/cuda_runtime.h:115,
from :0:
/usr/include/c++/6/cmath:45:23: fatal error: math.h: No such file or directory
#include_next <math.h>
^
compilation terminated.
CMakeFiles/rasterise.dir/build.make:86: recipe for target 'CMakeFiles/rasterise.dir/rasterise_egl.cu.o' failed
make[2]: *** [CMakeFiles/rasterise.dir/rasterise_egl.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /usr/include/crt/math_functions.h:8835:0,
from /usr/include/crt/common_functions.h:271,
from /usr/include/common_functions.h:50,
from /usr/include/cuda_runtime.h:115,
from :0:
/usr/include/c++/6/cmath:45:23: fatal error: math.h: No such file or directory
#include_next <math.h>
^
compilation terminated.
CMakeFiles/rasterise.dir/build.make:134: recipe for target 'CMakeFiles/rasterise.dir/rasterise_grad_egl.cu.o' failed
make[2]: *** [CMakeFiles/rasterise.dir/rasterise_grad_egl.cu.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/rasterise.dir/all' failed
make[1]: *** [CMakeFiles/rasterise.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-req-build-HwzLYf/setup.py", line 46, in
'Programming Language :: Python :: 2.7',
File "/home/ankur/.conda/envs/octopus/lib/python2.7/site-packages/setuptools/init.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/home/ankur/.conda/envs/octopus/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/home/ankur/.conda/envs/octopus/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/home/ankur/.conda/envs/octopus/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/home/ankur/.conda/envs/octopus/lib/python2.7/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/home/ankur/.conda/envs/octopus/lib/python2.7/distutils/command/install.py", line 563, in run
self.run_command('build')
File "/home/ankur/.conda/envs/octopus/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/home/ankur/.conda/envs/octopus/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/tmp/pip-req-build-HwzLYf/setup.py", line 24, in run
build_csrc()
File "/tmp/pip-req-build-HwzLYf/setup.py", line 20, in build_csrc
subprocess.check_call(['make', '-j{}'.format(build_cpus)], cwd=build_path)
File "/home/ankur/.conda/envs/octopus/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make', '-j4']' returned non-zero exit status 2
----------------------------------------
ERROR: Command "/home/ankur/.conda/envs/octopus/bin/python -u -c 'import setuptools, tokenize;file='"'"'/tmp/pip-req-build-HwzLYf/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-SNJ0Xz/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-req-build-HwzLYf/

What does "notes" refer to in the comments

Hello,

Thanks for open-sourcing this nice package. I am trying to understand the implementation and in the comments there are lines that mention "see notes pxx". Eg: here, here, etc. Seems some additional information explanations are contained in this "notes". Is it possible that the notes be also added to the repo?
Thanks a lot.

Cmake error

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
EGL_LIBRARIES
linked by target "rasterise" in directory /home/zhanghaoruo/Documents/code/dirt/csrc
Tensorflow_LIBRARY
linked by target "rasterise" in directory /home/zhanghaoruo/Documents/code/dirt/csrc

setp up error

`Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing /home/yaolin/Documents/dirt
Requirement already satisfied: tensorflow-gpu>=1.4 in /usr/local/lib/python2.7/dist-packages (from dirt==0.2.0) (1.10.0)
Requirement already satisfied: numpy in /usr/local/lib/python2.7/dist-packages (from dirt==0.2.0) (1.14.5)
Requirement already satisfied: setuptools<=39.1.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (39.1.0)
Requirement already satisfied: astor>=0.6.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (0.7.1)
Requirement already satisfied: enum34>=1.1.6 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (1.1.6)
Requirement already satisfied: gast>=0.2.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (0.2.2)
Requirement already satisfied: tensorboard<1.11.0,>=1.10.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (1.10.0)
Requirement already satisfied: six>=1.10.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (1.12.0)
Requirement already satisfied: wheel in /usr/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (0.29.0)
Requirement already satisfied: absl-py>=0.1.6 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (0.7.1)
Requirement already satisfied: backports.weakref>=1.0rc1 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (1.0.post1)
Requirement already satisfied: termcolor>=1.1.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (1.1.0)
Requirement already satisfied: grpcio>=1.8.6 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (1.20.1)
Requirement already satisfied: protobuf>=3.6.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (3.7.1)
Requirement already satisfied: mock>=2.0.0 in /usr/local/lib/python2.7/dist-packages (from tensorflow-gpu>=1.4->dirt==0.2.0) (3.0.3)
Requirement already satisfied: werkzeug>=0.11.10 in /usr/local/lib/python2.7/dist-packages (from tensorboard<1.11.0,>=1.10.0->tensorflow-gpu>=1.4->dirt==0.2.0) (0.15.2)
Requirement already satisfied: futures>=3.1.1; python_version < "3" in /usr/local/lib/python2.7/dist-packages (from tensorboard<1.11.0,>=1.10.0->tensorflow-gpu>=1.4->dirt==0.2.0) (3.2.0)
Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python2.7/dist-packages (from tensorboard<1.11.0,>=1.10.0->tensorflow-gpu>=1.4->dirt==0.2.0) (3.1)
Requirement already satisfied: funcsigs>=1; python_version < "3.3" in /usr/local/lib/python2.7/dist-packages (from mock>=2.0.0->tensorflow-gpu>=1.4->dirt==0.2.0) (1.0.2)
Building wheels for collected packages: dirt
Building wheel for dirt (setup.py) ... error
ERROR: Complete output from command /usr/bin/python -u -c 'import setuptools, tokenize;file='"'"'/tmp/pip-req-build-TFkMzh/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-J03Czp --python-tag cp27:
ERROR: running bdist_wheel
running build
-- The CXX compiler identification is GNU 5.4.0
-- The CUDA compiler identification is unknown
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:3 (project):
No CMAKE_CUDA_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment
variable "CUDACXX" or the CMake cache entry CMAKE_CUDA_COMPILER to the full
path to the compiler, or to the compiler name if it is in the PATH.

-- Configuring incomplete, errors occurred!
See also "/tmp/pip-req-build-TFkMzh/build/CMakeFiles/CMakeOutput.log".
See also "/tmp/pip-req-build-TFkMzh/build/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-req-build-TFkMzh/setup.py", line 46, in
'Programming Language :: Python :: 2.7',
File "/usr/local/lib/python2.7/dist-packages/setuptools/init.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/dist-packages/wheel/bdist_wheel.py", line 179, in run
self.run_command('build')
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/tmp/pip-req-build-TFkMzh/setup.py", line 24, in run
build_csrc()
File "/tmp/pip-req-build-TFkMzh/setup.py", line 18, in build_csrc
subprocess.check_call(['cmake', os.path.join(base_path, 'csrc')], cwd=build_path)
File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-req-build-TFkMzh/csrc']' returned non-zero exit status 1

ERROR: Failed building wheel for dirt
Running setup.py clean for dirt
Failed to build dirt
Installing collected packages: dirt
Running setup.py install for dirt ... error
ERROR: Complete output from command /usr/bin/python -u -c 'import setuptools, tokenize;file='"'"'/tmp/pip-req-build-TFkMzh/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-uLdiH5/install-record.txt --single-version-externally-managed --compile:
ERROR: running install
running build
-- The CUDA compiler identification is unknown
CMake Error at CMakeLists.txt:3 (project):
No CMAKE_CUDA_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "CUDACXX" or the CMake cache entry CMAKE_CUDA_COMPILER to the full
  path to the compiler, or to the compiler name if it is in the PATH.


-- Configuring incomplete, errors occurred!
See also "/tmp/pip-req-build-TFkMzh/build/CMakeFiles/CMakeOutput.log".
See also "/tmp/pip-req-build-TFkMzh/build/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-req-build-TFkMzh/setup.py", line 46, in <module>
    'Programming Language :: Python :: 2.7',
  File "/usr/local/lib/python2.7/dist-packages/setuptools/__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python2.7/dist-packages/setuptools/command/install.py", line 61, in run
    return orig.install.run(self)
  File "/usr/lib/python2.7/distutils/command/install.py", line 601, in run
    self.run_command('build')
  File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/tmp/pip-req-build-TFkMzh/setup.py", line 24, in run
    build_csrc()
  File "/tmp/pip-req-build-TFkMzh/setup.py", line 18, in build_csrc
    subprocess.check_call(['cmake', os.path.join(base_path, 'csrc')], cwd=build_path)
  File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-req-build-TFkMzh/csrc']' returned non-zero exit status 1
----------------------------------------

ERROR: Command "/usr/bin/python -u -c 'import setuptools, tokenize;file='"'"'/tmp/pip-req-build-TFkMzh/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-uLdiH5/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-req-build-TFkMzh/
`

__cudaRegisterFatBinaryEnd

ubuntu16.04 ,cuda10.1 gcc 5.5
tensorflow.python.framework.errors_impl.NotFoundError : ~/dirt/dirt/librasterise.so : undefined symbol : __cudaRegisterFatBinaryEnd

error: [Errno 2] No such file or directory

Building wheels for collected packages: dirt
Building wheel for dirt (setup.py) ... error
Complete output from command /home/guan/miniconda2/envs/coma/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-req-build-nJ6gXa/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/pip-wheel-3YiLIf --python-tag cp27:
running bdist_wheel
running build
error: [Errno 2] No such file or directory

import dirt error

import dirt
Traceback (most recent call last):
File "", line 1, in
File "/home/will/dirt/dirt/init.py", line 2, in
from rasterise_ops import rasterise, rasterise_batch
File "/home/will/dirt/dirt/rasterise_ops.py", line 7, in
_rasterise_module = tf.load_op_library(_lib_path + '/librasterise.so')
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/load_library.py", line 61, in load_op_library
lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: /home/will/dirt/dirt/librasterise.so: undefined symbol: _ZN10tensorflow7strings8internal9CatPiecesB5cxx11ESt16initializer_listIN4absl11string_viewEE

after pip install to import dirt, the errors as above
env:python 2.7, tensorflow is 1.13.1 gpu version, thanks.

Dockerfile not working : ImportError: libcuda.so.1: cannot open shared object file: No such file or directory

Hello, this project looks promising, but I can't get the Dockerfile to yield a successful build.

I run this:
sudo docker build --build-arg CUDA_BASE_VERSION=9.0 --build-arg CUDNN_VERSION=7.6.0.64 --build-arg UBUNTU_VERSION=16.04 --build-arg TENSORFLOW_VERSION=1.12.0 -t dirt .

and I get this during the build process:
ImportError: libcuda.so.1: cannot open shared object file: No such file or directory

I think it's due to an incompatibility between tensorflow version and cuda version, but I've tried various tensorflow versions, with the same result.

Could you communicate the arguments that work with you? You wrote down the driver versions and OS version, but not the tensorflow version

thanks!

run square_test.py error

When I ran square_test.py, I met this error:

WARNING: Logging before flag parsing goes to stderr.
W0729 11:32:12.363955 140544179722048 deprecation_wrapper.py:119] From /home/wang/exprience/octopus/dirt/tests/square_test.py:41: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.

2019-07-29 11:32:12.364831: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcuda.so.1
2019-07-29 11:32:12.386736: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1005] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-07-29 11:32:12.387074: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 0 with properties:
name: GeForce RTX 2070 major: 7 minor: 5 memoryClockRate(GHz): 1.71
pciBusID: 0000:01:00.0
2019-07-29 11:32:12.387160: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcudart.so.10.0'; dlerror: libcudart.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-10.1/lib64
2019-07-29 11:32:12.387228: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcublas.so.10.0'; dlerror: libcublas.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-10.1/lib64
2019-07-29 11:32:12.387277: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcufft.so.10.0'; dlerror: libcufft.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-10.1/lib64
2019-07-29 11:32:12.387330: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcurand.so.10.0'; dlerror: libcurand.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-10.1/lib64
2019-07-29 11:32:12.387380: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcusolver.so.10.0'; dlerror: libcusolver.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-10.1/lib64
2019-07-29 11:32:12.387429: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcusparse.so.10.0'; dlerror: libcusparse.so.10.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-10.1/lib64
2019-07-29 11:32:12.389456: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudnn.so.7
2019-07-29 11:32:12.389468: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1663] Cannot dlopen some GPU libraries. Skipping registering GPU devices...
2019-07-29 11:32:12.389866: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-07-29 11:32:12.458633: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1005] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-07-29 11:32:12.458983: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x558e44b92c30 executing computations on platform CUDA. Devices:
2019-07-29 11:32:12.458997: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): GeForce RTX 2070, Compute Capability 7.5
2019-07-29 11:32:12.478012: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 3192000000 Hz
2019-07-29 11:32:12.478914: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x558e4516e830 executing computations on platform Host. Devices:
2019-07-29 11:32:12.478943: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): ,
2019-07-29 11:32:12.479003: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1181] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-07-29 11:32:12.479025: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1187]
2019-07-29 11:32:12.497810: W tensorflow/compiler/jit/mark_for_compilation_pass.cc:1412] (One-time warning): Not using XLA:CPU for cluster because envvar TF_XLA_FLAGS=--tf_xla_cpu_global_jit was not set. If you want XLA:CPU, either set that envvar, or use experimental_jit_scope to enable XLA:CPU. To confirm that XLA is active, pass --vmodule=xla_compilation_cache=1 (as a proper command-line flag, not via TF_XLA_FLAGS) or set the envvar XLA_FLAGS=--xla_hlo_profile.
Traceback (most recent call last):
File "/home/wang/exprience/octopus/dirt/tests/square_test.py", line 54, in
main()
File "/home/wang/exprience/octopus/dirt/tests/square_test.py", line 45, in main
dirt_pixels = get_dirt_pixels().eval()
File "/home/wang/.local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 731, in eval
return _eval_using_default_session(self, feed_dict, self.graph, session)
File "/home/wang/.local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 5579, in _eval_using_default_session
return session.run(tensors, feed_dict)
File "/home/wang/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 950, in run
run_metadata_ptr)
File "/home/wang/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1173, in _run
feed_dict_tensor, options, run_metadata)
File "/home/wang/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1350, in _do_run
run_metadata)
File "/home/wang/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1370, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: No OpKernel was registered to support Op 'Rasterise' used by node Rasterise (defined at :89) with these attrs: [width=128, channels=1, height=128]
Registered devices: [CPU, XLA_CPU, XLA_GPU]
Registered kernels:
device='GPU'

 [[Rasterise]]

Errors may have originated from an input operation.
Input Source operations connected to node Rasterise:
Rasterise/strided_slice_3 (defined at /home/wang/.local/lib/python2.7/site-packages/dirt/rasterise_ops.py:51)

@pmh47 Could you tell me what makes this error? Thank you!

undefined symbol during tests with tf 1.13.0.dev20190226

Hi! Thank you for your project!
I tried to run tests (python tests/square_test.py) with tf-nightly and obtained following error

Traceback (most recent call last):
  File "tests/square_test.py", line 4, in <module>
    import dirt
  File "/home/daiver/coding/dirt/.venv/lib/python2.7/site-packages/dirt/__init__.py", line 2, in <module>
    from rasterise_ops import rasterise, rasterise_batch
  File "/home/daiver/coding/dirt/.venv/lib/python2.7/site-packages/dirt/rasterise_ops.py", line 7, in <module>
    _rasterise_module = tf.load_op_library(_lib_path + '/librasterise.so')
  File "/home/daiver/coding/dirt/.venv/lib/python2.7/site-packages/tensorflow/python/framework/load_library.py", line 61, in load_op_library
    lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: /home/daiver/coding/dirt/.venv/lib/python2.7/site-packages/dirt/librasterise.so: undefined symbol: _ZN10tensorflow7strings8internal9CatPiecesB5cxx11ESt16initializer_listIN4absl11string_viewEE

My system info:

cat /etc/issue
Ubuntu 18.04.2 LTS \n \l

python --version
Python 2.7.15rc1

pip show tf-nightly-gpu
Name: tf-nightly-gpu
Version: 1.13.0.dev20190226

Cmake error

cmake ../csrc/ -D_OPENGL_LIB_PATH=/usr/lib/nvidia-410
-- The CXX compiler identification is GNU 5.4.0
-- The CUDA compiler identification is NVIDIA 9.0.176
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working CUDA compiler: /usr/bin/nvcc
-- Check for working CUDA compiler: /usr/bin/nvcc -- works
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Found OpenGL: /usr/lib/nvidia-410/libOpenGL.so found components: OpenGL EGL
-- Configuring done
CMake Warning at CMakeLists.txt:42 (add_library):
Cannot generate a safe runtime search path for target rasterise because
files in some directories may conflict with libraries in implicit
directories:

runtime library [libEGL.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /usr/lib/nvidia-410

Some of these libraries may not be found correctly.

-- Generating done

error in make: rasterise_egl.cu.o fail

This appeared after some automatic upgrade of libraries, and I haven't been able to sort it out, yet.

1 error detected in the compilation of "/tmp/tmpxft_00003f30_00000000-6_rasterise_egl.cpp1.ii".
CMakeFiles/rasterise.dir/build.make:86: recipe for target 'CMakeFiles/rasterise.dir/rasterise_egl.cu.o' failed
make[2]: *** [CMakeFiles/rasterise.dir/rasterise_egl.cu.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/rasterise.dir/all' failed
make[1]: *** [CMakeFiles/rasterise.dir/all] Error 2
Makefile:83: recipe for target 'all' failed

port of DIRT to Windows?

Has anyone attempted to port to Windows? I am unfamiliar with the build/linking questions on windows, since this libtensorflow_framework.so (DLL) seems to be missing.

Fix linking libtensorflow_framework under tensorflow 1.14

libtensorflow_framework.so has become libtensorflow_framework.so.1 as of tensorflow 1.14, hence it is not found by cmake. The best way to fix this is to change tf.sysconfig.get_lib to tf.sysconfig.get_link_flags, which in turn requires bumping our minimum supported tensorflow version to 1.5, when that function was added.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.