MemInfo

Function Description

Constructs a MemInfo instance, which is typically used as a parameter type in the remap_registered_memory API of CacheManager.

Prototype

1
__init__(mem_type: Memtype, addr: int, size: int)

Parameters

Parameter

Data Type

Description

mem_type

MemType

Memory address type.

addr

int

Memory address.

size

int

Size of the memory address, in bytes.

Example

1
2
from llm_datadist import MemInfo
mem_info = MemInfo(Memtype.MEM_TYPE_DEVICE, 1234, 10)

Returns

In normal cases, a MemInfo instance is returned.

If the input data type is incorrect, the TypeError or ValueError exception is reported.

Restrictions

None