Fourth layer of the dbcsr matrix-matrix multiplication. It hides the differences between performing calculations on the accelerator device or on the CPU. Modification history: - 2010-02-23 Moved from dbcsr_operations - 2011-11 Moved parameter-stack processing routines to dbcsr_mm_methods. - 2013-01 extensive refactoring (Ole Schuett) - 2014-04 generalized into acc-framework (Ole Schuett)
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=*), | private, | parameter | :: | moduleN | = | 'dbcsr_mm_accdrv' | |
logical, | private, | parameter | :: | careful_mod | = | .FALSE. | |
type(thread_private_type), | private, | SAVE, DIMENSION(:), ALLOCATABLE, TARGET | :: | all_thread_privates | |||
type(acc_stream_type), | private, | SAVE, DIMENSION(:), POINTER | :: | thread_streams | => | Null() |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(dbcsr_work_type), | private, | POINTER | :: | product_wm | => | Null() | |
type(dbcsr_data_obj), | private | :: | c_buffer | = | dbcsr_data_obj() | ||
logical, | private | :: | c_area_copy | = | .TRUE. | ||
logical, | private | :: | keep_product_data | = | .TRUE. | ||
logical, | private | :: | do_gpu_c_redux | = | .FALSE. | ||
integer, | private | :: | nlayers | = | 1 |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(acc_devmem_type), | public | :: | devmem | = | acc_devmem_type() | ||
integer, | public, | DIMENSION(:, :), POINTER | :: | hostmem | => | Null() | |
type(acc_event_type), | public | :: | ready | = | acc_event_type() | ||
type(acc_event_type), | public | :: | calculated | = | acc_event_type() | ||
type(acc_stream_type), | public | :: | stream | = | acc_stream_type() |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(stack_buffer_type), | public, | DIMENSION(:), POINTER | :: | stack_buffers | => | Null() | |
type(dbcsr_memtype_type), | public | :: | memtype_cbuffer | = | dbcsr_memtype_type() | ||
integer(kind=int_4), | public, | DIMENSION(64) | :: | padding | = | -1_int_4 |
Initialize the library
Finalize the library
Initializes a multiplication cycle for new set of C-blocks.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_mm_accdrv_type), | intent(inout) | :: | this | |||
type(dbcsr_work_type), | POINTER | :: | product_wm | |||
integer, | optional | :: | nlayers | |||
logical, | intent(in) | :: | keep_product_data |
Helper routine used by dbcsr_mm_accdrv_init()
Helper routine used by setup_streams() and dbcsr_mm_accdrv_lib_finalize()
Helper routine
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(acc_stream_type), | DIMENSION(:), POINTER | :: | streams | |||
character(len=*), | intent(in) | :: | basename | |||
integer, | intent(in) | :: | n | |||
type(acc_event_type), | optional, | DIMENSION(:), POINTER | :: | events | ||
integer, | intent(in), | optional | :: | priority |
Helper routine used by dbcsr_mm_accdrv_init()
Helper routine used by setup_stackbuffers() and dbcsr_mm_accdrv_lib_finalize()
Finalizes a multiplication cycle for a set of C-blocks.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_mm_accdrv_type), | intent(inout) | :: | this |
Finalizes a multiplication cycle for a set of C-blocks.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_mm_accdrv_type), | intent(inout) | :: | this |
Sort stack entries with respect to the c_id.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in), | DIMENSION(dbcsr_ps_width, stack_size) | :: | params_in | ||
integer, | intent(out), | DIMENSION(dbcsr_ps_acc_width, stack_size) | :: | params_out | ||
integer, | intent(in) | :: | stack_size |
Roughly order stacks with a cheaper Binning-scheme by Peter Messmer
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in), | DIMENSION(dbcsr_ps_width, stack_size) | :: | params_in | ||
integer, | intent(out), | DIMENSION(dbcsr_ps_acc_width, stack_size) | :: | params_out | ||
integer, | intent(in) | :: | stack_size |
Processes a given stack using accelerator
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dbcsr_mm_accdrv_type), | intent(inout) | :: | this | |||
type(dbcsr_type), | intent(in) | :: | left | |||
type(dbcsr_type), | intent(in) | :: | right | |||
integer, | intent(inout), | DIMENSION(dbcsr_ps_width, stack_size) | :: | params | ||
integer, | intent(in) | :: | stack_size | |||
type(stack_descriptor_type), | intent(in) | :: | stack_descr | |||
logical, | intent(out) | :: | success | |||
logical, | intent(out) | :: | generated_acc_untuned |