This module defines abstract_kernel type and its type bound procedures.
The abstract kernel is used in transpose_handle_generic type and
is resposible for packing/unpacking/permute operations.
The actual implementation of the kernel is deferred to the
create_private, execute_private and destroy_private procedures.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(kernel_type_t), | public, | parameter | :: | KERNEL_DUMMY | = | kernel_type_t(-1) |
Dummy kernel, does nothing |
| type(kernel_type_t), | public, | parameter | :: | KERNEL_UNPACK | = | kernel_type_t(3) |
Unpacks contiguous buffer. |
| type(kernel_type_t), | public, | parameter | :: | KERNEL_UNPACK_SIMPLE_COPY | = | kernel_type_t(4) |
Doesn’t actually unpacks anything. Performs |
| type(kernel_type_t), | public, | parameter | :: | KERNEL_UNPACK_PIPELINED | = | kernel_type_t(5) |
Unpacks pack of contiguous buffer recieved from rank. Unpacks contiguous buffer recieved from everyone except myself.
Should be used only when backend is |
| type(kernel_type_t), | public, | parameter | :: | KERNEL_PERMUTE_FORWARD | = | kernel_type_t(7) | |
| type(kernel_type_t), | public, | parameter | :: | KERNEL_PERMUTE_BACKWARD | = | kernel_type_t(8) | |
| type(kernel_type_t), | public, | parameter | :: | KERNEL_PERMUTE_BACKWARD_START | = | kernel_type_t(9) | |
| type(kernel_type_t), | public, | parameter | :: | KERNEL_PERMUTE_BACKWARD_END | = | kernel_type_t(10) | |
| type(kernel_type_t), | public, | parameter | :: | KERNEL_PERMUTE_BACKWARD_END_PIPELINED | = | kernel_type_t(11) |
Unpacks contiguous buffer recieved from everyone except myself.
Should be used only when backend is |
| type(kernel_type_t), | private, | parameter | :: | TRANSPOSE_KERNELS(*) | = | [KERNEL_PERMUTE_FORWARD, KERNEL_PERMUTE_BACKWARD, KERNEL_PERMUTE_BACKWARD_START] |
List of all transpose kernel types |
| type(kernel_type_t), | private, | parameter | :: | UNPACK_KERNELS(*) | = | [KERNEL_PERMUTE_BACKWARD_END, KERNEL_PERMUTE_BACKWARD_END_PIPELINED, KERNEL_UNPACK, KERNEL_UNPACK_PIPELINED] |
List of all unpack kernel types |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(kernel_type_t), | intent(in) | :: | left | |||
| type(kernel_type_t), | intent(in) | :: | right |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(kernel_type_t), | intent(in) | :: | left | |||
| type(kernel_type_t), | intent(in) | :: | right |
Creates underlying kernel
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(abstract_kernel), | intent(inout) | :: | self |
Abstract kernel |
||
| type(dtfft_effort_t), | intent(in) | :: | effort |
Effort level for generating transpose kernels |
||
| integer(kind=int64), | intent(in) | :: | base_storage |
Number of bytes needed to store single element |
||
| logical, | intent(in), | optional | :: | force_effort |
Should effort be forced or not |
Executes underlying kernel
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(abstract_kernel), | intent(inout) | :: | self |
Abstract kernel |
||
| real(kind=real32), | intent(in), | target | :: | in(:) |
Source buffer, can be device or host pointer |
|
| real(kind=real32), | intent(inout), | target | :: | out(:) |
Target buffer, can be device or host pointer |
|
| type(dtfft_stream_t), | intent(in) | :: | stream |
Stream to execute on, used only for device pointers |
||
| integer(kind=int32), | intent(in), | optional | :: | neighbor |
Source rank for pipelined unpacking |
Destroys underlying kernel
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(abstract_kernel), | intent(inout) | :: | self |
Abstract kernel |
nvRTC Kernel type
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=int32), | public | :: | val |
Abstract kernel type
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | is_created | = | .false. |
Kernel is created flag. |
|
| logical, | public | :: | is_dummy | = | .false. |
If kernel should do anything or not. |
|
| type(kernel_type_t), | public | :: | kernel_type |
Type of the kernel |
|||
| character(len=:), | public, | allocatable | :: | kernel_string | |||
| integer(kind=int32), | public, | allocatable | :: | neighbor_data(:,:) |
Neighbor data for pipelined unpacking |
||
| integer(kind=int32), | public, | allocatable | :: | dims(:) |
Local dimensions to process |
| procedure, public, pass(self) :: create | ../../ Creates kernel |
| procedure, public, pass(self) :: execute | ../../ Executes kernel |
| procedure, public, pass(self) :: destroy | ../../ Destroys kernel |
| procedure(create_interface), public, deferred :: create_private | ../../ Creates underlying kernel |
| procedure(execute_interface), public, deferred :: execute_private | ../../ Executes underlying kernel |
| procedure(destroy_interface), public, deferred :: destroy_private | ../../ Destroys underlying kernel |
Gets the string description of a kernel
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(kernel_type_t), | intent(in) | :: | kernel |
kernel type |
kernel string
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(kernel_type_t), | intent(in) | :: | param |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(kernel_type_t), | intent(in) | :: | param |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(kernel_type_t), | intent(in) | :: | left | |||
| type(kernel_type_t), | intent(in) | :: | right |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(kernel_type_t), | intent(in) | :: | left | |||
| type(kernel_type_t), | intent(in) | :: | right |
Creates kernel
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(abstract_kernel), | intent(inout) | :: | self |
Abstract kernel |
||
| integer(kind=int32), | intent(in) | :: | dims(:) |
Local dimensions to process |
||
| type(dtfft_effort_t), | intent(in) | :: | effort |
Effort level for generating transpose kernels |
||
| integer(kind=int64), | intent(in) | :: | base_storage |
Number of bytes needed to store single element |
||
| type(kernel_type_t), | intent(in) | :: | kernel_type |
Type of kernel to build |
||
| integer(kind=int32), | intent(in), | optional | :: | neighbor_data(:,:) |
Optional pointers for unpack kernels |
|
| logical, | intent(in), | optional | :: | force_effort |
Should effort be forced or not |
Executes kernel
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(abstract_kernel), | intent(inout) | :: | self |
Abstract kernel |
||
| real(kind=real32), | intent(in) | :: | in(:) |
Source buffer, can be device or host pointer |
||
| real(kind=real32), | intent(inout) | :: | out(:) |
Target buffer, can be device or host pointer |
||
| type(dtfft_stream_t), | intent(in) | :: | stream |
Stream to execute on, used only for device pointers |
||
| integer(kind=int32), | intent(in), | optional | :: | neighbor |
Source rank for pipelined unpacking |
Destroys kernel
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(abstract_kernel), | intent(inout) | :: | self |
Abstract kernel |