Skip to content

Commit

Permalink
Add RenderDoc integration (#41)
Browse files Browse the repository at this point in the history
Add RenderDoc integration

Use the RenderDoc API programmatically start a capture. We need this
because uVkCompute does not present any frames and frame-oriented tools
do not know when to start on their own.

The initial implementation supports linux only. The RenderDoc header is
vendored under `/third_party`.

RenderDoc capture is enabled with a new `--enable_renderdoc` flag. This
is coarse-grained: we start a single capture for all of the benchmarks,
so you may want to combine it with a `--benchmark_filter` to profile only
some configurations of interest.
In the future we may want to make it more fine-grained, e.g., per
registered benchmark, but I was not able to find a clean way to hook
into the loop over the final benchmark list.

Note that this transitively enables RGP (Radeon GPU Profiler) support,
although without instruction timing.
  • Loading branch information
kuhar authored Nov 3, 2023
1 parent 3049af9 commit e5af042
Show file tree
Hide file tree
Showing 6 changed files with 832 additions and 2 deletions.
2 changes: 2 additions & 0 deletions third_party/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ add_subdirectory(abseil-cpp EXCLUDE_FROM_ALL)
set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE)
set(BENCHMARK_ENABLE_INSTALL OFF CACHE BOOL "" FORCE)
add_subdirectory(benchmark EXCLUDE_FROM_ALL)

add_subdirectory(renderdoc)
17 changes: 17 additions & 0 deletions third_party/renderdoc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2023 Advanced Micro Devices, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

add_library(renderdoc INTERFACE)

target_include_directories(renderdoc INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/..")
Loading

0 comments on commit e5af042

Please sign in to comment.