GPU Acceleration for Post-Processing Daylight Simulation Results Is Now Available

Dear Ladybug Tools community,

We’re happy to share that honeybee-radiance-postprocess can now use your GPU for post-processing through CuPy :tada:

If you have a compatible NVIDIA GPU, post-processing can run faster, especially for large sensor grids.

This feature is optional and automatic:

  • If GPU support is available, it will be used
  • If not, everything continues to work as before using the CPU

No changes to your scripts are required.

Install honeybee-radiance-postprocess

To get the newest version of honeybee-radiance-postprocess you have to update your core libraries. You can do that either with LB Versioner, or with the latest version of the Pollination single-click installer for Grasshopper or Rhino.


:package: Do I need to install anything?

CuPy is already shipped with honeybee-radiance-postprocess. You do not need to install CuPy manually.

However, GPU acceleration does require one additional system dependency:

:toolbox: CUDA Toolkit (Required)

To use your GPU, you must have the NVIDIA CUDA Toolkit installed on your system.

  • The CUDA Toolkit is provided by NVIDIA
  • It enables software like CuPy to run computations on the GPU
  • If it is missing or incompatible, honeybee-radiance-postprocess will automatically fall back to CPU processing

Because honeybee-radiance-postprocess ships with cupy-cuda12x, you need CUDA Toolkit version 12.x.x installed on your machine (the latest version is CUDA 12.9.1). Before installing CUDA Toolkit please check the latest compatible version for your GPU driver. See more about this here.

Why CUDA 12 (and not the newest CUDA 13)?

The initial release targets CUDA 12 to support the largest number of users.

CUDA 13 drops support for some older GPUs. By targeting CUDA 12, more users can try GPU acceleration without upgrading hardware or GPU drivers.

This choice may change in future releases as newer GPUs become more common.


:zap: When will GPU be helpful?

GPU acceleration is most beneficial for simulations with a large number of sensors.

For smaller studies, the overhead of using the GPU can outweigh the benefits, so performance may be similar to or slightly slower than CPU-based processing. This is expected behavior.

Rule of thumb:

  • :white_check_mark: Large sensor grids or many sensor grids → likely faster
  • :warning: Small sensor grids or few sensor grids → little or no benefit

:question: FAQ

How do I know if my GPU is compatible?

CuPy supports GPUs with compute capability ≥ 3.0. Read more about compute capability here.

If you are still unsure, please ask.

Can I use CuPy with an AMD GPU?

If you have an AMD GPU please read this.

How can I tell if honeybee-radiance-process is using CuPy and not NumPy?

honeybee-radiance-postprocess will print a line that tells you if CuPy is being used. You should see something like this:

Using CuPy (13.6.0) for GPU (NVIDIA GeForce RTX 3080) acceleration in honeybee-radiance-postprocess.

In Grasshopper the post-processing components will also report this statement in the report output.

If CuPy is installed but fails during initialization honeybee-radiance-postprocess will fall back to NumPy. If this happens you should see a statement similar to this:

Failed to load CuPy successfully. Falling back to NumPy (1.26.4) in honeybee-radiance-postprocess

11 Likes

Hi @mikkel ,
Thanks a lot for this new significant contribution.

I have a question, though: I have a laptop that have already installed CUDA … 13.0. What will be your recommendation to do here? Install [override] it with the 12.9?

Thanks!!
-A.

Hi @AbrahamYezioro,

You can have several versions of CUDA Toolkit installed. When CuPy runs it will look for the CUDA_PATH environment variable, and if this points to CUDA Toolkit 13.x, e.g., C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1, then honeybee-radiance-postprocess will fail to load CuPy successfully. You can install version 12.9 and change the environment variable on your system.

You can also install cupy-cuda13x in the LBT environment manually if you prefer. While the requirement in honeybee-radiance-postprocess is set to cupy-cuda12x it will run with cupy-cuda13x as well. Here is a step-by-step guide:

  1. Open your command prompt and run the following to uninstall the existing cupy-cuda12x package:
    "C:\Program Files\ladybug_tools\python\python.exe" -m pip uninstall cupy-cuda12x
    While it is not required to uninstall cupy-cuda12x, you will get some extra warning messages if you don’t.
  2. Then install cupy-cuda13x:
    "C:\Program Files\ladybug_tools\python\python.exe" -m pip install cupy-cuda13x==13.6.0

The disadvantage of the second method is that you have to repeat this process every time you update the LBT core libraries.

Hi I’m new here but I’ve been having some problems running the PMVMap (for example in the comfort_mapping or outdoor_comfort_under_a_tree sample, just to discard other possible errors in my GH file) with errors in the “ComputeSphericalViewFactors”. It seems to be related with CuPy and CUDA when looking at the log while it’s executing.

It shows errors such as: “UserWarning: CUDA path could not be detected. Set CUDA_PATH environment variable if CuPy fails to load.”
Should it be related? Can I simply uninstall CuPy/CUDA and keep working as usual with NumPy?
Thank you very much in advance. :slightly_smiling_face:

EDIT: Inside the folder "C:\Program Files\ladybug_tools\python\lib\site-packages", there were 4 CUDA and CuPy related folders. I deleted them and everything worked just fine. :+1:

Hi @Carlos_BC,

Those messages are just warning messages, and the tasks in the recipes are designed to use NumPy if CuPy fails. Unless the recipe actually stopped and the component turned red, then there are no issues.

Hi Mikkel,
Thanks for your response. That was actually the thing, it stopped and only got solved by eliminating CuPy. That allowed to use NumPy from the beggining and proceed as usual.
I just wanted to say it in case it happened to someone else.
Thanks again!

@mikkel I really appreciate your efforts on this