Files
TheRock/rocm-libraries/projects/rocfft/docs/how-to/distributed-transforms.rst
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

84 lines
3.2 KiB
ReStructuredText

.. meta::
:description: Distributed transforms in rocFFT
:keywords: rocFFT, ROCm, API, documentation, distributed transform
.. _distributed-transforms:
********************************************************************
Distributed transforms
********************************************************************
rocFFT can optionally distribute FFTs across multiple devices in a
single process or across multiple Message Passing Interface (MPI) ranks. To perform distributed
transforms, describe the input and output data layouts
as :ref:`fields<input_output_fields>`.
Multiple devices in a single process
====================================
A transform can be distributed across multiple devices in a single
process by passing distinct device IDs to
:cpp:func:`rocfft_brick_create` to create bricks in the input and output
fields.
Support for single-process multi-device transforms was introduced in
ROCm 6.0 with rocFFT 1.0.25.
Message Passing Interface
===============================
MPI lets you distribute the transform across multiple processes,
organized into MPI ranks.
To turn on rocFFT MPI support, enable the ``ROCFFT_MPI_ENABLE`` CMake option
when building the library. By default, this option
is off. To use Cray MPI, enable the ``ROCFFT_CRAY_MPI_ENABLE`` CMake option.
Additionally, rocFFT MPI support requires a GPU-aware MPI library
that supports transferring data to and from HIP devices.
Support for MPI transforms was introduced in ROCm 6.3 with rocFFT
1.0.29.
.. note::
rocFFT API calls made on different ranks might return
different values. Application developers must ensure that all ranks
have successfully created their plans before attempting to execute
a distributed transform. One rank can fail
to create or execute a plan while the others succeed.
To distribute a transform across multiple MPI ranks, the
following additional steps are required:
#. Each rank calls :cpp:func:`rocfft_plan_description_set_comm` to
add an MPI communicator to an allocated plan description. rocFFT
distributes the computation across all ranks in the
communicator.
#. Each rank allocates the same fields and calls
:cpp:func:`rocfft_plan_description_add_infield` and
:cpp:func:`rocfft_plan_description_add_outfield` on the plan
description. However, each rank must only call
:cpp:func:`rocfft_brick_create` and
:cpp:func:`rocfft_field_add_brick` for bricks that reside on that
rank. A brick resides on exactly one rank. Each rank can have zero
or more bricks associated to it.
#. Each rank in the communicator calls
:cpp:func:`rocfft_plan_create`. rocFFT then uses this information to distribute
the supplied brick information between all of the ranks.
#. Each rank in the communicator calls :cpp:func:`rocfft_execute`.
This function accepts arrays of pointers for input and output.
The arrays contain pointers to each brick in the input or output
of the current rank.
The pointers must be provided in the same order in which the bricks were
added to the field (using calls to :cpp:func:`rocfft_field_add_brick`) and
must point to the memory on the device that was specified at that time.
For in-place transforms, only pass the input pointers and use an
empty array of output pointers.