warp.Module#
- class warp.Module(name, loader=None)[source]#
- Parameters:
name (str | None)
Methods
__init__(name[, loader])get_kernel_hooks(kernel, device)get_module_hash([block_dim])Get the hash of the module for the current block_dim.
Get an abbreviated module name to use for directories and files in the cache.
Get the hash of the module for the current block_dim.
load(device[, block_dim, binary_path, ...])register_function(func, scope_locals[, ...])register_kernel(kernel)register_struct(struct)unload()- hash_module()[source]#
Get the hash of the module for the current block_dim.
This function always creates a new ModuleHasher instance and computes the hash.
- Return type:
- get_module_hash(block_dim=None)[source]#
Get the hash of the module for the current block_dim.
If a hash has not been computed for the current block_dim, it will be computed and cached.
- get_module_identifier()[source]#
Get an abbreviated module name to use for directories and files in the cache.
Depending on the setting of the
"strip_hash"option for this module, the module identifier might include a content-dependent hash as a suffix.- Return type: