Skip to content

Commit

Permalink
Fixed Markdown linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Beanavil committed Jul 16, 2024
1 parent 4b57979 commit 2be7d9c
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 8 deletions.
13 changes: 12 additions & 1 deletion Libraries/hipFFT/README.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,56 @@
# hipFFT Examples

## Summary

The examples in this subdirectory showcase the functionality of [hipFFT](https://github.com/ROCm/hipFFT), a (Fast Fourier Transform) FFT marshalling library for rocFFT and cuFFT.

## Prerequisites

### Linux

- [CMake](https://cmake.org/download/) (at least version 3.21)
- OR GNU Make - available via the distribution's package manager
- [ROCm](https://docs.amd.com/bundle/ROCm-Installation-Guide-v5.1.3/page/Overview_of_ROCm_Installation_Methods.html) (at least version 5.x.x)
- [hipFFT](https://github.com/ROCm/hipFFT)

### Windows

- [Visual Studio](https://visualstudio.microsoft.com/) 2019 or 2022 with the "Desktop Development with C++" workload
- ROCm toolchain for Windows (No public release yet)
- The Visual Studio ROCm extension needs to be installed to build with the solution files.
- The Visual Studio ROCm extension needs to be installed to build with the solution files.
- [hipFFT](https://github.com/ROCm/hipFFT)
- [CMake](https://cmake.org/download/) (optional, to build with CMake. Requires at least version 3.21)
- [Ninja](https://ninja-build.org/) (optional, to build with CMake)

## Building

### Linux

Make sure that the dependencies are installed, or use one of the [provided Dockerfiles](../../Dockerfiles/) to build and run the examples in a containerized environment.

#### Using CMake

All examples in the `hipFFT` subdirectory can either be built by a single CMake project or be built independently.

- `$ cd Libraries/hipFFT`
- `$ cmake -S . -B build` (on ROCm) or `$ cmake -S . -B build -D GPU_RUNTIME=CUDA` (on CUDA)
- `$ cmake --build build`

#### Using Make

All examples can be built by a single invocation to Make or be built independently.

- `$ cd Libraries/hipFFT`
- `$ make` (on ROCm) or `$ make GPU_RUNTIME=CUDA` (on CUDA)

### Windows

#### Visual Studio

Visual Studio solution files are available for the individual examples. To build all examples for hipFFT open the top level solution file [ROCm-Examples-VS2019.sln](../../ROCm-Examples-VS2019.sln) and filter for hipFFT.

For more detailed build instructions refer to the top level [README.md](../../README.md#visual-studio).

#### CMake

All examples in the `hipFFT` subdirectory can either be built by a single CMake project or be built independently. For build instructions refer to the top-level [README.md](../../README.md#cmake-2).
17 changes: 14 additions & 3 deletions Libraries/rocFFT/README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,58 @@
# rocFFT Examples

## Summary

The examples in this subdirectory showcase the functionality of the [rocFFT](https://github.com/ROCm/rocFFT/) library. The examples build on Linux for ROCm (AMD GPU).

## Prerequisites

### Linux

- [CMake](https://cmake.org/download/) (at least version 3.21)
- OR GNU Make - available via the distribution's package manager
- [ROCm](https://docs.amd.com/bundle/ROCm-Installation-Guide-v5.1.3/page/Overview_of_ROCm_Installation_Methods.html) (at least version 5.x.x)
- [rocFFT](https://github.com/ROCm/rocFFT/)
- `rocfft` package available from [repo.radeon.com](https://repo.radeon.com/rocm/). The repository is added during the standard ROCm [install procedure](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/).
- `rocfft` package available from [repo.radeon.com](https://repo.radeon.com/rocm/). The repository is added during the standard ROCm [install procedure](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/).

### Windows

- [Visual Studio](https://visualstudio.microsoft.com/) 2019 or 2022 with the "Desktop Development with C++" workload
- ROCm toolchain for Windows (No public release yet)
- The Visual Studio ROCm extension needs to be installed to build with the solution files.
- The Visual Studio ROCm extension needs to be installed to build with the solution files.
- [rocFFT](https://github.com/ROCm/rocFFT/)
- Installed as part of the ROCm SDK on Windows for ROCm platform.
- Installed as part of the ROCm SDK on Windows for ROCm platform.
- [CMake](https://cmake.org/download/) (optional, to build with CMake. Requires at least version 3.21)
- [Ninja](https://ninja-build.org/) (optional, to build with CMake)

## Building

### Linux

Make sure that the dependencies are installed, or use one of the [provided Dockerfiles](../../Dockerfiles/) to build and run the examples in a containerized environment.

#### Using CMake

All examples in the `rocFFT` subdirectory can either be built by a single CMake project or be built independently.

- `$ cd Libraries/rocFFT`
- `$ cmake -S . -B build`
- `$ cmake --build build`

#### Using Make

All examples can be built by a single invocation to Make or be built independently.

- `$ cd Libraries/rocFFT`
- `$ make`

### Windows

#### Visual Studio

Visual Studio solution files are available for the individual examples. To build all examples for rocFFT open the top level solution file [ROCm-Examples-VS2019.sln](../../ROCm-Examples-VS2019.sln) and filter for rocFFT.

For more detailed build instructions refer to the top level [README.md](../../README.md#visual-studio).

#### CMake

All examples in the `rocFFT` subdirectory can either be built by a single CMake project or be built independently. For build instructions refer to the top-level [README.md](../../README.md#cmake-2).
7 changes: 6 additions & 1 deletion Libraries/rocFFT/callback/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# rocFFT callback Example (C++)

## Description

This example illustrates the use of rocFFT `callback` functionality. It shows how to use load callback, a user-defined callback function that is run to load input from global memory at the start of the transform, with rocFFT.

### Application flow

1. Set up rocFFT.
2. Allocate and initialize the host data and filter.
3. Allocate device memory.
Expand All @@ -23,14 +25,16 @@ This example illustrates the use of rocFFT `callback` functionality. It shows ho
16. The cleanup of the rocFFT enviroment.

## 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 can add work buffers and can control plan execution with `rocfft_execution_info` from `rocfft_execution_info_create(rocfft_execution_info *info)`. For this example specifically a load callback with `rocfft_execution_info_set_load_callback` and work buffer with `rocfft_execution_info_set_work_buffer`.
- [Callbacks](https://rocm.docs.amd.com/projects/rocFFT/en/latest/index.html#load-and-store-callbacks) is an experimental functionality in rocFFT. It requires a pointer to the shared memory, but did not support shared memory when this example was created.


## Demonstrated API Calls

### rocFFT

- `rocfft_cleanup`
- `rocfft_execute`
- `rocfft_execution_info_create`
Expand All @@ -46,6 +50,7 @@ This example illustrates the use of rocFFT `callback` functionality. It shows ho
- `rocfft_transform_type_complex_forward`

### HIP runtime

- `HIP_SYMBOL`
- `hipCmul`
- `hipFree`
Expand Down
9 changes: 8 additions & 1 deletion Libraries/rocFFT/multi_gpu/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# rocFFT Mutli GPU Example (C++)

## Description

This example illustrates the use of rocFFT multi-GPU functionality. It shows how to use multiple GPUs with rocFFT by using `rocfft_brick` and `rocfft_field` to divide the work between multiple devices. At least requires rocm version 6.0.0.

### Application flow

1. Read in command-line parameters.
2. Check if there are two device with 3-D inputs.
3. Check if there device ids that do not exist.
Expand All @@ -21,20 +23,24 @@ This example illustrates the use of rocFFT multi-GPU functionality. It shows how
15. Destroy plan and free device memory.

### 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`.

## 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_field` is used to hold data decomposition information which is then passed to a `rocfft_plan` via a `rocfft_plan_description`
- `rocfft_brick` is used to describe the data decomposition of fields
- To execute HIP functions on different gpus `hipSetDevice` can be used with the id of the gpu to switch beteen gpus.


## Demonstrated API Calls

### rocFFT

- `rocfft_array_type_complex_interleaved`
- `rocfft_brick_create`
- `rocfft_brick_destroy`
Expand All @@ -59,6 +65,7 @@ The application provides the following optional command line arguments:
- `rocfft_transform_type_complex_forward`

### HIP runtime

- `hipFree`
- `hipGetDeviceCount`
- `hipGetErrorString`
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ 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](/Libraries/rocFFT/callback/): Program that showcases the use of rocFFT `callback` functionality.
- [multi_gpu](/Libraries/rocFFT/multi_gpu/): Program that showcases the use of rocFFT multi-GPU functionality.
- [callback](/Libraries/rocFFT/callback/): Program that showcases the use of rocFFT `callback` functionality.
- [multi_gpu](/Libraries/rocFFT/multi_gpu/): Program that showcases the use of rocFFT multi-GPU functionality.
- [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 2be7d9c

Please sign in to comment.