The examples in this subdirectory showcase the functionality of the [rocSPARSE](https://github.com/rocmSoftwarePlatform/rocSPARSE) library. The examples build on both Linux and Windows for both the ROCm (AMD GPU) and CUDA (NVIDIA GPU) backend.
The examples in this subdirectory showcase the functionality of the [rocSPARSE](https://github.com/rocmSoftwarePlatform/rocSPARSE) library. The examples build on both Linux and Windows for the ROCm (AMD GPU) backend.
## Note on asynchronous execution
@ -16,14 +16,12 @@ All rocSPARSE library functions, unless otherwise stated, are non blocking and e
@@ -16,14 +16,12 @@ All rocSPARSE library functions, unless otherwise stated, are non blocking and e
- OR GNU Make - available via the distribution's package manager
- [ROCm](https://rocm.docs.amd.com/projects/HIP/en/latest/install/install.html) (at least version 6.x.x) OR the HIP Nvidia runtime (on the CUDA platform)
- [ROCm](https://rocm.docs.amd.com/projects/HIP/en/latest/install/install.html) (at least version 6.x.x)
- ROCm platform: `rocsparse` 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/HIP/en/latest/install/install.html).
- CUDA platform: Install rocSPARSE from source: [instructions](https://rocm.docs.amd.com/projects/rocSPARSE/en/latest/install/Linux_Install_Guide.html).
### Windows
- [Visual Studio](https://visualstudio.microsoft.com/) 2019 or 2022 with the "Desktop Development with C++" workload
@ -35,7 +33,6 @@ All rocSPARSE library functions, unless otherwise stated, are non blocking and e
@@ -35,7 +33,6 @@ All rocSPARSE library functions, unless otherwise stated, are non blocking and e
- ROCm platform: Installed as part of the ROCm SDK on Windows.
- CUDA platform: Install rocSPARSE from source: [instructions](https://rocm.docs.amd.com/projects/rocSPARSE/en/latest/install/Linux_Install_Guide.html).
- [CMake](https://cmake.org/download/) (optional, to build with CMake. Requires at least version 3.21)
@ -52,7 +49,7 @@ Make sure that the dependencies are installed, or use the [provided Dockerfiles]
@@ -52,7 +49,7 @@ Make sure that the dependencies are installed, or use the [provided Dockerfiles]
All examples in the `rocSPARSE` subdirectory can either be built by a single CMake project or be built independently.
- `$ cd Libraries/rocSPARSE`
- `$ cmake -S . -B build` (on ROCm) or `$ cmake -S . -B build -D GPU_RUNTIME=CUDA` (on CUDA)
- `$ cmake -S . -B build` (on ROCm)
- `$ cmake --build build`
#### Using Make
@ -60,7 +57,7 @@ All examples in the `rocSPARSE` subdirectory can either be built by a single CMa
@@ -60,7 +57,7 @@ All examples in the `rocSPARSE` subdirectory can either be built by a single CMa
All examples can be built by a single invocation to Make or be built independently.
- `$ cd Libraries/rocSPARSE`
- `$ make` (on ROCm) or `$ make GPU_RUNTIME=CUDA` (on CUDA)