Compositor: Allow CPU denoising in GPU compositor to use all CPU threads
By default OIDN has a `setAffinity` option set to `True`. This allows OIDN to set it's own CPU affinity, and on most systems this resulted in it only running on one thread per CPU core. This setting was overwritten in Cycles and the CPU compositor to allow Blender to control CPU affinity, allowing OIDN to use all threads on a system. However this wasn't done for the CPU denoiser in the GPU compositor. This commit fixes that by setting `setAffinity` to `False` in the CPU denoiser in the GPU compositor. Performance: I found no measurable improvement to performance on a AMD Ryzen 9 5950X Pull Request: https://projects.blender.org/blender/blender/pulls/130360
This commit is contained in:
@@ -106,6 +106,7 @@ class DenoiseOperation : public NodeOperation {
|
||||
|
||||
#ifdef WITH_OPENIMAGEDENOISE
|
||||
oidn::DeviceRef device = oidn::newDevice(oidn::DeviceType::CPU);
|
||||
device.set("setAffinity", false);
|
||||
device.commit();
|
||||
|
||||
const int width = input_image.domain().size.x;
|
||||
|
||||
Reference in New Issue
Block a user