PopXL User Guide and API (experimental)
Version: 3.0.0
1. Introduction
2. Concepts
2.1. IRs
2.2. Graphs
2.3. Tensors
2.4. Operations
3. Simple example
4. Data types
5. Tensors
5.1. Constant tensors
5.2. Variable tensors
5.3. Intermediate tensors
6. Supported operations
6.1. Data input and output
6.2. List of available operations
7. Custom operations
7.1. Environment
7.2. Parameter struct
7.3. Operation class
7.4. Opx class
7.5. Gradient operation class
7.6. Gradient opx class
7.7. Python bindings
7.8. Python wrapper
7.9. Auto-compiling custom operations with cppimport
7.10. Using your custom operation
8. Graphs
8.1. Main graph
8.2. Graphs
8.3. Creating a graph
8.4. Calling a graph
8.5. Calling a graph in a loop
8.6. Graph replication
8.7. Code loading from Streaming Memory
8.7.1. Minimal example
8.7.2. Controlling liveness between multiple calls
8.7.3. Optimisation: merging the code load operations
8.7.4. Advanced example: nested code loading
8.7.5. Advanced concept: code loading in dynamic branches
9. Transforms
9.1. Autodiff
10. Context manager
11. Session
11.1. Running a session
11.2. Getting and setting tensor data
11.2.1. When transfers will occur between host and device
11.3. Nested Session Contexts
11.4. Number of host transfers
11.5. Data input shape
11.6. Device Types
12. Variables in Streaming Memory
12.1. Remote buffers
12.2. Remote variable tensors
12.3. Variable tensors for replicated tensor sharding
13. Replication
13.1. Graph replication
13.2. Replica grouping
13.3. Code examples
13.4. Retrieval Modes
14. Application example: MNIST
14.1. Import the necessary libraries
14.2. Prepare dataset
14.3. Create IR for training
14.3.1. Create network
14.3.2. Calculate gradients and update weights
14.4. Run the IR to train the model
14.5. Create an IR for testing and run the IR to test the model
15. Application example: MNIST with replication and RTS
15.1. Add support for replications
15.2. Change variable tensors to RTS variable tensors
16. Environment variables
16.1. Logging
16.1.1. POPART_LOG_LEVEL
16.1.2. POPART_LOG_DEST
16.1.3. POPART_LOG_CONFIG
16.2. Generating DOT files
16.3. Caching of compiled executables
17. Python API Reference
17.1. Ir
17.2. Contexts
17.3. Data types
17.4. Graphs
17.5. Modules
17.6. Random seeds
17.7. Remote buffers
17.8. Replica grouping
17.9. Session
17.10. Streams
17.11. Tensors
17.12. Tensor locations
17.13. Transforms
17.14. Ops available in PopXL
18. Index
19. Legal notices
PopXL User Guide and API (experimental)
Index
_
|
A
|
B
|
C
|
D
|
E
|
F
|
G
|
H
|
I
|
L
|
M
|
N
|
O
|
P
|
R
|
S
|
T
|
U
|
V
|
W
_
__enter__() (popxl.Session method)
__exit__() (popxl.Session method)
__init__() (popxl.dtype method)
(popxl.ExecutionContext method)
(popxl.Graph method)
(popxl.Ir method)
(popxl.ops.CallSiteInfo method)
(popxl.ops.collectives.CommGroup method)
(popxl.ops.collectives.CommGroupType method)
(popxl.RemoteBuffer method)
(popxl.ReplicaGrouping method)
(popxl.Session method)
(popxl.Tensor method)
(popxl.TensorLocation method)
(popxl.TileSet method)
(popxl.transforms.ExpectedConnection method)
(popxl.transforms.GradGraphInfo method)
A
abs() (in module popxl.ops)
AccumulateOuterFragment (popxl.ExecutionContext attribute)
add() (in module popxl.ops)
add_() (in module popxl.ops)
All (popxl.ops.collectives.CommGroupType attribute)
all_reduce() (in module popxl.ops.collectives)
all_reduce_identical_grad_inputs() (in module popxl.ops.collectives)
all_reduce_identical_inputs() (in module popxl.ops.collectives)
argmax() (in module popxl.ops)
argmin() (in module popxl.ops)
as_dtype() (popxl.dtype class method)
as_numpy() (popxl.dtype method)
as_torch() (popxl.dtype method)
assignment (popxl.ReplicaGrouping property)
autodiff() (in module popxl.transforms)
average_pool() (in module popxl.ops)
B
build() (popxl.Module method)
C
call() (in module popxl.ops)
call_with_info() (in module popxl.ops)
called_graph (popxl.ops.CallSiteInfo property)
called_graphs (popxl.Graph property)
CallSiteInfo (class in popxl.ops)
cast() (in module popxl.ops)
CommGroup (class in popxl.ops.collectives)
CommGroupType (class in popxl.ops.collectives)
Compute (popxl.TileSet attribute)
concat() (in module popxl.ops)
concat_() (in module popxl.ops)
conditional() (in module popxl.ops)
conditional_with_info() (in module popxl.ops)
connection_type (popxl.transforms.ExpectedConnection property)
Consecutive (popxl.ops.collectives.CommGroupType attribute)
constant() (in module popxl)
constants (popxl.Graph property)
conv() (in module popxl.ops)
copy_to_ipu() (popxl.Tensor method)
cos() (in module popxl.ops)
create_empty_graph() (popxl.Ir method)
create_graph() (popxl.Ir method)
create_host_outputs() (popxl.Session method)
create_seeds() (in module popxl)
cumsum() (in module popxl.ops)
D
decompose_sum() (in module popxl.transforms)
detach() (in module popxl.ops)
(popxl.Tensor method)
detach_() (in module popxl.ops)
(popxl.Tensor method)
DeviceToHostStream (class in popxl)
div() (in module popxl.ops)
dot_checkpoint() (popxl.Ir method)
dropout() (in module popxl.ops)
dtype (class in popxl)
(popxl.Tensor property)
dynamic_slice() (in module popxl.ops)
dynamic_update() (in module popxl.ops)
dynamic_update_() (in module popxl.ops)
E
entries (popxl.RemoteBuffer property)
equal() (in module popxl.ops)
ExecutionContext (class in popxl)
exp() (in module popxl.ops)
exp_() (in module popxl.ops)
expected_inputs (popxl.transforms.GradGraphInfo property)
expected_inputs() (popxl.Session method)
expected_outputs (popxl.transforms.GradGraphInfo property)
ExpectedConnection (class in popxl.transforms)
ExpectedConnectionType (class in popxl.transforms)
F
flatten() (in module popxl.ops)
(popxl.Tensor method)
flatten_() (in module popxl.ops)
(popxl.Tensor method)
fmod() (in module popxl.ops)
forward_graph (popxl.transforms.GradGraphInfo property)
from_name() (popxl.dtype class method)
Fwd (popxl.transforms.ExpectedConnectionType attribute)
fwd_graph_ins_to_grad_parent_outs() (popxl.transforms.GradGraphInfo method)
fwd_parent_ins_to_grad_parent_outs() (popxl.transforms.GradGraphInfo method)
fwd_tensor (popxl.transforms.ExpectedConnection property)
FwdGrad (popxl.transforms.ExpectedConnectionType attribute)
G
gather() (in module popxl.ops)
gcg() (in module popxl)
gelu() (in module popxl.ops)
gelu_() (in module popxl.ops)
get_all_d2h_streams() (popxl.Ir method)
get_all_h2d_streams() (popxl.Ir method)
get_current_graph() (in module popxl)
get_main_graph() (in module popxl)
get_tensor() (popxl.Graph method)
get_tensor_data() (popxl.Session method)
get_tensors_data() (popxl.Session method)
gmg() (in module popxl)
GradGraphInfo (class in popxl.transforms)
Graph (class in popxl)
graph (popxl.transforms.GradGraphInfo property)
graph_input() (in module popxl)
graph_output() (in module popxl)
graph_to_parent() (popxl.ops.CallSiteInfo method)
graph_to_parent_input_index() (popxl.ops.CallSiteInfo method)
graph_to_parent_output_index() (popxl.ops.CallSiteInfo method)
greater() (in module popxl.ops)
group_norm() (in module popxl.ops)
group_size (popxl.ReplicaGrouping property)
H
histogram() (in module popxl.ops)
host_load() (in module popxl.ops)
host_store() (in module popxl.ops)
HostToDeviceStream (class in popxl)
I
id (popxl.Graph property)
(popxl.Ir property)
(popxl.Tensor property)
in_sequence() (in module popxl)
in_sync_with_ipu (popxl.Tensor property)
increment_mod() (in module popxl.ops)
increment_mod_() (in module popxl.ops)
init() (in module popxl.ops)
inputs (popxl.Graph property)
(popxl.ops.CallSiteInfo property)
(popxl.transforms.GradGraphInfo property)
inputs_by_name (popxl.Graph property)
inputs_dict() (popxl.transforms.GradGraphInfo method)
instance_replication_factor (popxl.Ir property)
interpolate() (in module popxl.ops)
IO (popxl.TileSet attribute)
io_tile_copy() (in module popxl.ops)
io_tile_exchange() (in module popxl.transforms)
io_tiles() (in module popxl)
ipu (popxl.Tensor property)
ipu() (in module popxl)
ipu_copy() (in module popxl.ops)
Ir (class in popxl)
ir (popxl.Graph property)
(popxl.Session property)
(popxl.Tensor property)
is_attached (popxl.Session property)
is_complex (popxl.dtype property)
is_floating_point (popxl.dtype property)
is_int (popxl.dtype property)
is_signed (popxl.dtype property)
L
l1() (in module popxl.ops)
l2() (in module popxl.ops)
lamb_square() (in module popxl.ops)
layer_norm() (in module popxl.ops)
location_info (popxl.Tensor property)
log() (in module popxl.ops)
logical_and() (in module popxl.ops)
logical_not() (in module popxl.ops)
logical_or() (in module popxl.ops)
logsum() (in module popxl.ops)
logsumexp() (in module popxl.ops)
M
main_graph (popxl.Graph property)
(popxl.Ir property)
matmul() (in module popxl.ops)
max() (in module popxl.ops)
max_pool() (in module popxl.ops)
maximum() (in module popxl.ops)
mean() (in module popxl.ops)
median() (in module popxl.ops)
merge_exchange() (in module popxl.transforms)
meta_shape (popxl.RemoteBuffer property)
(popxl.Tensor property)
min() (in module popxl.ops)
module
popxl.ops
popxl.ops.collectives
popxl.transforms
Module (class in popxl)
mul() (in module popxl.ops)
N
N (popxl.TileSet attribute)
name (popxl.dtype property)
(popxl.ExecutionContext property)
(popxl.Graph property)
(popxl.ops.collectives.CommGroupType property)
(popxl.Tensor property)
(popxl.TileSet property)
name_scope() (in module popxl)
negate() (in module popxl.ops)
nelms (popxl.Tensor property)
nll_loss() (in module popxl.ops)
nll_loss_with_softmax_grad() (in module popxl.ops)
Normal (popxl.ExecutionContext attribute)
num_groups (popxl.ReplicaGrouping property)
num_host_transfers (popxl.Ir property)
O
Off (popxl.ReplicatedTensorSharding attribute)
OffChip (popxl.TensorStorage attribute)
On (popxl.ReplicatedTensorSharding attribute)
OnChip (popxl.TensorStorage attribute)
onehot() (in module popxl.ops)
OptimizerFromHostFragment (popxl.ExecutionContext attribute)
Orthogonal (popxl.ops.collectives.CommGroupType attribute)
outputs (popxl.Graph property)
(popxl.ops.CallSiteInfo property)
(popxl.transforms.GradGraphInfo property)
P
parent_input() (popxl.ops.CallSiteInfo method)
parent_output() (popxl.ops.CallSiteInfo method)
parent_to_graph() (popxl.ops.CallSiteInfo method)
parent_to_graph_input_index() (popxl.ops.CallSiteInfo method)
parent_to_graph_output_index() (popxl.ops.CallSiteInfo method)
popxl.ops
module
popxl.ops.collectives
module
popxl.transforms
module
print_tensor() (in module popxl.ops)
prod() (in module popxl.ops)
R
random_normal() (in module popxl.ops)
random_uniform() (in module popxl.ops)
rank (popxl.Tensor property)
register_op_created_hook() (popxl.Graph method)
relu() (in module popxl.ops)
relu_() (in module popxl.ops)
remote_buffer() (in module popxl)
remote_buffer_id (popxl.RemoteBuffer property)
remote_load() (in module popxl.ops)
remote_load_() (in module popxl.ops)
remote_replica_sharded_variable() (in module popxl)
remote_store() (in module popxl.ops)
remote_variable() (in module popxl)
RemoteBuffer (class in popxl)
remove_op_created_hook() (popxl.Graph method)
repeat() (in module popxl.ops)
repeat_with_info() (in module popxl.ops)
replica_grouping() (popxl.Ir method)
replica_sharded_slice() (in module popxl.ops.collectives)
replica_sharded_variable() (in module popxl)
ReplicaGrouping (class in popxl)
replicaGroupSize (popxl.ops.collectives.CommGroup property)
replicated_all_gather() (in module popxl.ops.collectives)
replicated_all_reduce() (in module popxl.ops.collectives)
replicated_all_reduce_() (in module popxl.ops.collectives)
replicated_reduce_scatter() (in module popxl.ops.collectives)
replicated_tensor_sharding (popxl.TensorLocation property)
ReplicatedTensorSharding (class in popxl)
replication_factor (popxl.Ir property)
reshape() (in module popxl.ops)
(popxl.Tensor method)
reshape_() (in module popxl.ops)
(popxl.Tensor method)
roi_align() (in module popxl.ops)
run() (popxl.Session method)
run_with_outputs() (popxl.Session method)
S
scaled_add() (in module popxl.ops)
scaled_add_() (in module popxl.ops)
scatter() (in module popxl.ops)
scope (popxl.Tensor property)
Session (class in popxl)
set_parent_input_modified() (popxl.ops.CallSiteInfo method)
set_remote_buffer_info() (popxl.RemoteBuffer method)
shape (popxl.Tensor property)
shaped_dropout() (in module popxl.ops)
sin() (in module popxl.ops)
slice() (in module popxl.ops)
slice_() (in module popxl.ops)
softmax() (in module popxl.ops)
spec (popxl.Tensor property)
split() (in module popxl.ops)
split_random_seed() (in module popxl.ops)
sqrt() (in module popxl.ops)
squeeze() (in module popxl.ops)
storage (popxl.TensorLocation property)
stride (popxl.ReplicaGrouping property)
strides() (popxl.Tensor method)
sub() (in module popxl.ops)
Subgraph (popxl.ExecutionContext attribute)
sum() (in module popxl.ops)
sumsquare() (in module popxl.ops)
swish() (in module popxl.ops)
swish_() (in module popxl.ops)
T
T (popxl.Tensor property)
T_ (popxl.Tensor property)
tanh() (in module popxl.ops)
Tensor (class in popxl)
tensor_dtype (popxl.RemoteBuffer property)
tensor_shape (popxl.RemoteBuffer property)
TensorLocation (class in popxl)
tensors (popxl.Graph property)
TensorStorage (class in popxl)
tied_gather() (in module popxl.ops)
tile_set (popxl.Tensor property)
TileSet (class in popxl)
topk() (in module popxl.ops)
toReplicaGrouping() (popxl.ops.collectives.CommGroup method)
transpose() (in module popxl.ops)
(popxl.ReplicaGrouping method)
(popxl.Tensor method)
transpose_() (in module popxl.ops)
(popxl.Tensor method)
type (popxl.ops.collectives.CommGroup property)
U
Undefined (popxl.TileSet attribute)
Ungrouped (popxl.ops.collectives.CommGroupType attribute)
V
validate_tensor_matches_buffer() (popxl.RemoteBuffer method)
value (popxl.ExecutionContext property)
(popxl.ops.collectives.CommGroupType property)
(popxl.TileSet property)
variable() (in module popxl)
variables (popxl.Graph property)
W
weights_from_host() (popxl.Session method)
weights_to_host() (popxl.Session method)
WeightsFromHostFragment (popxl.ExecutionContext attribute)
WeightsToHostFragment (popxl.ExecutionContext attribute)
where() (in module popxl.ops)
write_variable_data() (popxl.Session method)
write_variables_data() (popxl.Session method)