Hello!
I recently encountered an issue with MDL integration in my Optix Raytracer. I am unsure if this issue is expected behavior, but I wanted to report it regardless. Maybe including some information or warning about it in the mdl examples/documentation could be useful.
The issue occurs when creating the pipeline while setting the “opt_level” option to 0 on the mdl backend, causing multiple defined symbols when loading more than one material. I also reproduced this error using the MDL example in the Optix Advanced Samples, just by adding the opt_level to 0.
Here is the Optix Pipeline context log, showing the multiply defined symbols:
Error: Symbol '__nv_asinf' was defined multiple times. First seen in: '__direct_callable__init38_and_3_more_ID39'
Error: Symbol '__nv_atan2f' was defined multiple times. First seen in: '__direct_callable__init38_and_3_more_ID39'
Error: Symbol '__nv_fast_expf' was defined multiple times. First seen in: '__direct_callable__init8_and_4_more_ID9'
Error: Symbol '__nv_fast_logf' was defined multiple times. First seen in: '__direct_callable__init38_and_3_more_ID39'
Error: Symbol '__nv_fast_sincosf' was defined multiple times. First seen in: '__direct_callable__init38_and_3_more_ID39'
Error: Symbol '__nv_fast_tanf' was defined multiple times. First seen in: '__direct_callable__init38_and_3_more_ID39'
Error: Symbol '__nv_min' was defined multiple times. First seen in: '__direct_callable__init38_and_3_more_ID39'
Error: Symbol '__nv_rsqrtf' was defined multiple times. First seen in: '__direct_callable__init38_and_3_more_ID39'
Error: Symbol '__nv_sinhf' was defined multiple times. First seen in: '__direct_callable__init38_and_3_more_ID39'
Error: Symbol '_optix_constant_memory_0x013f9c614d7fe8994035dd1c3fc34764' was defined multiple times. First seen in: '__direct_callable__init38_and_3_more_ID39'
Error: Symbol '_optix_constant_memory_0x06e7eac20c5e48582e2452d605a8c016' was defined multiple times. First seen in: '__direct_callable__init38_and_3_more_ID39'
Error: Symbol '_optix_constant_memory_0xf0cde35cf0f1125d05ca54a2d36a49b9' was defined multiple times. First seen in: '__direct_callable__init38_and_3_more_ID39'