
How to disable CPU in Karma XPU mode?

When we are using Karma XPU in Houdini, it will fully occupy the CPU resources. Though Karma has been well optimized that it will not cause lag in ordinate conditions, while in some extreme environment, we would some how manage to disable it on CPU and let it run on GPU exclusively. So our CPU could be released to handle other tasks.
So firstly you need a Nvidia graphic card (as powerful as possible), and a higher version of Houdini would be better, for example H20.5 (it is optional, just because Karma has been greatly advanced in H20.5).
Houdini environment variable provides two commands to control the behavior of Karma.
disable CPU in Karma:
1 | KARMA_XPU_DISABLE_EMBREE_DEVICE=1 |
disable GPU in Karma:
1 | KARMA_XPU_DISABLE_OPTIX_DEVICE=1 |
Execute the code in Python shell in Houdini, or make it a button on shelf. Then you got a Karma which works as you wish.
1 | #disable CPU, GPU only |
1 | #disable GPU, CPU only |
1 | #Both CPU and GPU(XPU) |
Finally, don’t forget to restart render.





