0
$\begingroup$

Is there any possible way to accelerate the python's script execution inside of blender using GPU ?

$\endgroup$
  • 1
    $\begingroup$ As in execute a CUDA or OpenCL program from Python? $\endgroup$ – Fire Lancer Aug 13 '18 at 15:27
  • 1
    $\begingroup$ Well you can install any module if im not mistaken so you could install Tensorflow-gpu therefore you could accelerate the script $\endgroup$ – WhatAMesh Aug 13 '18 at 15:49
  • $\begingroup$ Yes as an execute of cuda $\endgroup$ – A bou Aug 13 '18 at 18:41
  • $\begingroup$ Yes , you can install modules like pycuda , but is it possible to use the utilities of pycuda for example to accelerate the script $\endgroup$ – A bou Aug 13 '18 at 18:47
  • 2
    $\begingroup$ I hate when questions like this are bumped $\endgroup$ – WhatAMesh Sep 14 '18 at 19:53
0
$\begingroup$

You should be able to using existing python libraries, such as pycuda, which can be installed into blender's built in python (for installing libs you could setup pip or whatever: How to install Pip for Blender's bundled Python?). You can also link an C/C++ program from your script and do it there.

You will always, however, be limited by the speed in which you can use python to transfer data too and from blender's internal format, so this may or may not provide much speedup depending on your use case.

Gpus can provide a speedup to some kinds of operations. In general, code for that operation needs to be specifically written for use on a gpu to take advantage of it. If you wanted to accelerate existing blender functionality you would have to rewrite it to run on the gpu, you can't just magically tell cpu code to run on the gpu instead.

In general, only tasks with many repetitive, independent, but similar math operations work well on GPUs. Because of these restrictions, GPU code and algorithms are generally more difficult to create than just for the CPU.

$\endgroup$
  • $\begingroup$ Yeah , I am already familiar with that .But can i use pycuda to speed up for example the split function in blender ? $\endgroup$ – A bou Aug 14 '18 at 13:37

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.