fhelium.backend.memory
Placement resources and registered Tensor transfer execution.
DEVICE_RESOURCE_KIND
constant View source
python
DEVICE_RESOURCE_KIND = 'execution-device'1
TorchMemoryTransferImplementation
class View source
python
TorchMemoryTransferImplementation(name: str = 'torch-memory-transfer', operation_types: tuple[type[memory.TransferOp], ...] = (memory.TransferOp,), supports_in_place: bool = False)1
Move one Tensor payload to a caller-bound device and memory space.
Attributes
| Name | Type | Default/value |
|---|---|---|
name | str | 'torch-memory-transfer' |
operation_types | tuple[type[memory.TransferOp], ...] | (memory.TransferOp,) |
supports_in_place | bool | False |
resource_requirements
method
python
def resource_requirements(invocation: OperationInvocation) -> tuple[ResourceRequirement, ...]: ...1
execute
method
python
def execute(invocation: OperationInvocation, inputs: tuple[torch.Tensor, ...], resources: tuple[BoundResource, ...], /, *, in_place: bool) -> tuple[torch.Tensor, ...]: ...1