This module describes Abstraction for all Backends: abstract_backend
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=int32), | public, | parameter | :: | NCCL_REGISTER_PREALLOC_SIZE | = | 8 |
Number of register elements to preallocate |
Creates overriding class
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(abstract_backend), | intent(inout) | :: | self |
Abstract Backend |
||
| type(backend_helper), | intent(in) | :: | helper |
Backend helper |
||
| integer(kind=int64), | intent(in) | :: | base_storage |
Number of bytes to store single element |
Executes Backend
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(abstract_backend), | intent(inout) | :: | self |
Abstract Backend |
||
| real(kind=real32), | intent(inout), | target | :: | in(:) |
Send pointer |
|
| real(kind=real32), | intent(inout), | target | :: | out(:) |
Recv pointer |
|
| type(dtfft_stream_t), | intent(in) | :: | stream |
Main execution CUDA stream |
||
| real(kind=real32), | intent(inout), | target | :: | aux(:) |
Aux pointer |
|
| integer(kind=int32), | intent(out) | :: | error_code |
Error code |
Destroys overriding class
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(abstract_backend), | intent(inout) | :: | self |
Abstract Backend |
Helper with nccl, mpi and nvshmem communicators
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | is_nccl_created | = | .false. |
Flag is |
|
| type(ncclComm), | public | :: | nccl_comm |
NCCL communicator |
|||
| logical, | public | :: | should_register |
If NCCL buffer should be registered |
|||
| type(c_ptr), | public, | allocatable | :: | nccl_register(:,:) |
NCCL register cache |
||
| integer(kind=int32), | public | :: | nccl_register_size |
Number of elements in |
|||
| type(MPI_Comm), | public, | allocatable | :: | comms(:) |
MPI communicators |
||
| integer(kind=int32), | public, | allocatable | :: | comm_mappings(:,:) |
Mapping of 1d comm ranks to global comm |
||
| type(dtfft_transpose_t), | public | :: | tranpose_type |
Type of transpose to create |
|||
| type(pencil), | public, | pointer | :: | pencils(:) |
Pencils |
| procedure, public, pass(self) :: create => create_helper | ../../ Creates helper |
| procedure, public, pass(self) :: destroy => destroy_helper | ../../ Destroys helper |
The most Abstract Backend
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(dtfft_backend_t), | public | :: | backend |
Backend type |
|||
| type(dtfft_platform_t), | public | :: | platform |
Platform to use |
|||
| logical, | public | :: | is_selfcopy |
If backend is self-copying |
|||
| logical, | public | :: | is_pipelined |
If backend is pipelined |
|||
| logical, | public | :: | is_even |
If all processes send/recv same amount of memory |
|||
| integer(kind=int64), | public | :: | aux_size |
Number of bytes required by aux buffer |
|||
| integer(kind=int64), | public | :: | send_recv_buffer_size |
Number of float elements used in |
|||
| type(MPI_Comm), | public | :: | comm |
MPI Communicator |
|||
| integer(kind=int32), | public, | allocatable | :: | comm_mapping(:) |
Mapping of 1d comm ranks to global comm |
||
| integer(kind=int32), | public | :: | comm_size |
Size of MPI Comm |
|||
| integer(kind=int32), | public | :: | comm_rank |
Rank in MPI Comm |
|||
| integer(kind=int64), | public, | allocatable | :: | send_displs(:) |
Send data displacements, in float elements |
||
| integer(kind=int64), | public, | allocatable | :: | send_floats(:) |
Send data elements, in float elements |
||
| integer(kind=int64), | public, | allocatable | :: | recv_displs(:) |
Recv data displacements, in float elements |
||
| integer(kind=int64), | public, | allocatable | :: | recv_floats(:) |
Recv data elements, in float elements |
||
| type(cudaEvent), | public | :: | execution_event |
Event for main execution stream |
|||
| type(cudaEvent), | public | :: | copy_event |
Event for copy stream |
|||
| type(dtfft_stream_t), | public | :: | copy_stream |
Stream for copy operations |
|||
| integer(kind=int64), | public | :: | self_copy_bytes |
Number of bytes to copy it itself |
|||
| integer(kind=int64), | public | :: | self_send_displ |
Displacement for send buffer |
|||
| integer(kind=int64), | public | :: | self_recv_displ |
Displacement for recv buffer |
|||
| class(abstract_kernel), | public, | pointer | :: | unpack_kernel |
Kernel for unpacking data |
| procedure, public, non_overridable, pass(self) :: create | ../../ Creates Abstract Backend |
| procedure, public, non_overridable, pass(self) :: execute | ../../ Executes Backend |
| procedure, public, non_overridable, pass(self) :: destroy | ../../ Destroys Abstract Backend |
| procedure, public, non_overridable, pass(self) :: get_aux_size | ../../ Returns number of bytes required by aux buffer |
| procedure, public, non_overridable, pass(self) :: set_unpack_kernel | ../../ Sets unpack kernel for pipelined backend |
| procedure, public, pass(self) :: execute_end | ../../ Ends execution of Backend |
| procedure, public, pass(self) :: execute_self_copy | |
| procedure, public, pass(self) :: get_async_active | ../../ Returns if async execution is active |
| procedure(create_interface), public, deferred, pass(self) :: create_private | ../../ Creates overriding class |
| procedure(execute_interface), public, deferred, pass(self) :: execute_private | ../../ Executes Backend |
| procedure(destroy_interface), public, deferred, pass(self) :: destroy_private | ../../ Destroys overriding class |
Returns if async execution is active
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(abstract_backend), | intent(in) | :: | self |
Abstract backend |
Returns number of bytes required by aux buffer
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(abstract_backend), | intent(in) | :: | self |
Abstract backend |
Creates Abstract Backend
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(abstract_backend), | intent(inout) | :: | self |
Abstract Backend |
||
| type(dtfft_backend_t), | intent(in) | :: | backend |
Backend type |
||
| type(backend_helper), | intent(in) | :: | helper |
Backend helper |
||
| type(dtfft_platform_t), | intent(in) | :: | platform |
Platform to use |
||
| integer(kind=int8), | intent(in) | :: | comm_id |
Id of communicator to use |
||
| integer(kind=int32), | intent(in) | :: | send_displs(:) |
Send data displacements, in original elements |
||
| integer(kind=int32), | intent(in) | :: | send_counts(:) |
Send data elements, in float elements |
||
| integer(kind=int32), | intent(in) | :: | recv_displs(:) |
Recv data displacements, in float elements |
||
| integer(kind=int32), | intent(in) | :: | recv_counts(:) |
Recv data elements, in float elements |
||
| integer(kind=int64), | intent(in) | :: | base_storage |
Number of bytes to store single element |
Executes Backend
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(abstract_backend), | intent(inout) | :: | self |
Self-copying backend |
||
| real(kind=real32), | intent(inout) | :: | in(:) |
Send pointer |
||
| real(kind=real32), | intent(inout) | :: | out(:) |
Recv pointer |
||
| type(dtfft_stream_t), | intent(in) | :: | stream |
CUDA stream |
||
| real(kind=real32), | intent(inout) | :: | aux(:) |
Aux pointer |
||
| type(async_exec_t), | intent(in) | :: | exec_type |
Type of async execution |
||
| integer(kind=int32), | intent(out) | :: | error_code |
Error code |
Ends execution of Backend
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(abstract_backend), | intent(inout) | :: | self |
Abstract backend |
||
| integer(kind=int32), | intent(out) | :: | error_code |
Error code |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(abstract_backend), | intent(in) | :: | self |
Abstract backend |
||
| real(kind=real32), | intent(in) | :: | in(*) |
Send pointer |
||
| real(kind=real32), | intent(inout) | :: | out(*) |
Recv pointer |
||
| type(dtfft_stream_t), | intent(in) | :: | stream |
CUDA stream |
Destroys Abstract Backend
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(abstract_backend), | intent(inout) | :: | self |
Abstract backend |
Sets unpack kernel for pipelined backend
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(abstract_backend), | intent(inout) | :: | self |
Pipelined backend |
||
| class(abstract_kernel), | intent(in), | target | :: | unpack_kernel |
Kernel for unpacking data |
Creates helper
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(backend_helper), | intent(inout) | :: | self |
Backend helper |
||
| type(dtfft_platform_t), | intent(in) | :: | platform |
Platform to use |
||
| type(MPI_Comm), | intent(in) | :: | base_comm |
MPI communicator |
||
| type(MPI_Comm), | intent(in) | :: | comms(:) |
1D Communicators |
||
| logical, | intent(in) | :: | is_nccl_needed |
If nccl communicator will be needed |
||
| type(pencil), | intent(in), | target | :: | pencils(:) |
Pencils |
Destroys helper
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(backend_helper), | intent(inout) | :: | self |
Backend helper |