This module describes transpose_handle_generic class It is responsible for managing both Host and CUDA-based transposition operations It executes transpose kernels, memory transfers between GPUs/Hosts, and data unpacking if required
Generic Transpose Handle Executes transposition in 3 steps:
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | private | :: | has_exchange | = | .false. |
If current handle has exchanges between GPUs |
|
| logical, | private | :: | is_pipelined | = | .false. |
If underlying exchanges are pipelined |
|
| logical, | private | :: | is_async_supported | = | .false. |
If underlying backend support async execution(execute/execute_end) |
|
| class(abstract_kernel), | private, | allocatable | :: | transpose_kernel |
Kernel for data transposition |
||
| class(abstract_kernel), | private, | allocatable | :: | unpack_kernel |
Kernel for unpacking data |
||
| class(abstract_backend), | private, | allocatable | :: | comm_handle |
Communication handle |
| procedure, public, non_overridable, pass(self) :: create | ../../ Creates transpose handle |
| procedure, public, pass(self) :: create_private => create | ../../ Creates Generic Transpose Handle |
| procedure, public, pass(self) :: execute | ../../ Executes transpose - exchange - unpack |
| procedure, public, pass(self) :: execute_end | ../../ Finalizes async transpose |
| procedure, public, pass(self) :: get_async_active | ../../ Returns if async transpose is active |
| procedure, public, pass(self) :: destroy | ../../ Destroys Generic Transpose Handle |
| procedure, public, pass(self) :: get_aux_size | ../../ Returns number of bytes required by aux buffer |
Helper class used to obtain displacements and counts needed to send to other processes
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=int32), | public, | allocatable | :: | ls(:,:) |
Starts of my data that I should send or recv while communicating with other processes |
||
| integer(kind=int32), | public, | allocatable | :: | ln(:,:) |
Counts of my data that I should send or recv while communicating with other processes |
||
| integer(kind=int32), | public, | allocatable | :: | sizes(:,:) |
Counts of every rank in a comm |
||
| integer(kind=int32), | public, | allocatable | :: | starts(:,:) |
Starts of every rank in a comm |
||
| integer(kind=int32), | public, | allocatable | :: | displs(:) |
Local buffer displacement |
||
| integer(kind=int32), | public, | allocatable | :: | counts(:) |
Number of elements to send or recv |
| procedure, public, pass(self) :: create => create_data_handle | ../../ Creates handle |
| procedure, public, pass(self) :: destroy => destroy_data_handle | ../../ Destroys handle |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(transpose_handle_generic), | intent(in) | :: | self |
Generic Transpose Handle |
Returns number of bytes required by aux buffer
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(transpose_handle_generic), | intent(in) | :: | self |
Generic Transpose Handle |
Creates handle
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(data_handle), | intent(inout) | :: | self |
Helper class |
||
| type(pencil), | intent(in) | :: | info |
Pencil info |
||
| type(MPI_Comm), | intent(in) | :: | comm |
MPI communicator |
||
| integer(kind=int32), | intent(in) | :: | comm_size |
Size of |
Destroys handle
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(data_handle), | intent(inout) | :: | self |
Helper class |
Checks if product of sizes fits into integer(int32)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | sizes(:) |
Sizes to check |
Creates Generic Transpose Handle
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(transpose_handle_generic), | intent(inout) | :: | self |
Generic Transpose Handle |
||
| type(MPI_Comm), | intent(in) | :: | comm |
MPI Communicator |
||
| type(pencil), | intent(in) | :: | send |
Send pencil |
||
| type(pencil), | intent(in) | :: | recv |
Recv pencil |
||
| type(dtfft_transpose_t), | intent(in) | :: | transpose_type |
Type of transpose to create |
||
| integer(kind=int64), | intent(in) | :: | base_storage |
Base storage |
||
| type(create_args), | intent(in) | :: | kwargs |
Additional arguments |
Executes transpose - exchange - unpack
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(transpose_handle_generic), | intent(inout) | :: | self |
Generic Transpose Handle |
||
| real(kind=real32), | intent(inout) | :: | in(:) |
Send pointer |
||
| real(kind=real32), | intent(inout) | :: | out(:) |
Recv pointer |
||
| type(execute_args), | intent(inout) | :: | kwargs |
Additional arguments |
||
| integer(kind=int32), | intent(out) | :: | error_code |
Error code |
Ends execution of transposition
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(transpose_handle_generic), | intent(inout) | :: | self |
Generic Transpose Handle |
||
| type(execute_args), | intent(inout) | :: | kwargs |
Additional arguments |
||
| integer(kind=int32), | intent(out) | :: | error_code |
Error code |
Destroys Generic Transpose Handle
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(transpose_handle_generic), | intent(inout) | :: | self |
Generic Transpose Handle |