Documentation for module dbcsr_mm_csr

Third layer of the dbcsr matrix-matrix multiplication. It collects the full matrix blocks, which need to be multiplied, and stores their parameters in various stacks. After a certain amount of parameters is collected it dispatches the filled stacks to either the CPU or the accelerator device.

source: dbcsr_mm_csr.F
Loading...

public Types:

dbcsr_mm_csr_type
...

public Subroutines/Functions:

...
Finalizes a multiplication cycle for a set of C-blocks.
Initializes a multiplication cycle for new set of C-blocks.
Finalize the library
Initialize the library
A wrapper around dbcsr_mm_csr_multiply_low to avoid expensive dereferencings.
Signal approaching end of multiplication
...
Make the reduction of the 3D layers in the local csr object

public Types:

TYPE :: dbcsr_mm_csr_type

...


DIMENSION(:), POINTER :: c_hashes => NULL() ...
INTEGER
:: nm_stacks ...
INTEGER
:: nn_stacks ...
INTEGER
:: nk_stacks ...
INTEGER(int_4),
DIMENSION(:), POINTER :: m_size_maps => NULL() ...
INTEGER(int_4),
DIMENSION(:), POINTER :: n_size_maps => NULL() ...
INTEGER(int_4),
DIMENSION(:), POINTER :: k_size_maps => NULL() ...
INTEGER
:: max_m ...
INTEGER
:: max_n ...
INTEGER
:: max_k ...
INTEGER
:: m_size_maps_size ...
INTEGER
:: n_size_maps_size ...
INTEGER
:: k_size_maps_size ...
INTEGER(int_1),
DIMENSION(:,:,:), POINTER :: stack_map => NULL() ...
DIMENSION(:), POINTER :: stacks_descr => NULL() ...
POINTER :: product_wm => NULL() ...
INTEGER,
DIMENSION(:,:,:), POINTER :: stacks_data => NULL() ...
INTEGER,
DIMENSION(:), POINTER :: stacks_fillcount => NULL() ...
:: sched ...

SUBROUTINEdbcsr_mm_csr_dev2host_init(this)

...

Arguments:
INTENT(inout)
:: this ...

SUBROUTINEdbcsr_mm_csr_finalize(this)

Finalizes a multiplication cycle for a set of C-blocks.

Arguments:
INTENT(inout)
:: this ...

SUBROUTINEdbcsr_mm_csr_init(this, left, right, product, m_sizes, n_sizes, block_estimate, right_row_blk_size, nlayers)

Initializes a multiplication cycle for new set of C-blocks.

Arguments:
INTENT(inout)
:: this ...
TYPE(dbcsr_type),
INTENT(in),
OPTIONAL
:: left ...
TYPE(dbcsr_type),
INTENT(in),
OPTIONAL
:: right ...
TYPE(dbcsr_type),
INTENT(inout)
:: product ...
INTEGER,
POINTER
:: m_sizes(:) ...
INTEGER,
POINTER
:: n_sizes(:) ...
INTEGER,
INTENT(in)
:: block_estimate ...
INTEGER,
INTENT(in)
:: right_row_blk_size(:) ...
INTEGER,
OPTIONAL
:: nlayers ...

SUBROUTINEdbcsr_mm_csr_lib_finalize(group, output_unit)

Finalize the library

Arguments:
INTEGER,
INTENT(in)
:: group ...
INTEGER,
INTENT(in)
:: output_unit ...

SUBROUTINEdbcsr_mm_csr_lib_init()

Initialize the library

SUBROUTINEdbcsr_mm_csr_multiply(this, left, right, mi, mf, ni, nf, ki, kf, ai, af, bi, bf, m_sizes, n_sizes, k_sizes, c_local_rows, c_local_cols, c_has_symmetry, keep_sparsity, use_eps, row_max_epss, flop, a_index, b_index, a_norms, b_norms)

A wrapper around dbcsr_mm_csr_multiply_low to avoid expensive dereferencings.

Arguments:
INTENT(inout)
:: this ...
TYPE(dbcsr_type),
INTENT(in)
:: left ...
TYPE(dbcsr_type),
INTENT(in)
:: right ...
INTEGER,
INTENT(in)
:: mi ...
INTEGER,
INTENT(in)
:: mf ...
INTEGER,
INTENT(in)
:: ni ...
INTEGER,
INTENT(in)
:: nf ...
INTEGER,
INTENT(in)
:: ki ...
INTEGER,
INTENT(in)
:: kf ...
INTEGER,
INTENT(in)
:: ai ...
INTEGER,
INTENT(in)
:: af ...
INTEGER,
INTENT(in)
:: bi ...
INTEGER,
INTENT(in)
:: bf ...
INTEGER,
INTENT(inout)
:: m_sizes(:) ...
INTEGER,
INTENT(inout)
:: n_sizes(:) ...
INTEGER,
INTENT(inout)
:: k_sizes(:) ...
INTEGER,
INTENT(inout)
:: c_local_rows(:) ...
INTEGER,
INTENT(inout)
:: c_local_cols(:) ...
LOGICAL,
INTENT(inout)
:: c_has_symmetry ...
LOGICAL,
INTENT(inout)
:: keep_sparsity ...
LOGICAL,
INTENT(inout)
:: use_eps ...
REAL(sp)
:: row_max_epss(:) ...
INTEGER(int_8),
INTENT(inout)
:: flop ...
INTEGER,
INTENT(in)
:: a_index(1:3,1:af) ...
INTEGER,
INTENT(in)
:: b_index(1:3,1:bf) ...
REAL(sp),
POINTER
:: a_norms(:) ...
REAL(sp),
POINTER
:: b_norms(:) ...

SUBROUTINEdbcsr_mm_csr_phaseout(this)

Signal approaching end of multiplication

Arguments:
INTENT(inout)
:: this ...

SUBROUTINEdbcsr_mm_csr_purge_stacks(this, left, right)

...

Arguments:
INTENT(inout)
:: this ...
TYPE(dbcsr_type),
INTENT(in)
:: left ...
TYPE(dbcsr_type),
INTENT(in)
:: right ...

SUBROUTINEdbcsr_mm_csr_red3d(this, meta_buffer, data_buffer, flop, m_sizes, n_sizes, g2l_map_rows, g2l_map_cols, original_lastblk, keep_sparsity)

Make the reduction of the 3D layers in the local csr object

Arguments:
INTENT(inout)
:: this ...
INTEGER,
INTENT(in),
TARGET
:: meta_buffer(:) ...
INTENT(in)
:: data_buffer ...
INTEGER(int_8),
INTENT(inout)
:: flop ...
INTEGER,
INTENT(in)
:: m_sizes(:) ...
INTEGER,
INTENT(in)
:: n_sizes(:) ...
INTEGER,
INTENT(in)
:: g2l_map_rows(:) ...
INTEGER,
INTENT(in)
:: g2l_map_cols(:) ...
INTEGER,
INTENT(in)
:: original_lastblk ...
LOGICAL,
INTENT(in)
:: keep_sparsity ...

private Parameters/Types:

private Types:

TYPE :: ele_type

Types needed for the hashtable.


INTEGER
:: c = 0 ...
INTEGER
:: p = 0 ...

TYPE :: hash_table_type

...


TYPE(ele_type),
DIMENSION(:), POINTER :: table ...
INTEGER
:: nele = 0 ...
INTEGER
:: nmax = 0 ...
INTEGER
:: prime = 0 ...