Base class for reshape/transpose plans
Base class for reshape/transpose plans
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(dtfft_backend_t), | public | :: | backend |
Backend |
|||
| type(backend_helper), | public | :: | helper |
Backend helper |
|||
| integer(kind=int64), | public | :: | min_buffer_size |
Minimal buffer size for transposition |
|||
| type(dtfft_platform_t), | public | :: | platform |
Platform used for transposition |
|||
| type(dtfft_stream_t), | public | :: | stream |
CUDA stream |
|||
| type(reshape_container), | public, | allocatable | :: | plans(:) |
Plans for each reshape operation |
||
| type(string), | public, | allocatable | :: | names(:) |
Names of each reshape operation |
||
| integer(kind=int32), | public, | allocatable | :: | colors(:) |
| procedure, public, pass(self), non_overridable :: init | ../../ Initializes reshape plan base |
| procedure, public, pass(self), non_overridable :: get_async_active | ../../ Returns .true. if any of the plans is running asynchronously |
| procedure, public, pass(self), non_overridable :: get_aux_bytes | ../../ Returns auxiliary buffer size |
| procedure, public, pass(self), non_overridable :: is_aux_needed | ../../ Returns .true. if aux buffer is needed |
| procedure, public, pass(self), non_overridable :: get_backend | ../../ Returns backend id |
| procedure, public, pass(self), non_overridable :: report_backends | ../../ Reports backends used by each plan. Should be used only for adaptive backend |
| procedure, public, pass(self), non_overridable :: is_nvshmem | |
| procedure, public, pass(self), non_overridable :: execute | ../../ Executes reshape |
| procedure, public, pass(self), non_overridable :: execute_end | ../../ Finishes asynchronous reshape |
| procedure, public, pass(self), non_overridable :: mem_alloc | ../../ Allocates memory |
| procedure, public, pass(self), non_overridable :: mem_free | ../../ Frees memory |
| procedure, public, pass(self) :: destroy | ../../ Destroys reshape plan |
| procedure, public, pass(self) :: report_compression | ../../ Reports compression statistics |
Returns maximum auxiliary memory size needed by handles array
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(reshape_container), | intent(in) | :: | plans(:) |
Reshape handles |
Executes autotuning for given plans and returns execution time in milliseconds
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(reshape_container), | intent(inout) | :: | plans(:) |
Allocated plans |
||
| type(MPI_Comm), | intent(in) | :: | comm |
Communicator |
||
| type(dtfft_backend_t), | intent(in) | :: | backend |
Backend to use |
||
| type(dtfft_platform_t), | intent(in) | :: | platform |
Platform used |
||
| type(backend_helper), | intent(inout) | :: | helper |
Helper to use |
||
| type(dtfft_stream_t), | intent(in) | :: | stream |
Stream to use |
||
| integer(kind=int64), | intent(in) | :: | buffer_size | |||
| integer(kind=int32), | intent(in), | optional | :: | report_space_count |
Execution time
Aggregates and writing timings to stdout
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(MPI_Comm), | intent(in) | :: | comm | |||
| real(kind=real32), | intent(in) | :: | elapsed_time | |||
| integer(kind=int32), | intent(in) | :: | n_iters | |||
| integer(kind=int32), | intent(in), | optional | :: | space_count |
Initializes reshape plan base
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(reshape_plan_base), | intent(inout) | :: | self |
Reshape class |
||
| type(dtfft_platform_t), | intent(in) | :: | platform |
Execution platform |
||
| type(dtfft_effort_t), | intent(in) | :: | effort |
Effort level |
||
| type(dtfft_backend_t), | intent(in) | :: | backend | |||
| type(dtfft_effort_t), | intent(in) | :: | autotune_effort | |||
| type(dtfft_compression_config_t), | intent(in) | :: | compression_config |
Compression configuration |
||
| type(MPI_Datatype), | intent(in) | :: | base_dtype |
Base datatype |
||
| integer(kind=int64), | intent(in) | :: | base_storage |
Number of bytes to store single element of base datatype |
Error code
Returns .true. if any of the plans is running asynchronously
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(reshape_plan_base), | intent(in) | :: | self |
Reshape class |
Returns maximum auxiliary memory size needed by reshape plan
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(reshape_plan_base), | intent(in) | :: | self |
Reshape class |
Returns true if aux is needed. false otherwise
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(reshape_plan_base), | intent(in) | :: | self |
Reshape class |
Returns plan backend
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(reshape_plan_base), | intent(in) | :: | self |
Reshape class |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(reshape_plan_base), | intent(in) | :: | self |
Reshape class |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(reshape_container), | intent(in) | :: | plans(:) |
Reshape handles |
||
| type(dtfft_backend_t), | intent(in) | :: | backend |
Allocates array of plans
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(reshape_container), | intent(inout) | :: | plans(:) |
Plans to allocate |
||
| type(dtfft_backend_t), | intent(in), | optional | :: | backend |
Backend to use |
|
| type(dtfft_backend_t), | intent(in), | optional | :: | backends(:) |
Backends to use |
Destroys array of plans
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(reshape_container), | intent(inout) | :: | plans(:) |
Plans to destroy |
Executes reshape plan
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(reshape_plan_base), | intent(inout) | :: | self |
Transposition class |
||
| type(c_ptr), | intent(in) | :: | in |
Incoming buffer |
||
| type(c_ptr), | intent(in) | :: | out |
Resulting buffer |
||
| integer(kind=int32), | intent(in) | :: | reshape_type |
Type of reshape to execute |
||
| type(async_exec_t), | intent(in) | :: | exec_type |
Type of execution (sync/async) |
||
| type(c_ptr), | intent(in) | :: | aux |
Optional auxiliary buffer |
||
| integer(kind=int32), | intent(out), | optional | :: | error_code |
Error code |
Finishes asynchronous reshape
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(reshape_plan_base), | intent(inout) | :: | self |
Reshape class |
||
| type(c_ptr), | intent(in) | :: | in |
Incoming buffer |
||
| type(c_ptr), | intent(in) | :: | out |
Resulting buffer |
||
| integer(kind=int32), | intent(in) | :: | reshape_type |
Type of reshape to execute |
||
| type(c_ptr), | intent(in) | :: | aux |
Optional auxiliary buffer |
||
| integer(kind=int32), | intent(out) | :: | error_code |
Error code |
Destroys reshape plan
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(reshape_plan_base), | intent(inout) | :: | self |
Reshape class |
Reports backends used by each plan. Should be used only for adaptive backend
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(reshape_plan_base), | intent(in) | :: | self |
Reshape class |
Reports compression statistics
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(reshape_plan_base), | intent(in) | :: | self |
Reshape class |
Allocates memory based on selected backend
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(reshape_plan_base), | intent(inout) | :: | self |
Reshape class |
||
| type(MPI_Comm), | intent(in) | :: | comm |
MPI communicator |
||
| integer(kind=int64), | intent(in) | :: | alloc_bytes |
Number of bytes to allocate |
||
| type(c_ptr), | intent(out) | :: | ptr |
Pointer to the allocated memory |
||
| integer(kind=int32), | intent(out) | :: | error_code |
Error code |
Frees memory allocated with mem_alloc
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(reshape_plan_base), | intent(inout) | :: | self |
Reshape class |
||
| type(c_ptr), | intent(in) | :: | ptr |
Pointer to the memory to free |
||
| integer(kind=int32), | intent(out) | :: | error_code |
Error code |
Allocates memory based on backend
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(dtfft_platform_t), | intent(in) | :: | platform |
Execution platform |
||
| type(backend_helper), | intent(inout) | :: | helper |
Backend helper |
||
| type(dtfft_backend_t), | intent(in) | :: | backend |
Backend to allocate memory for |
||
| type(MPI_Comm), | intent(in) | :: | comm |
MPI communicator |
||
| integer(kind=int64), | intent(in) | :: | alloc_bytes |
Number of bytes to allocate |
||
| type(c_ptr), | intent(out) | :: | ptr |
Pointer to the allocated memory |
||
| integer(kind=int32), | intent(out) | :: | error_code |
Error code |
Frees memory based on backend
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(dtfft_platform_t), | intent(in) | :: | platform |
Execution platform |
||
| type(backend_helper), | intent(inout) | :: | helper |
Backend helper |
||
| type(dtfft_backend_t), | intent(in) | :: | backend |
Backend to free memory for |
||
| type(c_ptr), | intent(in) | :: | ptr |
Pointer to the memory to free |
||
| integer(kind=int32), | intent(out) | :: | error_code |
Error code |
Allocates auxiliary memory according to the backend and sets it to the plans
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(dtfft_platform_t), | intent(in) | :: | platform | |||
| type(backend_helper), | intent(inout) | :: | helper |
Backend helper |
||
| type(dtfft_backend_t), | intent(in) | :: | backend |
GPU backend |
||
| type(MPI_Comm), | intent(in) | :: | cart_comm |
Cartesian communicator |
||
| type(c_ptr), | intent(inout) | :: | aux |
Allocatable auxiliary memory |
||
| type(reshape_container), | intent(in) | :: | plans(:) | |||
| logical | :: | is_aux_alloc |
Is auxiliary memory allocated |