0
$\begingroup$

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

$\endgroup$
5
  • 1
    $\begingroup$ As in execute a CUDA or OpenCL program from Python? $\endgroup$ Commented Aug 13, 2018 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
    Commented Aug 13, 2018 at 15:49
  • $\begingroup$ Yes as an execute of cuda $\endgroup$
    – A bou
    Commented Aug 13, 2018 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
    Commented Aug 13, 2018 at 18:47
  • 2
    $\begingroup$ I hate when questions like this are bumped $\endgroup$
    – WhatAMesh
    Commented Sep 14, 2018 at 19:53

1 Answer 1

1
$\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$
1
  • $\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
    Commented Aug 14, 2018 at 13:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .