Skip to content

Commit

Permalink
Fixed markdown linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Beanavil committed Sep 6, 2024
1 parent 45db876 commit ad3e3ff
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 18 deletions.
13 changes: 7 additions & 6 deletions Libraries/hipFFT/multi_gpu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

This example showcases how to execute a 2-dimensional complex-to-complex fast Fourier
transform (FFT) with multiple GPUs. Note that the API used is experimental and requires
at least ROCm 6.0.
at least ROCm 6.0.

### Application flow

Expand All @@ -22,6 +22,7 @@ at least ROCm 6.0.
### Command line interface

The application provides the following optional command line arguments:

- `-l` or `--length`. The 3-D FFT size separated by spaces. It default value is `8 8 8`.
- `-d` or `--devices`. The list of devices to use separated by spaces. It default value is `0 1`.

Expand All @@ -32,11 +33,11 @@ The application provides the following optional command line arguments:
- `hipfftXtSetGPUs` instructs a plan to use multiple GPUs.
- `hipfhipfftMakePlan2dftPlan2d` is used to create a plan for a 2-dimensional FFT.
- `hipfftXtExecDescriptor` can execute a multi GPU plan.
- Device memory management:
- `hipfftXtMalloc` allocates device memory for a plan associated with multiple devices.
- `hipLibXtDesc` holds the handles to device memory on multiple devices.
- `hipfftXtMemcpy` can copy data between a contiguous host buffer and `hipLibXtDesc`, or between two `hipLibXtDesc`.
- The memory allocated on device can be freed with `hipfftXtFree`.
- Device memory management:
- `hipfftXtMalloc` allocates device memory for a plan associated with multiple devices.
- `hipLibXtDesc` holds the handles to device memory on multiple devices.
- `hipfftXtMemcpy` can copy data between a contiguous host buffer and `hipLibXtDesc`, or between two `hipLibXtDesc`.
- The memory allocated on device can be freed with `hipfftXtFree`.

## Demonstrated API Calls

Expand Down
12 changes: 9 additions & 3 deletions Libraries/rocFFT/complex_complex/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# rocFFT Complex to Complex Example (C++)

## Description
This example illustrates the use of rocFFT for a Fast Fourier Transform from complex to complex numbers. It supports 1D, 2D and 3D transforms. This example can be both run on Windows and Linux.

This example illustrates the use of rocFFT for a Fast Fourier Transform from complex to complex numbers. It supports 1D, 2D and 3D transforms. This example can be both run on Windows and Linux.

### Application flow

1. Read in command-line parameters.
2. Setup buffer size and stride for input and output.
3. Allocate, initialize and print host input data.
Expand All @@ -15,24 +17,27 @@ This example illustrates the use of rocFFT for a Fast Fourier Transform from com
9. Copy back output data to the host and print it.
10. Destroy plan and free device memory.


### Command line interface

The application provides the following optional command line arguments:

- `-d` or `--device`. The id of the device to be used. Its default value is `0`.
- `-o` or `--outofplace`. A boolean flag that if set the output will be written to another output buffer, if not set it will overwrite the input buffer. Its default value is `false`.
- `-i` or `--inverse`. A boolean flag that if set the inverse transform will be done. Its default value is `false`.
- `-l` or `--length`. The FFT size separated by spaces, it supports from 1 up to 3 dimensions. Its default value is `4 4`.


## Key APIs and Concepts

- rocFFT is initialized by calling `rocfft_setup()` and it is cleaned up by calling `rocfft_cleanup()`.
- rocFFT creates a plan with `rocfft_plan_create`. This function takes many of the fundamental parameters needed to specify a transform. The plan is then executed with `rocfft_execute` and destroyed with `rocfft_plan_destroy`.
- rocFFT supports both the inverse and forward direction for the FFT from complex to complex. These transform types are `rocfft_transform_type_complex_inverse` and `rocfft_transform_type_complex_forward`.
- rocFFT supports both in-place and not-inplace result placements. With in-place only the input buffer is required and will be overwritten with the result. These result placement types are `rocfft_placement_inplace` and `rocfft_placement_inplace`.
- rocFFT transforms types can be given to the set data layout for the plan description. This example the input data format is, `rocfft_array_type_hermitian_interleaved`, and the output data format is, `rocfft_array_type_hermitian_interleaved`.

## Demonstrated API Calls

### rocFFT

- `rocfft_array_type_complex_interleaved`
- `rocfft_cleanup`
- `rocfft_execute`
Expand All @@ -53,6 +58,7 @@ The application provides the following optional command line arguments:
- `rocfft_transform_type_complex_inverse`

### HIP runtime

- `hipFree`
- `hipGetErrorString`
- `hipMalloc`
Expand Down
11 changes: 9 additions & 2 deletions Libraries/rocFFT/complex_real/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# rocFFT Complex To Real Example (C++)

## Description

This example illustrates the use of rocFFT for a Fast Fourier Transform from complex to real numbers. The matrix form of the complex input should be Hermitian. It supports 1D, 2D and 3D transforms. This example can be both run on Windows and Linux. The sizes for the transform are as follows:

- 1D: $\lfloor \frac{N_1}{2} \rfloor + 1$ to $N_1$
- 2D: $(\lfloor \frac{N_1}{2} \rfloor + 1) N_2$ to $N_1 N_2$
- 3D: $(\lfloor \frac{N_1}{2} \rfloor + 1) N_2 N_3$ to $N_1 N_2 N_3$

$N_1$, $N_2$ and $N_3$ are the size of the output, specified by the --length parameter of the example.

### Application flow

1. Read in command-line parameters.
2. Setup buffer size and stride for input and output.
3. Allocate, initialize and print host input data.
Expand All @@ -20,22 +23,25 @@ $N_1$, $N_2$ and $N_3$ are the size of the output, specified by the --length par
9. Copy back output data to the host and print it.
10. Destroy plan and free device memory.


### Command line interface

The application provides the following optional command line arguments:

- `-d` or `--device`. The id of the device to be used. Its default value is `0`.
- `-o` or `--outofplace`. A boolean flag that if set the output will be written to another output buffer, if not set it will overwrite the input buffer. Its default value is `false`.
- `-l` or `--length`. The FFT size separated by spaces, it supports from 1 up to 3 dimensions. Its default value is `4 4`.


## Key APIs and Concepts

- rocFFT is initialized by calling `rocfft_setup()` and it is cleaned up by calling `rocfft_cleanup()`.
- rocFFT creates a plan with `rocfft_plan_create`. This function takes many of the fundamental parameters needed to specify a transform. The plan is then executed with `rocfft_execute` and destroyed with `rocfft_plan_destroy`.
- rocFFT supports both in-place and not-inplace result placements. With in-place only the input buffer is required and will be overwritten with the result. These result placement types are `rocfft_placement_inplace` and `rocfft_placement_inplace`.
- rocFFT transforms types can be given to the set data layout for the plan description. This example the input data format is, `rocfft_array_type_hermitian_interleaved`, and the output data format is, `rocfft_array_type_real`.

## Demonstrated API Calls

### rocFFT

- `rocfft_array_type_hermitian_interleaved`
- `rocfft_array_type_real`
- `rocfft_cleanup`
Expand All @@ -56,6 +62,7 @@ The application provides the following optional command line arguments:
- `rocfft_transform_type_real_inverse`

### HIP runtime

- `hipConj`
- `hipFree`
- `hipGetErrorString`
Expand Down
11 changes: 9 additions & 2 deletions Libraries/rocFFT/real_complex/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# rocFFT Real to Complex Example (C++)

## Description

This example illustrates the use of rocFFT for a Fast Fourier Transform from real to complex numbers. It supports 1D, 2D and 3D transforms. This example can be both run on Windows and Linux. The sizes for the transform are as follows:

- 1D: $N_1$ to $\lfloor \frac{N_1}{2} \rfloor + 1$
- 2D: $N_1 N_2$ to $(\lfloor \frac{N_1}{2} \rfloor + 1) N_2$
- 3D: $N_1 N_2 N_3$ to $(\lfloor \frac{N_1}{2} \rfloor + 1) N_2 N_3$

$N_1$, $N_2$ and $N_3$ are the size of the input, specified by the --length parameter of the example.

### Application flow

1. Read in command-line parameters.
2. Setup buffer size and stride for input and output.
3. Allocate, initialize and print host input data.
Expand All @@ -20,22 +23,25 @@ $N_1$, $N_2$ and $N_3$ are the size of the input, specified by the --length para
9. Copy back output data to the host and print it.
10. Destroy plan and free device memory.


### Command line interface

The application provides the following optional command line arguments:

