Page MenuHome

Cycles: Add support for parallel compilation of OptiX module
ClosedPublic

Authored by Patrick Mours (pmoursnv) on May 4 2022, 4:49 PM.

Details

Summary

OptiX 7.4 adds support for splitting the costly creation of an OptiX
module into smaller tasks that can be executed in parallel on a
thread pool.
This is only really relevant for the "shader_raytrace" kernel variant
as the main one is small and compiles fast either way. It sheds of
a few seconds there (total gain is not massive currently, since it is
difficult for the compiler to split up the huge shading entry point
that is the primary one taking up time, but it is still measurable).

Diff Detail

Repository
rB Blender
Branch
optix_parallel_compilation (branched from master)
Build Status
Buildable 21966
Build 21966: arc lint + arc unit

Event Timeline

Patrick Mours (pmoursnv) requested review of this revision.May 4 2022, 4:49 PM
Patrick Mours (pmoursnv) created this revision.
Brecht Van Lommel (brecht) requested changes to this revision.May 4 2022, 7:06 PM
Brecht Van Lommel (brecht) added inline comments.
intern/cycles/device/optix/device_impl.cpp
491

Does optixTaskExecute return a better error that we can use instead of unknown?

This revision now requires changes to proceed.May 4 2022, 7:06 PM

Changed error reporting to use last error from optixTaskExecute.

Patrick Mours (pmoursnv) marked an inline comment as done.May 5 2022, 11:11 AM
Patrick Mours (pmoursnv) added inline comments.
intern/cycles/device/optix/device_impl.cpp
491

It does. I changed it now to use that instead (last task that failed will change result to its error code, if no task failed it will stay unmodified (and thus still OPTIX_SUCCESS).

This revision is now accepted and ready to land.May 5 2022, 2:04 PM