From 2be7d9c5f14fc4151424fc2a544f928caed89401 Mon Sep 17 00:00:00 2001 From: Beatriz Navidad Vilches Date: Tue, 16 Jul 2024 12:04:56 +0200 Subject: [PATCH] Fixed Markdown linting --- Libraries/hipFFT/README.md | 13 ++++++++++++- Libraries/rocFFT/README.md | 17 ++++++++++++++--- Libraries/rocFFT/callback/README.md | 7 ++++++- Libraries/rocFFT/multi_gpu/README.md | 9 ++++++++- README.md | 4 ++-- 5 files changed, 42 insertions(+), 8 deletions(-) diff --git a/Libraries/hipFFT/README.md b/Libraries/hipFFT/README.md index 70c428e6..a0c2ad7b 100644 --- a/Libraries/hipFFT/README.md +++ b/Libraries/hipFFT/README.md @@ -1,28 +1,35 @@ # 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` @@ -30,16 +37,20 @@ All examples in the `hipFFT` subdirectory can either be built by a single CMake - `$ 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). diff --git a/Libraries/rocFFT/README.md b/Libraries/rocFFT/README.md index 33e72d97..415cffc2 100644 --- a/Libraries/rocFFT/README.md +++ b/Libraries/rocFFT/README.md @@ -1,30 +1,37 @@ # 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` @@ -32,16 +39,20 @@ All examples in the `rocFFT` subdirectory can either be built by a single CMake - `$ 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). diff --git a/Libraries/rocFFT/callback/README.md b/Libraries/rocFFT/callback/README.md index a0007139..97e897de 100644 --- a/Libraries/rocFFT/callback/README.md +++ b/Libraries/rocFFT/callback/README.md @@ -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. @@ -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` @@ -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` diff --git a/Libraries/rocFFT/multi_gpu/README.md b/Libraries/rocFFT/multi_gpu/README.md index e6030315..6883e592 100644 --- a/Libraries/rocFFT/multi_gpu/README.md +++ b/Libraries/rocFFT/multi_gpu/README.md @@ -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. @@ -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` @@ -59,6 +65,7 @@ The application provides the following optional command line arguments: - `rocfft_transform_type_complex_forward` ### HIP runtime + - `hipFree` - `hipGetDeviceCount` - `hipGetErrorString` diff --git a/README.md b/README.md index cde3894a..ebb044a5 100644 --- a/README.md +++ b/README.md @@ -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.