Using GPU outside of rendering in background mode Is there any way to use your GPU outside of rendering? I'm using blender to generate and change objects with python in background mode. The resulting scene is never actually rendered, just exported to a new .obj file.

def create_plane(radius, location, rotation, name):
    bpy.ops.mesh.primitive_plane_add(radius = radius, location = location, rotation = rotation)
    new_mesh = bpy.context.active_object
    new_mesh.name = name
    bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY')

for i in range(0, 1000):
    create_plane(1, (i, i, i), (i, i, i), "test_plane")


Executing this script either in background or in the blender GUI will result in no GPU usage whatsoever. 




Is there a way to utilize both my GPU and CPU for this use-case or have I been wasting my time the last couple of days trying to figure it out?

I'm pretty sure that CPU is actually better for the loop above, but I need to enhance performance so I'm just trying to investigate every possible solution. I'm obviously also doing way more than just generating a bunch of planes. I also know I can make use of copying one plane to improve performance in the code above. This code is purely there as an example.
The Python you are writing is - even within Blender's interpreter - just Python: an interpreted language running on the CPU. There are ways to leverage the GPU in Python (eg. PyCUDA), but I would be very surprised that using the GPU would help here. As long as you are not part of Blender's own codebase (which entails recompiling the beast and diving into C++ or something that can be linked to it), you have to go through the Python API and whatever advantage there is to generating the planes on the GPU will be eclipsed by handing them over to Blender one by one though the interpreter.