athena__diffstruc_extd_submodule_msgpass_kipf Submodule

Submodule containing implementations for extended diffstruc array operations


Uses


Functions

function get_partial_kipf_propagate_left(this, upstream_grad) result(output)

Gradient of kipf_propagate with respect to vertex features.

Arguments

Type IntentOptional Attributes Name
class(array_type), intent(inout) :: this

Forward result node containing saved operands

type(array_type), intent(in) :: upstream_grad

Upstream gradient tensor

Return Value type(array_type)

Gradient tensor for left operand

function get_partial_left_reverse_kipf_propagate(this, upstream_grad) result(output)

Arguments

Type IntentOptional Attributes Name
class(array_type), intent(inout) :: this

Forward result node containing saved operands

type(array_type), intent(in) :: upstream_grad

Upstream gradient tensor

Return Value type(array_type)

Gradient tensor for left operand

function reverse_kipf_propagate(a, adj_ia, adj_ja, num_features, num_elements) result(c)

Reverse propagate values from one autodiff array to another

Arguments

Type IntentOptional Attributes Name
class(array_type), intent(in), target :: a

Upstream tensor to reverse-propagate

integer, intent(in), dimension(:) :: adj_ia

CSR row pointers

integer, intent(in), dimension(:,:) :: adj_ja

CSR neighbour and edge lookup indices

integer, intent(in), dimension(2) :: num_features

Output feature and element counts

integer, intent(in), dimension(2) :: num_elements

Output feature and element counts

Return Value type(array_type), pointer

Reverse-propagated tensor


Subroutines

pure subroutine get_partial_kipf_propagate_left_val(this, upstream_grad, output)

In-place value gradient for kipf_propagate left operand.

Arguments

Type IntentOptional Attributes Name
class(array_type), intent(in) :: this

Forward result node containing saved operands

real(kind=real32), intent(in), dimension(:,:) :: upstream_grad

Upstream gradient values

real(kind=real32), intent(out), dimension(:,:) :: output

Output gradient values for left operand

pure subroutine get_partial_left_reverse_kipf_propagate_val(this, upstream_grad, output)

Arguments

Type IntentOptional Attributes Name
class(array_type), intent(in) :: this

Forward result node containing saved operands

real(kind=real32), intent(in), dimension(:,:) :: upstream_grad

Upstream gradient values

real(kind=real32), intent(out), dimension(:,:) :: output

Output gradient values for left operand


Module Functions

module function kipf_propagate(vertex_features, adj_ia, adj_ja) result(c)

Propagate values from one autodiff array to another

Arguments

Type IntentOptional Attributes Name
class(array_type), intent(in), target :: vertex_features

Vertex feature tensor

integer, intent(in), dimension(:) :: adj_ia

CSR row pointers

integer, intent(in), dimension(:,:) :: adj_ja

CSR neighbour and edge lookup indices

Return Value type(array_type), pointer

Propagated node feature tensor