cerebras.elf.cselfpybind module

pybind11 cself

Python bindings of the cself C API.

class cerebras.elf.cselfpybind.ELFObject

Bases: pybind11_builtins.pybind11_object

COMMON = 5
FILE = 4
FUNC = 2
GNU_IFUNC = 10
HIOS = 12
HIPROC = 15
LOOS = 10
LOPROC = 13
NOTYPE = 0
NUM = 7
OBJECT = 1
SECTION = 3
TLS = 6
get_fabric_dimensions(self: cerebras.elf.cselfpybind.ELFObject) Tuple[int, int]

Return the dimensions of the fabric.

get_flags(self: cerebras.elf.cselfpybind.ELFObject) int

Return the ELF flags (which contain target device information).

iterate_segments(self: cerebras.elf.cselfpybind.ELFObject, arg0: Callable[[Tuple[int, int], Tuple[int, int], int, int, int, int, bytes], None]) None

Iterate blocks and scatters in the ELF image. Blocks are iterated first, then any scatters which may overwrite areas of previous blocks.

iterate_symbols(self: cerebras.elf.cselfpybind.ELFObject, arg0: Callable[[str, int, int, int], None]) None

Iterate over all symbols, call the callback with (symbol name, symbol type, symbol byte address, symbol size in bytes, user data). The type is the value returned by ELF64_ST_TYPE macro.

read_data(self: cerebras.elf.cselfpybind.ELFObject, arg0: Tuple[int, int], arg1: int, arg2: int) List[int]
class cerebras.elf.cselfpybind.ELFSegments

Bases: pybind11_builtins.pybind11_object

dump(self: cerebras.elf.cselfpybind.ELFSegments) str
get(self: cerebras.elf.cselfpybind.ELFSegments, arg0: int, arg1: Tuple[int, int], arg2: Tuple[int, int]) List[object]
put(self: cerebras.elf.cselfpybind.ELFSegments, arg0: int, arg1: int, arg2: Tuple[int, int], arg3: Tuple[int, int], arg4: object) None