nums.core.grid.grid module

class nums.core.grid.grid.ArrayGrid(shape, block_shape, dtype)[source]

Bases: object

copy()[source]
classmethod from_meta(d)[source]
get_block_shape(grid_entry)[source]
get_entry_coordinates(grid_entry)[source]
Return type

Tuple[int]

get_entry_iterator()[source]
Return type

Iterator[Tuple]

get_slice(grid_entry)[source]
get_slice_tuples(grid_entry)[source]
Return type

List[Tuple[slice]]

nbytes()[source]
to_meta()[source]
Return type

dict

class nums.core.grid.grid.CyclicDeviceGrid(grid_shape, device_type, device_ids)[source]

Bases: nums.core.grid.grid.DeviceGrid

get_cluster_entry(agrid_entry, agrid_shape)[source]
get_device_id(agrid_entry, agrid_shape)[source]
class nums.core.grid.grid.DeviceGrid(grid_shape, device_type, device_ids)[source]

Bases: object

get_cluster_entry_iterator()[source]
get_device_id(agrid_entry, agrid_shape)[source]
get_entry_iterator()[source]
Return type

Iterator[Tuple]

class nums.core.grid.grid.DeviceID(node_id, node_addr, device_type, device_id)[source]

Bases: object

classmethod from_str(s)[source]
class nums.core.grid.grid.PackedDeviceGrid(grid_shape, device_type, device_ids)[source]

Bases: nums.core.grid.grid.DeviceGrid

compute_cluster_entry_axis(axis, ge_axis_val, gs_axis_val, cs_axis_val)[source]
get_cluster_entry(agrid_entry, agrid_shape)[source]
get_device_id(agrid_entry, agrid_shape)[source]