Greetings beautiful Blender community,

Is there a way to force certain sets of computations to occur on certain devices?

For example code to parallelize, consider:

for h in horizontal_pixels:
  for v in vertical_pixels:

In Tensorflow, e.g., it's possible to do this like so:

with tf.device('/cpu:0'):
  # some computations over here

with tf.device('/cpu:1'):
  # more computations over there

with tf.device('/gpu:0'):
  # computation computation everywhere

I've read that multiprocessing has not historically worked with Blender, that people have worked around this by launching separate programs.

Supposing my target function to parallelize is just the raycast function (and my inputs are not already computed under the hood by Cycles), maybe there is a way to use existing parallelization code for rendering, e.g. which may exist somewhere in C++?

  • $\begingroup$ I'm assuming you could import the tensorflow module to blender python and use it the way you usually would $\endgroup$ – avatar Jun 28 at 11:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.