ContractionOptions#
-
class nvmath.
tensor. ContractionOptions( - compute_type: int | None = None,
- logger: Logger | None = None,
- blocking: Literal[True, 'auto'] = 'auto',
- handle: int | None = None,
- allocator: BaseCUDAMemoryManager | None = None,
- memory_limit: int | str | None = '80%',
A data class for providing options to the
BinaryContractionandTernaryContractionobjects, or the wrapper functionsbinary_contraction`and :func:`ternary_contraction().- compute_type#
The compute type to use for the contraction. See
ComputeDescfor available compute types.- Type:
int | None
- logger#
Python Logger object. The root logger will be used if a logger object is not provided.
- Type:
- blocking#
A flag specifying the behavior of the execution functions and methods, such as
binary_contraction()andTernaryContraction.execute(). WhenblockingisTrue, the execution methods do not return until the operation is complete. Whenblockingis"auto", the methods return immediately when the input tensor is on the GPU. The execution methods always block when the input tensor is on the CPU to ensure that the user doesn’t inadvertently use the result before it becomes available. The default is"auto".- Type:
Literal[True, ‘auto’]
- allocator#
An object that supports the
BaseCUDAMemoryManagerprotocol, used to draw device memory. If an allocator is not provided, a memory allocator from the library package will be used (torch.cuda.caching_allocator_alloc()for PyTorch operands,cupy.cuda.alloc()otherwise).- Type: