mitsuba-renderer / mitsuba2

Mitsuba 2: A Retargetable Forward and Inverse Renderer
Other
2.04k stars 267 forks source link

- [🐛 bug report] OPTIX API error = 7200 (Invalid PTX input) in ...\mitsuba2\src\librender\scene_optix.inl:109 Log: #429

Open pratheeka171 opened 3 years ago

pratheeka171 commented 3 years ago

Summary

Runtime error of mitsuba2 while using gpu variant. building scene in optix does not work /fails with blank log message.

System configuration

Description

I would like to use the gpu variant of mitsuba 2 because the packet variant of mitsuba does not support BSDF() function in surfaceinteraction. Mitsuba2 compiles successfully without any errors but 1) when a xml file is given to render in the command line through the command -> mitsuba cbox.xml , xml file is successfully loaded, plugins are successfully loaded but the process stops when the scene is building in optix and throws a runtime error as follows: rt_check() : optix API error = 7200 (Invalid PTX input) in C:...\mitsuba2\src\librender\scene_optix.inl : 109. Log: 2) Tried through python API in jupyter notebook, the kernel simply dies.

Steps to reproduce

  1. changed the mitsuba.conf file variant to scalar_rgb and gpu_autodiff_rgb and the default to gpu_autodiff_rgb
  2. build configured with cmake
  3. solution built in visual studio 2019
  4. xml file loaded and renderer called through command line using command: _mitsuba _
  5. the above error occurs
Speierers commented 3 years ago

Hi @pratheeka171 ,

Could you try this in debug mode?

pratheeka171 commented 3 years ago

Hello @Speierers,

yes I tried to compile in debug mode. Mitsuba2 compiles successfully but I get the same error while building the scene with some information on the current process. Also, there are few warnings during the cmake build.

Please find the attached pictures for cmake build warnings and also the debug mode information while building the scene. Please let me know how I can proceed further. Thank you.

Cmake_warnings debug_mode_error
pjessesco commented 3 years ago

Same warning occurs to me too, but I could render successfully in gpu_autodiff_rgb, https://github.com/mitsuba-renderer/mitsuba2/commit/2cd84c842183aa285cf543307c875d565b1621f0 on Windows VS2019 with cuda 10.2.

image

Speierers commented 3 years ago

@pratheeka171 what are the specs of your machine (e.g. GPU type). And which version of CUDA and nvcc are installed on your system?

pratheeka171 commented 3 years ago

@Speierers Specs of my machine are : Nvidia GeForce 940MX version : 466.11 CUDA 11.2 windows 10 VS2019 community version cmake : 3.18.2

pratheeka171 commented 3 years ago

@pjessesco I am also using the same variant i.e., gpu_autodiff_rgb on windows VS2019 but with cuda version 11.2. the same error remains the same.

Speierers commented 3 years ago

Could you try the following:

  1. Edit resources/ptx/Makefile replacing the 2 occurances of compute_61 into compute_50
  2. Regenerate the PTX code:
    cd resources/ptx
    make
  3. Rebuild mitsuba
  4. Try to run
pratheeka171 commented 3 years ago

@Speierers I tried the above method. yet no progress. it is the same error. I installed make for windows and when I ran the make command, 'Nothing to be done for all' was the output I obtained. please find the pictures of this output below .

make_output mitsuba_error
merlinND commented 3 years ago

"Nothing to be done" indicates that the changes were not picked up, start with make clean.

cd resources/ptx
make clean
make
pratheeka171 commented 3 years ago

@merlinND thank you. I tried to make clean but i get the make error as 'recipe for target 'optix_rt.ptx' failed' . Please find the attached screenshot

make_clean_error
Speierers commented 3 years ago

You should be able to compile this directly using nvcc if the Makefile doesn't work for you 😉

negarl commented 2 years ago

Hi, I get the same error : rt_check(): OptiX API error = 7200 (Invalid PTX input) in ../src/librender/scene_optix.inl:109. when I try to run the python code but when I used "mitsuba filename.xml" in the terminal I got the ".exr" rendered file. I am using ubuntu 20.04m, Cuda 10, and driver Version: 495.29.05 and I had no error compiling mitsuba.

PerryXDeng commented 2 years ago

Also encountered this error, but only on one of the servers I am using, which has NVIDIA driver 470.82.01, CUDA Toolkit 11.4, and P100 graphics card. The other environments with RTX2070 or V100 does not have this issue. I tried recompiling with the ptx makefile edited to include compute_60 (corresponding to the compute capability of P100) with no results.

Speierers commented 2 years ago

@negarl did you try to update you GPU driver by any chance?

ArnoCo commented 2 years ago

Could you try the following:

  1. Edit resources/ptx/Makefile replacing the 2 occurances of compute_61 into compute_50
  2. Regenerate the PTX code:
cd resources/ptx
make
  1. Rebuild mitsuba
  2. Try to run

FWIW the fix suggested by @Speierers fixed the issue in our environment. On our newer graphics cards (2080Ti) this fix was not needed.

Platform: Ubuntu 20.04 Python version: 3.8.10 Mitsuba 2 version: latest version Compiled variants: scalar_rgb gpu_rgb

Graphics Card: GTX 980 CUDA version: 11.6