athena__container_layer Module

Module containing types and interfaces for the container type

This module contains the container layer type which is a container for an individual layer.


Used by


Variables

Type Visibility Attributes Name Initial
type(read_layer_container), public, dimension(:), allocatable :: list_of_layer_types

List of layer names and their associated read functions

type(onnx_expanded_gnn_create_layer_container), public, dimension(:), allocatable :: list_of_onnx_expanded_gnn_layer_creators

List of expanded-ONNX GNN creators

type(onnx_expanded_nop_create_layer_container), public, dimension(:), allocatable :: list_of_onnx_expanded_nop_layer_creators

List of expanded-ONNX NOP creators registered for pattern-matched ONNX import

type(onnx_create_layer_container), public, dimension(:), allocatable :: list_of_onnx_layer_creators

List of layer names and their associated ONNX creation functions

type(onnx_meta_create_layer_container), public, dimension(:), allocatable :: list_of_onnx_meta_layer_creators

List of metadata subtypes and their associated ONNX creation functions


Interfaces

interface

  • public module subroutine allocate_list_of_layer_types(addit_list)

    Allocate the list of layer types

    Arguments

    Type IntentOptional Attributes Name
    type(read_layer_container), intent(in), optional, dimension(:) :: addit_list

    Additional list of layer types

interface

  • public module subroutine allocate_list_of_onnx_expanded_gnn_layer_creators(addit_list)

    Allocate the list of expanded-ONNX GNN layer creation procedures

    Arguments

    Type IntentOptional Attributes Name
    type(onnx_expanded_gnn_create_layer_container), intent(in), optional, dimension(:) :: addit_list

    Additional list of expanded-ONNX GNN layer creation procedures

interface

  • public module subroutine allocate_list_of_onnx_expanded_nop_layer_creators(addit_list)

    Allocate the list of expanded-ONNX NOP layer creation procedures

    Arguments

    Type IntentOptional Attributes Name
    type(onnx_expanded_nop_create_layer_container), intent(in), optional, dimension(:) :: addit_list

    Additional list of expanded-ONNX NOP layer creation procedures

interface

  • public module subroutine allocate_list_of_onnx_layer_creators(addit_list)

    Allocate the list of ONNX layer creation procedures

    Arguments

    Type IntentOptional Attributes Name
    type(onnx_create_layer_container), intent(in), optional, dimension(:) :: addit_list

    Additional list of ONNX layer creation procedures

interface

  • public module subroutine allocate_list_of_onnx_meta_layer_creators(addit_list)

    Allocate the list of metadata-based ONNX layer creation procedures

    Arguments

    Type IntentOptional Attributes Name
    type(onnx_meta_create_layer_container), intent(in), optional, dimension(:) :: addit_list

    Additional list of metadata-based ONNX layer creation procedures

interface

  • public module subroutine container_reduction(this, rhs)

    Reduce two layers via summation

    Arguments

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

    Present layer container

    class(container_layer_type), intent(in) :: rhs

    Input layer container

interface

  • private module function create_from_onnx_layer(nodes, initialisers, value_info, verbose) result(layer)

    Create a layer from ONNX nodes and initialisers

    Arguments

    Type IntentOptional Attributes Name
    type(onnx_node_type), intent(in) :: nodes

    ONNX nodes

    type(onnx_initialiser_type), intent(in), dimension(:) :: initialisers

    ONNX initialisers

    type(onnx_tensor_type), intent(in), dimension(:) :: value_info

    ONNX value info

    integer, intent(in), optional :: verbose

    Verbosity level

    Return Value class(base_layer_type), allocatable

    Instance of a layer

interface

  • private module subroutine finalise_container_layer(this)

    Finalise the container layer

    Arguments

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

    Present layer container

interface

  • private module function read_layer(unit, verbose) result(layer)

    Read a layer from a file

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: unit

    Unit number

    integer, intent(in), optional :: verbose

    Verbosity level

    Return Value class(base_layer_type), allocatable

    Instance of a layer


Abstract Interfaces

abstract interface

  • private function build_onnx_expanded_gnn_layer(prefix, nodes, num_nodes, inits, num_inits, inputs, num_inputs) result(layer)

    Build one expanded-ONNX GNN layer from a node cluster.

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: prefix

    Expanded-ONNX layer prefix (e.g. "node_2")

    type(onnx_node_type), intent(in) :: nodes(:)

    Parsed ONNX nodes

    integer, intent(in) :: num_nodes

    Number of valid node entries

    type(onnx_initialiser_type), intent(in) :: inits(:)

    Parsed ONNX initialisers

    integer, intent(in) :: num_inits

    Number of valid initialiser entries

    type(onnx_tensor_type), intent(in) :: inputs(:)

    Parsed ONNX graph input tensors

    integer, intent(in) :: num_inputs

    Number of valid graph input entries

    Return Value class(base_layer_type), allocatable

    Constructed layer

