Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐛 bug report]cuda_var_register(): attempted to create a variable of size zero! #565

Open
Chenguoz opened this issue Jan 23, 2022 · 2 comments

Comments

@Chenguoz
Copy link

Summary

The following error occurs when I use gpu rendering(gpu_rgb gpu_autodiff_spectral),But it can be executed successfully when using the default variant

Caught a critical exception: cuda_var_register(): attempted to create a variable of size zero!

BUG Report

D:\mitsuba\mitsuba2>mitsuba 1.xml -m gpu_rgb
2022-01-23 21:41:16 INFO  main  [optix_api.cpp:56] Dynamic loading of the Optix library ..
2022-01-23 21:41:16 INFO  main  [mitsuba.cpp:218] Mitsuba version 2.2.1 (master[4e7628c6], Windows, 64bit, 12 threads, 8-wide SIMD)
2022-01-23 21:41:16 INFO  main  [mitsuba.cpp:219] Copyright 2020, Realistic Graphics Lab, EPFL
2022-01-23 21:41:16 INFO  main  [mitsuba.cpp:220] Enabled processor features: cuda avx2 avx fma f16c sse4.2 x86_64
2022-01-23 21:41:16 INFO  main  [xml.cpp:1221] Loading XML file "1.xml" ..
2022-01-23 21:41:16 INFO  main  [xml.cpp:1222] Using variant "gpu_rgb"
2022-01-23 21:41:16 INFO  main  [xml.cpp:355] "1.xml": in-memory version upgrade (v0.6.0 -> v2.2.1) ..
2022-01-23 21:41:16 INFO  main  [PluginManager] Loading plugin "plugins\srgb.dll" ..
2022-01-23 21:41:16 INFO  main  [PluginManager] Loading plugin "plugins\srgb_d65.dll" ..
2022-01-23 21:41:16 INFO  main  [PluginManager] Loading plugin "plugins\path.dll" ..
2022-01-23 21:41:16 INFO  main  [PluginManager] Loading plugin "plugins\ldsampler.dll" ..
2022-01-23 21:41:16 INFO  main  [PluginManager] Loading plugin "plugins\gaussian.dll" ..
2022-01-23 21:41:16 INFO  main  [PluginManager] Loading plugin "plugins\hdrfilm.dll" ..
2022-01-23 21:41:16 INFO  main  [PluginManager] Loading plugin "plugins\perspective.dll" ..
2022-01-23 21:41:16 INFO  main  [PluginManager] Loading plugin "plugins\roughplastic.dll" ..
2022-01-23 21:41:16 INFO  main  [PluginManager] Loading plugin "plugins\diffuse.dll" ..
2022-01-23 21:41:16 INFO  main  [PluginManager] Loading plugin "plugins\sphere.dll" ..
2022-01-23 21:41:16 INFO  main  [PluginManager] Loading plugin "plugins\rectangle.dll" ..
2022-01-23 21:41:16 INFO  main  [PluginManager] Loading plugin "plugins\area.dll" ..
2022-01-23 21:41:16 INFO  main  [PluginManager] Loading plugin "plugins\uniform.dll" ..
2022-01-23 21:41:16 INFO  main  [Scene] Building scene in OptiX ..
2022-01-23 21:41:16 INFO  main  [SamplingIntegrator] Start rendering...

Caught a critical exception: cuda_var_register(): attempted to create a variable of size zero!
  • Platform: windows10
  • Compiler: cuda10.1
  • Python version: 3.7
  • Mitsuba 2 version: 2.2.1
  • Compiled variants:
    • scalar_rgb
    • scalar_spectral
    • gpu_rgb
    • gpu_autodiff_spectral
@QifHE
Copy link

QifHE commented May 23, 2022

mitsuba -m gpu_autodiff_rgb -o gt.exr gt.xml

log

2022-05-23 16:04:00 INFO  main  [optix_api.cpp:56] Dynamic loading of the Optix library ..
2022-05-23 16:04:00 INFO  main  [mitsuba.cpp:218] Mitsuba version 2.2.1 (master[4e7628c6], Linux, 64bit, 28 threads, 8-wide SIMD)
2022-05-23 16:04:00 INFO  main  [mitsuba.cpp:219] Copyright 2020, Realistic Graphics Lab, EPFL
2022-05-23 16:04:00 INFO  main  [mitsuba.cpp:220] Enabled processor features: cuda avx2 avx fma f16c sse4.2 x86_64
2022-05-23 16:04:00 INFO  main  [xml.cpp:1221] Loading XML file "gt.xml" ..
2022-05-23 16:04:00 INFO  main  [xml.cpp:1222] Using variant "gpu_autodiff_rgb"
2022-05-23 16:04:00 INFO  main  [xml.cpp:355] "gt.xml": in-memory version upgrade (v0.5.0 -> v2.2.1) ..
2022-05-23 16:04:00 INFO  main  [PluginManager] Loading plugin "plugins/srgb.so" ..
2022-05-23 16:04:00 INFO  main  [PluginManager] Loading plugin "plugins/srgb_d65.so" ..
2022-05-23 16:04:00 INFO  main  [PluginManager] Loading plugin "plugins/path.so" ..
2022-05-23 16:04:00 INFO  main  [PluginManager] Loading plugin "plugins/ldsampler.so" ..
2022-05-23 16:04:00 INFO  main  [PluginManager] Loading plugin "plugins/gaussian.so" ..
2022-05-23 16:04:00 INFO  main  [PluginManager] Loading plugin "plugins/hdrfilm.so" ..
2022-05-23 16:04:00 INFO  main  [PluginManager] Loading plugin "plugins/perspective.so" ..
2022-05-23 16:04:00 INFO  main  [PluginManager] Loading plugin "plugins/roughplastic.so" ..
2022-05-23 16:04:00 INFO  main  [PluginManager] Loading plugin "plugins/diffuse.so" ..
2022-05-23 16:04:00 INFO  main  [PluginManager] Loading plugin "plugins/sphere.so" ..
2022-05-23 16:04:00 INFO  main  [PluginManager] Loading plugin "plugins/rectangle.so" ..
2022-05-23 16:04:00 INFO  main  [PluginManager] Loading plugin "plugins/area.so" ..
2022-05-23 16:04:00 INFO  main  [PluginManager] Loading plugin "plugins/uniform.so" ..
2022-05-23 16:04:00 INFO  main  [Scene] Building scene in OptiX ..
2022-05-23 16:04:00 INFO  main  [SamplingIntegrator] Start rendering...

Caught a critical exception: cuda_var_register(): attempted to create a variable of size zero!

I've encountered the same problem when using gpu_autodiff_spectral variant with NVIDIA 3090, Ubuntu 20.04, CUDA 11.0 and mistsuba 2.2.1. Hopefully someone will be able to answer our question. Thanks in advance.

@Speierers
Copy link
Member

Hi @Chenguoz ,

Could you compile in debug mode and run this into a debugger to better understand which part of the Mitsuba code triggers this error?

This will likely be fixed in the upcoming version, but shouldn't be too hard to fix once we find the source of the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants