warp.force_load#
- warp.force_load(
- device=None,
- modules=None,
- block_dim=None,
- max_workers=None,
Force user-defined kernels to be compiled and loaded (low-level API).
This is a lower-level function that accepts an explicit list of Warp
Moduleobjects. For most use cases, preferload_module(), which provides a more convenient interface for loading modules by name or Python module reference.Use this function when you:
Need to load multiple specific modules at once
Already have
Moduleobjects to work withWant to load all modules containing Warp code (by passing
modules=None)
- Parameters:
device (Device | str | list[Device] | list[str] | None) – The device or list of devices to load the modules on. If
None, load on all devices.modules (list[Module] | None) – List of Warp
Moduleobjects to load. IfNone, load all imported modules that contain Warp code.block_dim (int | None) – The number of threads per block (always 1 for
"cpu"devices).max_workers (int | None) – The maximum number of parallel threads to use for loading modules.
0means serial loading. IfNone,`warp.config.load_module_max_workersdetermines the default.