abstract interface

  • private function build_onnx_expanded_nop_layer(prefix, nodes, num_nodes, inits, num_inits) result(layer)

    Build one expanded-ONNX NOP layer from a node cluster.

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: prefix

    Expanded-ONNX layer prefix (e.g. "layer1")

    type(onnx_node_type), intent(in) :: nodes(:)

    Parsed ONNX nodes

    integer, intent(in) :: num_nodes

    Number of valid node entries

    type(onnx_initialiser_type), intent(in) :: inits(:)

    Parsed ONNX initialisers

    integer, intent(in) :: num_inits

    Number of valid initialiser entries

    Return Value class(base_layer_type), allocatable

    Constructed layer

abstract interface

  • private function classify_onnx_expanded_gnn_layer(prefix, nodes, num_nodes)

    Return true when this creator handles the given expanded-ONNX GNN prefix.

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: prefix

    Expanded-ONNX layer prefix (e.g. "node_2")

    type(onnx_node_type), intent(in) :: nodes(:)

    Parsed ONNX nodes

    integer, intent(in) :: num_nodes

    Number of valid node entries

    Return Value logical

abstract interface

  • private function classify_onnx_expanded_nop_layer(prefix, nodes, num_nodes)

    Return true when this creator handles the given expanded-ONNX NOP prefix.

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: prefix

    Expanded-ONNX layer prefix (e.g. "layer1")

    type(onnx_node_type), intent(in) :: nodes(:)

    Parsed ONNX nodes

    integer, intent(in) :: num_nodes

    Number of valid node entries

    Return Value logical

abstract interface

  • private function create_gnn_from_onnx_layer(meta_key, meta_value, inits, verbose) result(layer)

    Create a GNN layer from ONNX metadata and initialisers

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: meta_key

    GNN metadata key (e.g. "athena_gnn_node_1")

    character(len=*), intent(in) :: meta_value

    Semicolon-separated GNN metadata value string

    type(onnx_initialiser_type), intent(in), dimension(:) :: inits

    ONNX initialisers (valid slice only)

    integer, intent(in), optional :: verbose

    Verbosity level

    Return Value class(base_layer_type), allocatable

    Constructed GNN layer


Derived Types

type, public ::  container_layer_type

Container for a layer

Components

Type Visibility Attributes Name Initial
class(base_layer_type), public, allocatable :: layer

Layer

Finalizations Procedures

final :: finalise_container_layer

Finalise the container layer

Type-Bound Procedures

procedure, public, pass(this) :: reduce => container_reduction

Reduce two layers via summation

type, public ::  onnx_create_layer_container

Type containing information needed to create a layer from ONNX

Components

Type Visibility Attributes Name Initial
procedure(create_from_onnx_layer), public, nopass, pointer :: create_ptr => null()

Pointer to the specific layer creation function from ONNX

character(len=20), public :: op_type

Name of the layer

Registration entry for one expanded-ONNX GNN layer type

Components

Type Visibility Attributes Name Initial
procedure(build_onnx_expanded_gnn_layer), public, nopass, pointer :: build_ptr => null()

Pointer to the builder

procedure(classify_onnx_expanded_gnn_layer), public, nopass, pointer :: classify_ptr => null()

Pointer to the classifier

character(len=30), public :: gnn_subtype

Subtype name (e.g. "kipf", "duvenaud")

Registration entry for one expanded-ONNX NOP layer type

Components

Type Visibility Attributes Name Initial
procedure(build_onnx_expanded_nop_layer), public, nopass, pointer :: build_ptr => null()

Pointer to the builder that constructs the layer

procedure(classify_onnx_expanded_nop_layer), public, nopass, pointer :: classify_ptr => null()

Pointer to the classifier that recognises this layer type

character(len=30), public :: nop_subtype

Subtype name used for diagnostics (e.g. "dynamic_lno")

Type containing information needed to create a metadata layer from ONNX

Components

Type Visibility Attributes Name Initial
procedure(create_gnn_from_onnx_layer), public, nopass, pointer :: create_ptr => null()

Pointer to the metadata layer creation function

character(len=30), public :: layer_subtype

Metadata subtype name (e.g. "duvenaud", "dynamic_lno")

type, public ::  read_layer_container

Type containing information needed to read a layer

Components

Type Visibility Attributes Name Initial
character(len=20), public :: name

Name of the layer

procedure(read_layer), public, nopass, pointer :: read_ptr => null()

Pointer to the specific layer read function