warp.capture_load#

warp.capture_load(path, device=None)[source]#

Load a serialized graph from a .wrp file.

For graphs containing recorded kernels, the companion <stem>_modules/ directory created by capture_save() must remain next to the file. device must have the same device family (CPU or CUDA) as the saved graph.

Parameters:
  • path (str) – Path to the .wrp file (extension added automatically if missing).

  • device (Device | str | None) – The device to load the graph onto (CPU or CUDA).

Returns:

A Graph object that can be launched with capture_launch().

Return type:

Graph