Shader 'kernel_73b038d546fe000a.ptx' is not found in cache. The shader will be recompiled.
disini opened this issue · 9 comments
Hello,
finally the compiling succeeded, and I tried some scenes that downloaded from
https://github.com/LuisaGroup/LuisaRenderScenes/releases/tag/scenes
and I input the commands below with several different scenes,
github/LuisaGroup/LuisaRender/LuisaRender# build_ubuntu/bin/luisa-render-cli -b cuda scenes/spaceship/spaceship/scene.luisa
but it always give some warnings :
[2023-07-28 00:25:34.306] [console] [warning] Invalid texture coordinates in mesh '/media/liusheng/Projects/project/game_engines/LuisaRender/github/LuisaGroup/LuisaRender/LuisaRender/scenes/spaceship/spaceship/models/Mesh050.obj': address = 0x0, components = 0. [/media/liusheng/Projects/project/game_engines/LuisaRender/github/LuisaGroup/LuisaRender/LuisaRender/src/shapes/mesh.cpp:96]
[2023-07-28 00:25:34.306] [console] [info] Loaded triangle mesh '/media/liusheng/Projects/project/game_engines/LuisaRender/github/LuisaGroup/LuisaRender/LuisaRender/scenes/spaceship/spaceship/models/Mesh050.obj' in 56.093821999999996 ms.
and errors:
[2023-07-28 00:26:32.793] [console] [info] Computed accel memory usage in 0.0043809999999999995 ms: temp = 5760, temp_update = 0, output = 18816.
[2023-07-28 00:26:32.795] [console] [info] CUDAAccel compaction: before = 18816B, after = 17920B, ratio = 0.9523809523809523.
[2023-07-28 00:26:32.796] [console] [info] Created pipeline with 1 camera(s), 90 shape instance(s), 10 surface instance(s), and 4 light instance(s).
[2023-07-28 00:26:32.796] [console] [info] Wavefront path tracing configurations: resolution = 1920x1080, spp = 16384, state_count = 33177600, samples_per_pass = 16.
[2023-07-28 00:26:32.818] [console] [info] Compiling ray generation kernel.
[2023-07-28 00:26:32.820] [console] [info] Compiling intersection kernel.
[2023-07-28 00:26:32.821] [console] [info] Compiling environment evaluation kernel.
[2023-07-28 00:26:32.821] [console] [info] Generated CUDA source in 0.251282 ms.
[2023-07-28 00:26:32.821] [console] [info] Generated CUDA source in 0.759776 ms.
[2023-07-28 00:26:32.821] [console] [info] Read file /media/liusheng/Projects/project/game_engines/LuisaRender/github/LuisaGroup/LuisaRender/LuisaRender/build_ubuntu/bin/.cache/kernel_73b038d546fe000a.ptx failed.
[2023-07-28 00:26:32.821] [console] [info] Read file /media/liusheng/Projects/project/game_engines/LuisaRender/github/LuisaGroup/LuisaRender/LuisaRender/build_ubuntu/bin/.cache/kernel_b037032d8023c793.ptx failed.
[2023-07-28 00:26:32.821] [console] [info] Read file /media/liusheng/Projects/project/game_engines/LuisaRender/github/LuisaGroup/LuisaRender/LuisaRender/build_ubuntu/bin/.cache/kernel_73b038d546fe000a.ptx.metadata failed.
[2023-07-28 00:26:32.821] [console] [info] Shader 'kernel_73b038d546fe000a.ptx' is not found in cache. The shader will be recompiled.
[2023-07-28 00:26:32.821] [console] [info] Read file /media/liusheng/Projects/project/game_engines/LuisaRender/github/LuisaGroup/LuisaRender/LuisaRender/build_ubuntu/bin/.cache/kernel_b037032d8023c793.ptx.metadata failed.
[2023-07-28 00:26:32.821] [console] [info] Shader 'kernel_b037032d8023c793.ptx' is not found in cache. The shader will be recompiled.
[2023-07-28 00:26:32.822] [console] [info] Compiling light evaluation kernel.
[2023-07-28 00:26:32.823] [console] [info] Generated CUDA source in 0.64557 ms.
[2023-07-28 00:26:32.823] [console] [info] Read file /media/liusheng/Projects/project/game_engines/LuisaRender/github/LuisaGroup/LuisaRender/LuisaRender/build_ubuntu/bin/.cache/kernel_76297bf4429dae81.ptx failed.
[2023-07-28 00:26:32.824] [console] [info] Read file /media/liusheng/Projects/project/game_engines/LuisaRender/github/LuisaGroup/LuisaRender/LuisaRender/build_ubuntu/bin/.cache/kernel_76297bf4429dae81.ptx.metadata failed.
[2023-07-28 00:26:32.824] [console] [info] Shader 'kernel_76297bf4429dae81.ptx' is not found in cache. The shader will be recompiled.
[2023-07-28 00:26:32.824] [console] [info] Compiling light sampling kernel.
段错误 (核心已转储)
So, is the command I used wrong ? or is there anything else should I do ?
I used this renderer right away after it was compiled successfully, so why it says the .ptx files not found in cache ?
Thanks so much!!
Hi, @disini
Thanks for reporting this.
I can reproduce the segfault error with the spaceship scene—so it should be an internal bug. I will take some time to dig into it.
The warnings about the mesh texture coordinates and ptx
file read failures are just fine to ignore. The texture coordinates are for texture sampling; the ptx
files are compilation caches and will be recompiled if missing.
Hi, @disini
The segfault was caused by the CUDA AST code generation in LuisaCompute, which attempts to dereference a nullptr
when emitting the type name for void
.
I fixed the bug in LuisaCompute and updated the submodules in LuisaRender. Please use
git pull && git submodule update --recursive --init
to update the repo and its submodules to apply the fix.
Thanks again for discovering this bug!
Thank you sir!
I tried to execute the same command for several times but it didn't recompile the .ptx file, it still report some errors like this and interrupted again and again.
I tried some more scene files, and they were all failed to finish the rendering.
for example the jinx scene:
build_ubuntu/bin/luisa-render-cli -b cuda scenes/jinx/scene.json
and there some other warnings and errors:
2023-07-28 01:43:38.870] [console] [info] Loaded dynamic module '/media/liusheng/Projects/project/game_engines/LuisaRender/github/LuisaGroup/LuisaRender/LuisaRender/build_ubuntu/bin/libluisa-render-surface-disney.so' in 0.540655 ms.
[2023-07-28 01:43:38.876] [console] [info] Loaded dynamic module '/media/liusheng/Projects/project/game_engines/LuisaRender/github/LuisaGroup/LuisaRender/LuisaRender/build_ubuntu/bin/libluisa-render-texture-swizzle.so' in 5.823637 ms.
[2023-07-28 01:43:38.878] [console] [warning] Property 'swizzle' is defined but is not a number list in scene description node 'Texture:textures/mat0_Ears_metallicRoughness.png:Metallic'. [/media/liusheng/Projects/project/game_engines/LuisaRender/github/LuisaGroup/LuisaRender/LuisaRender/scenes/jinx/lr_exported_materials.json:1:0]
[2023-07-28 01:43:38.879] [console] [warning] Property 'swizzle' is defined but is not a number list in scene description node 'Texture:textures/mat0_Ears_metallicRoughness.png:Roughness'. [/media/liusheng/Projects/project/game_engines/LuisaRender/github/LuisaGroup/LuisaRender/LuisaRender/scenes/jinx/lr_exported_materials.json:1:0]
[2023-07-28 01:43:38.889] [console] [warning] Property 'swizzle' is defined but is not a number list in scene description node 'Texture:textures/mat0_Chest_metallicRoughness.png:Metallic'. [/media/liusheng/Projects/project/game_engines/LuisaRender/github/LuisaGroup/LuisaRender/LuisaRender/scenes/jinx/lr_exported_materials.json:1:0]
[2023-07-28 01:43:38.889] [console] [warning] Property 'swizzle' is defined but is not a number list in scene description node 'Texture:textures/mat0_Chest_metallicRoughness.png:Roughness'. [/media/liusheng/Projects/project/game_engines/LuisaRender/github/LuisaGroup/LuisaRender/LuisaRender/scenes/jinx/lr_exported_materials.json:1:0]
[2023-07-28 01:43:38.893] [console] [warning] Property 'swizzle' is defined but is not a number list in scene description node 'Texture:textures/mat0_Hair_metallicRoughness.png:Metallic'. [/media/liusheng/Projects/project/game_engines/LuisaRender/github/LuisaGroup/LuisaRender/LuisaRender/scenes/jinx/lr_exported_materials.json:1:0]
[2023-07-28 01:43:38.893] [console] [warning] Property 'swizzle' is defined but is not a number list in scene description node 'Texture:textures/mat0_Hair_metallicRoughness.png:Roughness'. [/media/liusheng/Projects/project/game_engines/LuisaRender/github/LuisaGroup/LuisaRender/LuisaRender/scenes/jinx/lr_exported_materials.json:1:0]
[2023-07-28 01:43:38.897] [console] [warning] Property 'swizzle' is defined but is not a number list in scene description node 'Texture:textures/mat0_Head_metallicRoughness.png:Metallic'. [/media/liusheng/Projects/project/game_engines/LuisaRender/github/LuisaGroup/LuisaRender/LuisaRender/scenes/jinx/lr_exported_materials.json:1:0]
[2023-07-28 01:43:38.897] [console] [warning] Property 'swizzle' is defined but is not a number list in scene description node 'Texture:textures/mat0_Head_metallicRoughness.png:Roughness'. [/media/liusheng/Projects/project/game_engines/LuisaRender/github/LuisaGroup/LuisaRender/LuisaRender/scenes/jinx/lr_exported_materials.json:1:0]
[2023-07-28 01:43:38.915] [console] [warning] Property 'swizzle' is defined but is not a number list in scene description node 'Texture:textures/mat0_Eyes_metallicRoughness.png:Metallic'. [/media/liusheng/Projects/project/game_engines/LuisaRender/github/LuisaGroup/LuisaRender/LuisaRender/scenes/jinx/lr_exported_materials.json:1:0]
[2023-07-28 01:43:39.664] [console] [info] Computed mesh memory usage: temp = 15616, temp_update = 0, output = 408704.
[2023-07-28 01:43:39.666] [console] [info] CUDAMesh compaction sizes: before = 408704B, after = 382208B, ratio = 0.9351706858753523.
[2023-07-28 01:43:39.670] [console] [warning] Failed to allocate 16777216 bytes from CUDAHostBufferPool. Falling back to ad-hoc allocation. [/media/liusheng/Projects/project/game_engines/LuisaRender/github/LuisaGroup/LuisaRender/LuisaRender/src/compute/src/backends/cuda/cuda_host_buffer_pool.cpp:35]
[2023-07-28 01:43:39.674] [console] [info] Computed mesh memory usage: temp = 226048, temp_update = 0, output = 6313856.
[2023-07-28 01:43:39.676] [console] [info] CUDAMesh compaction sizes: before = 6313856B, after = 5835776B, ratio = 0.9242808198349788.
[2023-07-28 01:43:39.697] [console] [info] Computed mesh memory usage: temp = 123008, temp_update = 0, output = 3422080.
[2023-07-28 01:43:39.698] [console] [info] CUDAMesh compaction sizes: before = 3422080B, after = 3200384B, ratio = 0.9352160089769964.
[2023-07-28 01:43:39.711] [console] [info] Computed mesh memory usage: temp = 4864, temp_update = 0, output = 105856.
[2023-07-28 01:43:39.713] [console] [info] CUDAMesh compaction sizes: before = 105856B, after = 94464B, ratio = 0.8923821039903265.
[2023-07-28 01:43:39.716] [console] [warning] Failed to allocate 16777216 bytes from CUDAHostBufferPool. Falling back to ad-hoc allocation. [/media/liusheng/Projects/project/game_engines/LuisaRender/github/LuisaGroup/LuisaRender/LuisaRender/src/compute/src/backends/cuda/cuda_host_buffer_pool.cpp:35]
[2023-07-28 01:43:39.718] [console] [info] Computed mesh memory usage: temp = 5504, temp_update = 0, output = 124800.
[2023-07-28 01:43:39.719] [console] [info] CUDAMesh compaction sizes: before = 124800B, after = 107264B, ratio = 0.8594871794871795.
[2023-07-28 01:43:39.723] [console] [info] Computed mesh memory usage: temp = 2432, temp_update = 0, output = 40064.
[2023-07-28 01:43:39.725] [console] [info] CUDAMesh compaction sizes: before = 40064B, after = 35968B, ratio = 0.8977635782747604.
[2023-07-28 01:43:39.728] [console] [warning] Failed to allocate 16777216 bytes from CUDAHostBufferPool. Falling back to ad-hoc allocation. [/media/liusheng/Projects/project/game_engines/LuisaRender/github/LuisaGroup/LuisaRender/LuisaRender/src/compute/src/backends/cuda/cuda_host_buffer_pool.cpp:35]
[2023-07-28 01:43:39.730] [console] [info] Computed mesh memory usage: temp = 1920, temp_update = 0, output = 24192.
[2023-07-28 01:43:39.730] [console] [info] CUDAMesh compaction sizes: before = 24192B, after = 19840B, ratio = 0.8201058201058201.
[2023-07-28 01:43:39.731] [console] [warning] Failed to allocate 16777216 bytes from CUDAHostBufferPool. Falling back to ad-hoc allocation. [/media/liusheng/Projects/project/game_engines/LuisaRender/github/LuisaGroup/LuisaRender/LuisaRender/src/compute/src/backends/cuda/cuda_host_buffer_pool.cpp:35]
[2023-07-28 01:43:40.026] [console] [info] Read file /media/liusheng/Projects/project/game_engines/LuisaRender/github/LuisaGroup/LuisaRender/LuisaRender/build_ubuntu/bin/.cache/kernel_15d4a0dcafd153db.ptx.metadata failed.
[2023-07-28 01:43:40.026] [console] [info] Shader 'kernel_15d4a0dcafd153db.ptx' is not found in cache. The shader will be recompiled.
[2023-07-28 01:43:40.026] [console] [info] Compiling light evaluation kernel.
[2023-07-28 01:43:40.026] [console] [info] Generated CUDA source in 0.37587899999999996 ms.
[2023-07-28 01:43:40.027] [console] [info] Read file /media/liusheng/Projects/project/game_engines/LuisaRender/github/LuisaGroup/LuisaRender/LuisaRender/build_ubuntu/bin/.cache/kernel_f08e3c271bd79ed5.ptx failed.
[2023-07-28 01:43:40.027] [console] [info] Read file /media/liusheng/Projects/project/game_engines/LuisaRender/github/LuisaGroup/LuisaRender/LuisaRender/build_ubuntu/bin/.cache/kernel_f08e3c271bd79ed5.ptx.metadata failed.
[2023-07-28 01:43:40.027] [console] [info] Shader 'kernel_f08e3c271bd79ed5.ptx' is not found in cache. The shader will be recompiled.
[2023-07-28 01:43:40.027] [console] [info] Compiling light sampling kernel.
段错误 (核心已转储)
Thank you sir!
Hi, @disini
The segfault was caused by the CUDA AST code generation in LuisaCompute, which attempts to dereference a
nullptr
when emitting the type name forvoid
.I fixed the bug in LuisaCompute and updated the submodules in LuisaRender. Please use
git pull && git submodule update --recursive --init
to update the repo and its submodules to apply the fix.
Thanks again for discovering this bug!
Wow that's really awosome!!!
Much appreciated for your timely reply and fixed the bug so quickly !
Thanks again sir!
I tried to execute the same command for several times but it didn't recompile the .ptx file, it still report some errors like this and interrupted again and again.
Would you please check if src/compute
is on commit caaaa658...
by
cd src/compute
git status
Just in case you did not check out the fix I pushed right now.
Hi, @disini
The segfault was caused by the CUDA AST code generation in LuisaCompute, which attempts to dereference anullptr
when emitting the type name forvoid
.
I fixed the bug in LuisaCompute and updated the submodules in LuisaRender. Please usegit pull && git submodule update --recursive --init
to update the repo and its submodules to apply the fix.
Thanks again for discovering this bug!Wow that's really awosome!!! Much appreciated for your timely reply and fixed the bug so quickly ! Thanks again sir!
Nice! Thanks for your testing!
I tried to execute the same command for several times but it didn't recompile the .ptx file, it still report some errors like this and interrupted again and again.
Would you please check if
src/compute
is on commitcaaaa658...
bycd src/compute git status
Just in case you did not check out the fix I pushed right now.
ub/LuisaGroup/LuisaRender/LuisaRender/src/compute$ git status
HEAD detached at caaaa658
nothing to commit, working tree clean
yes it's up-to-date!