From 4e9dc3417f95138490dfefc627103fa54fd7383c Mon Sep 17 00:00:00 2001 From: Gopesh Bhardwaj Date: Tue, 5 Dec 2023 03:52:18 +0530 Subject: [PATCH] Getting Started docs for samples and tools (#261) * getting started for amples and tools * Adding getting started to documentation * Addressing review comments * minor update * renaming rocprofv2 to rocprofv3 in doc * Apply suggestions from code review --------- Co-authored-by: Jonathan R. Madsen [ROCm/rocprofiler-sdk commit: 5c42d7d82a5f3cd8beebd4d9c9136e7d87360f3d] --- .../source/docs/getting_started.md | 56 +++++++++++++++++++ projects/rocprofiler-sdk/source/docs/index.md | 1 + 2 files changed, 57 insertions(+) create mode 100644 projects/rocprofiler-sdk/source/docs/getting_started.md diff --git a/projects/rocprofiler-sdk/source/docs/getting_started.md b/projects/rocprofiler-sdk/source/docs/getting_started.md new file mode 100644 index 0000000000..734a755ab1 --- /dev/null +++ b/projects/rocprofiler-sdk/source/docs/getting_started.md @@ -0,0 +1,56 @@ +## Running Samples and Tool + +```eval_rst +.. toctree:: + :glob: + :maxdepth: 4 +``` + +Samples and tool can be run in order to see the profiler in action. This section covers on how to build these samples and run the tool. +Once the rocm build is installed, samples are installed under: + +```bash +/opt/rocm/share/rocprofiler-sdk/samples +``` + +rocprofv3 tool is installed under: + +```bash +/opt/rocm/bin +``` + +### Building Samples + +From any directory, run: + +```bash +cmake -B build-rocprofiler-sdk-samples /opt/rocm/share/rocprofiler-sdk/samples -DCMAKE_PREFIX_PATH=/opt/rocm +cmake --build build-rocprofiler-sdk-samples --target all --parallel 8 + + +### Running samples + +To run the built samples, cd into the `build-rocprofiler-sdk-samples` directory and run: + +```bash +ctest -V + +### Running Tool +#### Build an HIP application: + +```bash +cmake -B -DCMAKE_PREFIX_PATH=/opt/rocm +cmake --build --target all --parallel +``` + +#### Run the Tool: + +```bash +rocprofv3 --hsa-api ./MatrixTranspose +``` + +See more tool options with + +```bash +rocprofv3 --help +``` diff --git a/projects/rocprofiler-sdk/source/docs/index.md b/projects/rocprofiler-sdk/source/docs/index.md index bd850c841b..40630f5963 100644 --- a/projects/rocprofiler-sdk/source/docs/index.md +++ b/projects/rocprofiler-sdk/source/docs/index.md @@ -14,4 +14,5 @@ buffered_tracing intercept_table developer_api + getting_started ```