- `-d` or `--device`. The id of the device to be used. Its default value is `0`.
- `-o` or `--outofplace`. A boolean flag that if set the output will be written to another output buffer, if not set it will overwrite the input buffer. Its default value is `false`.
- `-l` or `--length`. The FFT size separated by spaces, it supports from 1 up to 3 dimensions. Its default value is `4 4`.


## Key APIs and Concepts

- rocFFT is initialized by calling `rocfft_setup()` and it is cleaned up by calling `rocfft_cleanup()`.
- rocFFT creates a plan with `rocfft_plan_create`. This function takes many of the fundamental parameters needed to specify a transform. The plan is then executed with `rocfft_execute` and destroyed with `rocfft_plan_destroy`.
- rocFFT supports both in-place and not-inplace result placements. With in-place only the input buffer is required and will be overwritten with the result. These result placement types are `rocfft_placement_inplace` and `rocfft_placement_inplace`.
- rocFFT transforms types can be given to the set data layout for the plan description. This example the input data format is, `rocfft_array_type_real`, and the output data format is, `rocfft_array_type_hermitian_interleaved`.

## Demonstrated API Calls

### rocFFT

- `rocfft_array_type_hermitian_interleaved`
- `rocfft_array_type_real`
- `rocfft_cleanup`
Expand All @@ -56,6 +62,7 @@ The application provides the following optional command line arguments:
- `rocfft_transform_type_real_forward`

### HIP runtime

- `hipFree`
- `hipGetErrorString`
- `hipMalloc`
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ A collection of examples to enable new users to start using ROCm. Advanced users
- [gemm](https://github.com/ROCm/rocm-examples/tree/develop/Libraries/rocBLAS/level_3/gemm/): Showcases the general matrix product operation.
- [gemm_strided_batched](https://github.com/ROCm/rocm-examples/tree/develop/Libraries/rocBLAS/level_3/gemm_strided_batched/): Showcases the general matrix product operation with strided and batched matrices.
- [rocFFT](/Libraries/rocFFT/)
- [callback](https://github.com/ROCm/rocm-examples/tree/develop/Libraries/rocFFT/callback/): Program that showcases the use of rocFFT `callback` functionality.
- [complex_complex](https://github.com/ROCm/rocm-examples/tree/develop/Libraries/rocFFT/complex_complex/): Program that showcases a Fast Fourier Transform from complex to complex numbers.
- [complex_real](https://github.com/ROCm/rocm-examples/tree/develop/Libraries/rocFFT/complex_real/): Program that showcases a Fast Fourier Transform from complex to real numbers.
- [multi_gpu](https://github.com/ROCm/rocm-examples/tree/develop/Libraries/rocFFT/multi_gpu/): Program that showcases the use of rocFFT multi-GPU functionality.
- [real_complex](https://github.com/ROCm/rocm-examples/tree/develop/Libraries/rocFFT/real_complex/): Program that showcases a Fast Fourier Transform from real to complex numbers.
- [callback](https://github.com/ROCm/rocm-examples/tree/develop/Libraries/rocFFT/callback/): Program that showcases the use of rocFFT `callback` functionality.
- [complex_complex](https://github.com/ROCm/rocm-examples/tree/develop/Libraries/rocFFT/complex_complex/): Program that showcases a Fast Fourier Transform from complex to complex numbers.
- [complex_real](https://github.com/ROCm/rocm-examples/tree/develop/Libraries/rocFFT/complex_real/): Program that showcases a Fast Fourier Transform from complex to real numbers.
- [multi_gpu](https://github.com/ROCm/rocm-examples/tree/develop/Libraries/rocFFT/multi_gpu/): Program that showcases the use of rocFFT multi-GPU functionality.
- [real_complex](https://github.com/ROCm/rocm-examples/tree/develop/Libraries/rocFFT/real_complex/): Program that showcases a Fast Fourier Transform from real to complex numbers.
- [rocPRIM](https://github.com/ROCm/rocm-examples/tree/develop/Libraries/rocPRIM/)
- [block_sum](https://github.com/ROCm/rocm-examples/tree/develop/Libraries/rocPRIM/block_sum/): Simple program that showcases `rocprim::block_reduce` with an addition operator.
- [device_sum](https://github.com/ROCm/rocm-examples/tree/develop/Libraries/rocPRIM/device_sum/): Simple program that showcases `rocprim::reduce` with an addition operator.
Expand Down

0 comments on commit ad3e3ff

Please sign in to comment.