u_mul_e_max(g, x, y)¶
Generalized SpMM function. It fuses two steps into one kernel.
Computes messages by mul source node and edge features.
Aggregate the messages by max as the features on destination nodes.
g (DGLHeteroGraph) – The input graph
x (tensor) – The source node features.
y (tensor) – The edge features.
The result tensor.
- Return type
This function supports autograd (computing input gradients given the output gradient). If the feature shape of two input operands do not match, we first broadcasts the features to a unified shape (note that the memory usage will not increase accordingly) and then performs the operation.
Broadcasting follows NumPy semantics. Please see https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html for more details about the NumPy broadcasting semantics.
The max function will return zero for nodes with no incoming messages. This is implemented by replacing all negative infinity values to zero.