tglite.op

edge_view(blk, data)

Reindex the data of edges based on the target node indices in the TBlock.

edge_softmax(blk, data)

Computes segmented softmax on given data using edge information from the block.

edge_reduce(blk, data[, op])

Computes segmented reduction (e.g.

src_scatter(blk, data[, op])

Aggregates the features of the source node indices in TBlock, using the specified aggregation operation ('sum' or 'mean').

coalesce(blk[, by])

Segmented operation to reduce source nodes for each destination node by a certain property, such as latest timestamp.

preload(blk[, use_pin])

Prefetch data (e.g.

aggregate(blk, fn_or_list[, key])

Performs pull-style multi-hop aggregation from the tail block back towards the given block by applying function to each block, using the key to pass along results.

propagate(blk, fn_or_list)

Performs push-style multi-hop propagation from the given block to the tail block by applying function to each block.

dedup(blk)

Applies the deduplication optimization to the TBlock by rewriting the destination nodes.

cache(ctx, id, blk[, include_first])

Applies the caching optimization to the TBlock by rewriting the destination nodes and using ctx as scratch space.

precomputed_zeros(ctx, id, encoder, num)

Generates a tensor of precomputed zero values encoded by the specified encoder, used for creating a batch of zero time encodings.

precomputed_times(ctx, id, encoder, times)

Encodes a tensor of time values using the provided encoder, leverage precomputed values if available in the context's time table.