Skip to content

Commit bc7a930

Browse files
tbirdsomocsharpzhijinlmaximilianofir
authored
Tutorial: Add tutorial on just-in-time Holoscan debugging (#433)
* Tutorial: Add tutorial on just-in-time Holoscan debugging Adds a tutorial to walk through setting up just-in-time debugging with GDB or `pdb` debugging tools for a Holoscan SDK application using HoloHub infrastructure. Includes scripts for runnable examples illustrating just-in-time debugging. Streamlined instructions for v2.3 rely on debugging symbols to be distributed in the Holoscan SDK NGC development container, while general instructions for <=v2.2 are also included. Signed-off-by: Tom Birdsong <tbirdsong@nvidia.com> * Add legacy build patch Signed-off-by: Tom Birdsong <tbirdsong@nvidia.com> * Corrections for Python debugging with GDB/PDB Signed-off-by: Tom Birdsong <tbirdsong@nvidia.com> * Fix: Check in v2.2 Vulkan patch for tutorial Signed-off-by: Tom Birdsong <tbirdsong@nvidia.com> * Apply review comments co-authored-by: Victor Chang <vicchang@nvidia.com> Signed-off-by: Tom Birdsong <tbirdsong@nvidia.com> * Rename to `cli_debugging` Rename to differentiate from IDE-based debugging (VSCode) Signed-off-by: Tom Birdsong <tbirdsong@nvidia.com> * Address review comments co-authored-by: Zhijin Li <zhijinl@nvidia.com> Signed-off-by: Tom Birdsong <tbirdsong@nvidia.com> * Address review feedback Co-authored-by: Maximillian Ofir <maxofir@nvidia.com> Signed-off-by: Tom Birdsong <tbirdsong@nvidia.com> --------- Signed-off-by: Tom Birdsong <tbirdsong@nvidia.com> Co-authored-by: Victor Chang <vicchang@nvidia.com> Co-authored-by: Zhijin Li <zhijinl@nvidia.com> Co-authored-by: Maximillian Ofir <maxofir@nvidia.com>
1 parent 05ff702 commit bc7a930

File tree

9 files changed

+809
-1
lines changed

9 files changed

+809
-1
lines changed

dev_container

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ launch() {
591591
conditional_opt+=" --cap-add=SYS_ADMIN"
592592
fi
593593

594-
# when using a locally built Holoscan SDK container it is necessary to provide the path to Holsocan SDK
594+
# when using a locally built Holoscan SDK container it is necessary to provide the path to Holoscan SDK
595595
# to map Holoscan SDK into the container for building Holohub
596596
local local_sdk_opt="";
597597

tutorials/cli_debugging/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tmp/

tutorials/cli_debugging/Dockerfile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# syntax=docker/dockerfile:1
2+
3+
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
18+
ARG BASE_IMAGE
19+
FROM ${BASE_IMAGE} as base
20+
21+
# Install Debian packages
22+
# Note: ffmpeg is not required for debugging and is not used in the tutorial.
23+
# However, some configurations of the Endoscopy Tool Tracking app rely on ffmpeg.
24+
# This avoids a build error in the case that the Endoscopy Tool Tracking build directory
25+
# is not clean before the tutorial runs.
26+
RUN apt update && \
27+
apt install --no-install-recommends -y \
28+
gdb \
29+
ffmpeg
30+
31+
ENV PYTHONPATH=/opt/nvidia/holoscan/python/lib:/workspace/holohub/benchmarks/holoscan_flow_benchmarking:/usr/share/gdb/python

tutorials/cli_debugging/README.md

Lines changed: 383 additions & 0 deletions
Large diffs are not rendered by default.

tutorials/cli_debugging/debug_gdb.sh

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#!/usr/bin/bash
2+
# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
set -e
17+
18+
# This script runs the Endsocopy Tool Tracking application for interactive debugging with GDB.
19+
# Usage: ./debug_gdb.sh [build_type:debug,rel-debug,release] [language:cpp,python]
20+
21+
build_type=${1:-debug}
22+
language=${2:-cpp}
23+
24+
SCRIPT_DIR=$(dirname $(realpath $0))
25+
HOLOHUB_ROOT=$(realpath "${SCRIPT_DIR}/../..")
26+
tmp_dir=$(pwd)/tmp/cli_debugging
27+
mkdir -p ${tmp_dir}
28+
29+
# Build the tutorial container with GDB
30+
${HOLOHUB_ROOT}/dev_container build \
31+
--img holohub:debugging \
32+
--docker_file ${SCRIPT_DIR}/Dockerfile \
33+
--base_img nvcr.io/nvidia/clara-holoscan/holoscan:v2.3.0-dgpu
34+
35+
# Build the Endoscopy Tool Tracking application with debugging symbols
36+
${HOLOHUB_ROOT}/dev_container launch \
37+
--img holohub:debugging \
38+
-- ./run build endoscopy_tool_tracking ${language} --type ${build_type}
39+
40+
# Launch GDB with the Endoscopy Tool Tracking application
41+
if [[ "${language}" == "cpp" ]]; then
42+
${HOLOHUB_ROOT}/dev_container launch \
43+
--img holohub:debugging \
44+
--docker_opts "--security-opt seccomp=unconfined" \
45+
-- bash -c '\
46+
export PYTHONPATH=/opt/nvidia/holoscan/python/lib:/workspace/holohub/benchmarks/holoscan_flow_benchmarking:/usr/share/gdb/python && \
47+
cd /workspace/holohub/build/endoscopy_tool_tracking && \
48+
gdb \
49+
-ex "break main" \
50+
-ex "run --data /workspace/holohub/data/endoscopy" \
51+
-ex "break /workspace/holoscan-sdk/src/core/fragment.cpp:add_flow" \
52+
/workspace/holohub/build/endoscopy_tool_tracking/applications/endoscopy_tool_tracking/cpp/endoscopy_tool_tracking';
53+
54+
else
55+
${HOLOHUB_ROOT}/dev_container launch \
56+
--img holohub:debugging \
57+
--docker_opts "--security-opt seccomp=unconfined" \
58+
-- bash -c '\
59+
export PYTHONPATH=${PYTHONPATH}:/opt/nvidia/holoscan/lib/cmake/holoscan/../../../python/lib:/workspace/holohub/build/endoscopy_tool_tracking/python/lib:/workspace/holohub:/usr/share/gdb/python && \
60+
cd /workspace/holohub/build/endoscopy_tool_tracking && \
61+
gdb -ex "break /workspace/holoscan-sdk/src/core/fragment.cpp:add_flow" \
62+
-ex "run" \
63+
--args python3 \
64+
/workspace/holohub/applications/endoscopy_tool_tracking/python/endoscopy_tool_tracking.py \
65+
--data /workspace/holohub/data/endoscopy';
66+
fi
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#!/usr/bin/bash
2+
# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
set -e
17+
18+
# This script builds Holoscan SDK with debug symbols and runs the Endoscopy Tool Tracking application with GDB.
19+
# Usage: ./debug_legacy.sh [build_type:debug,rel-debug,release]
20+
21+
build_type=${1:-rel-debug}
22+
holoscan_sdk_tag="v2.2.0"
23+
holoscan_image="nvcr.io/nvidia/clara-holoscan/holoscan:v2.2.0-dgpu"
24+
25+
SCRIPT_DIR=$(dirname $(realpath $0))
26+
HOLOHUB_ROOT=$(realpath "${SCRIPT_DIR}/../..")
27+
tmp_dir=${SCRIPT_DIR}/tmp/cli_debugging
28+
mkdir -p ${tmp_dir}
29+
30+
# Download and build Holoscan SDK
31+
pushd ${tmp_dir}
32+
if [ ! -d holoscan-sdk ]; then
33+
git clone git@github.com:nvidia-holoscan/holoscan-sdk.git
34+
fi
35+
cd holoscan-sdk
36+
git checkout ${holoscan_sdk_tag}
37+
# Apply patch to fix broken Vulkan SDK source
38+
# https://github.com/nvidia-holoscan/holoscan-sdk/issues/30
39+
git reset --hard HEAD
40+
git apply ${SCRIPT_DIR}/holoscan_sdk_20240723_1.diff
41+
./run build --type $build_type
42+
INSTALL_DIR=$(realpath $(find . -type d -name "install-*"))
43+
popd
44+
45+
# Build the tutorial container with GDB
46+
${HOLOHUB_ROOT}/dev_container build \
47+
--img holohub:debugging \
48+
--docker_file ${SCRIPT_DIR}/Dockerfile \
49+
--base_img ${holoscan_image}
50+
51+
# Build the Endoscopy Tool Tracking application with debugging symbols
52+
${HOLOHUB_ROOT}/dev_container launch \
53+
--docker_opts "-v ${INSTALL_DIR}:/opt/nvidia/holoscan" \
54+
--img holohub:debugging \
55+
-- bash -c "./run build endoscopy_tool_tracking --type ${build_type}"
56+
57+
# Launch GDB with the Endoscopy Tool Tracking application
58+
${HOLOHUB_ROOT}/dev_container launch \
59+
--docker_opts "-v ${INSTALL_DIR}:/opt/nvidia/holoscan --security-opt seccomp=unconfined" \
60+
--img holohub:debugging \
61+
-- bash -c \
62+
'cd /workspace/holohub/build/endoscopy_tool_tracking && \
63+
gdb -q \
64+
-ex "break main" \
65+
-ex "run --data /workspace/holohub/data/endoscopy" \
66+
-ex "break /workspace/holoscan-sdk/src/core/application.cpp:add_flow" \
67+
/workspace/holohub/build/endoscopy_tool_tracking/applications/endoscopy_tool_tracking/cpp/endoscopy_tool_tracking'

tutorials/cli_debugging/debug_pdb.sh

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/usr/bin/bash
2+
# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
set -e
17+
18+
# This script runs the Endsocopy Tool Tracking application for interactive debugging with pdb.
19+
# Usage: ./debug_pdb.sh [build_type:debug,rel-debug,release]
20+
21+
build_type=${1:-debug}
22+
23+
SCRIPT_DIR=$(dirname $(realpath $0))
24+
HOLOHUB_ROOT=$(realpath "${SCRIPT_DIR}/../..")
25+
tmp_dir=$(pwd)/tmp/cli_debugging
26+
mkdir -p ${tmp_dir}
27+
28+
# Build the tutorial container with GDB
29+
${HOLOHUB_ROOT}/dev_container build \
30+
--img holohub:debugging \
31+
--docker_file ${SCRIPT_DIR}/Dockerfile \
32+
--base_img nvcr.io/nvidia/clara-holoscan/holoscan:v2.3.0-dgpu
33+
34+
# Build the Endoscopy Tool Tracking application with debugging symbols
35+
${HOLOHUB_ROOT}/dev_container launch \
36+
--img holohub:debugging \
37+
-- ./run build endoscopy_tool_tracking python --type ${build_type}
38+
39+
# # Launch PDB with the Endoscopy Tool Tracking application
40+
${HOLOHUB_ROOT}/dev_container launch \
41+
--img holohub:debugging \
42+
-- bash -c '\
43+
export PYTHONPATH=${PYTHONPATH}:/opt/nvidia/holoscan/lib/cmake/holoscan/../../../python/lib:/workspace/holohub/build/endoscopy_tool_tracking/python/lib:/workspace/holohub && \
44+
cd /workspace/holohub/build/endoscopy_tool_tracking && \
45+
python -m pdb \
46+
/workspace/holohub/applications/endoscopy_tool_tracking/python/endoscopy_tool_tracking.py \
47+
--data /workspace/holohub/data/endoscopy'
Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
diff --git a/Dockerfile b/Dockerfile
2+
index 5366c8ab7..4f32f0213 100644
3+
--- a/Dockerfile
4+
+++ b/Dockerfile
5+
@@ -23,7 +23,6 @@
6+
ARG ONNX_RUNTIME_VERSION=1.15.1_23.08
7+
ARG LIBTORCH_VERSION=2.1.0_23.08
8+
ARG TORCHVISION_VERSION=0.16.0_23.08
9+
-ARG VULKAN_SDK_VERSION=1.3.216.0
10+
ARG GRPC_VERSION=1.54.2
11+
ARG UCX_VERSION=1.15.0
12+
ARG GXF_VERSION=4.0_20240409_bc03d9d
13+
@@ -123,29 +122,6 @@ RUN ARCH=$(uname -m) && if [ "$ARCH" = "aarch64" ]; then ARCH="${ARCH}-${GPU_TYP
14+
RUN mkdir -p ${TORCHVISION_VERSION}
15+
RUN tar -xf torchvision.tgz -C ${TORCHVISION_VERSION} --strip-components 1
16+
17+
-############################################################
18+
-# Vulkan SDK
19+
-#
20+
-# Use the SDK because we need the newer Vulkan headers and the newer shader compiler than provided
21+
-# by the Ubuntu deb packages. These are compile time dependencies, we still use the Vulkan loaded
22+
-# and the Vulkan validation layer as runtime components provided by Ubuntu packages because that's
23+
-# what the user will have on their installations.
24+
-############################################################
25+
-FROM build-tools as vulkansdk-builder
26+
-ARG VULKAN_SDK_VERSION
27+
-
28+
-WORKDIR /opt/vulkansdk
29+
-
30+
-# Note there is no aarch64 binary version to download, therefore for aarch64 we also download the x86_64 version which
31+
-# includes the source. Then remove the binaries and e7ab9314build the aarch64 version from source.
32+
-RUN curl -S -# -O -L https://sdk.lunarg.com/sdk/download/${VULKAN_SDK_VERSION}/linux/vulkansdk-linux-x86_64-${VULKAN_SDK_VERSION}.tar.gz
33+
-RUN tar -xzf vulkansdk-linux-x86_64-${VULKAN_SDK_VERSION}.tar.gz
34+
-RUN if [ $(uname -m) = "aarch64" ]; then \
35+
- cd ${VULKAN_SDK_VERSION} \
36+
- && rm -rf x86_64 \
37+
- && ./vulkansdk shaderc glslang headers; \
38+
- fi
39+
-
40+
############################################################
41+
# gRPC libraries and binaries
42+
############################################################
43+
@@ -275,18 +251,6 @@ ENV TORCHVISION=/opt/torchvision/${TORCHVISION_VERSION}
44+
COPY --from=torchvision-downloader ${TORCHVISION} ${TORCHVISION}
45+
ENV CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}:${TORCHVISION}"
46+
47+
-# Copy Vulkan SDK
48+
-ARG VULKAN_SDK_VERSION
49+
-ENV VULKAN_SDK=/opt/vulkansdk/${VULKAN_SDK_VERSION}
50+
-COPY --from=vulkansdk-builder ${VULKAN_SDK}/x86_64/ ${VULKAN_SDK}
51+
-# We need to use the headers and shader compiler of the SDK but want to link against the
52+
-# Vulkan loader provided by the Ubuntu package. Therefore create a link in the SDK directory
53+
-# pointing to the system Vulkan loader library.
54+
-RUN rm -f ${VULKAN_SDK}/lib/libvulkan.so* \
55+
- && ln -s /lib/$(uname -m)-linux-gnu/libvulkan.so.1 ${VULKAN_SDK}/lib/libvulkan.so
56+
-ENV PATH="${PATH}:${VULKAN_SDK}/bin"
57+
-ENV CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}:${VULKAN_SDK}"
58+
-
59+
# Copy gRPC
60+
ARG GRPC_VERSION
61+
ENV GRPC=/opt/grpc/${GRPC_VERSION}
62+
@@ -327,8 +291,8 @@ RUN install -m 0755 -d /etc/apt/keyrings \
63+
# valgrind - static analysis
64+
# xvfb - testing on headless systems
65+
# libx* - X packages
66+
-# libvulkan1 - for Vulkan apps (Holoviz)
67+
-# vulkan-validationlayers, spirv-tools - for Vulkan validation layer (enabled for Holoviz in debug mode)
68+
+# libvulkan-dev, glslang-tools - for Vulkan apps (Holoviz)
69+
+# vulkan-validationlayers - for Vulkan validation layer (enabled for Holoviz in debug mode)
70+
# libwayland-dev, libxkbcommon-dev, pkg-config - GLFW compile dependency for Wayland support
71+
# libdecor-0-plugin-1-cairo - GLFW runtime dependency for Wayland window decorations
72+
# libegl1 - to run headless Vulkan apps
73+
@@ -349,9 +313,9 @@ RUN apt-get update \
74+
libxi-dev="2:1.8-*" \
75+
libxinerama-dev="2:1.1.4-*" \
76+
libxrandr-dev="2:1.5.2-*" \
77+
- libvulkan1="1.3.204.1-*" \
78+
+ libvulkan-dev="1.3.204.1-*" \
79+
+ glslang-tools="11.8.0+1.3.204.0-*" \
80+
vulkan-validationlayers="1.3.204.1-*" \
81+
- spirv-tools="2022.1+1.3.204.0-*" \
82+
libwayland-dev="1.20.0-*" \
83+
libxkbcommon-dev="1.4.0-*" \
84+
pkg-config="0.29.2-*" \
85+
diff --git a/modules/holoviz/src/glfw_window.cpp b/modules/holoviz/src/glfw_window.cpp
86+
index a2eaec0c1..6d40e5a5b 100644
87+
--- a/modules/holoviz/src/glfw_window.cpp
88+
+++ b/modules/holoviz/src/glfw_window.cpp
89+
@@ -261,7 +261,9 @@ vk::SurfaceKHR GLFWWindow::create_surface(vk::PhysicalDevice physical_device,
90+
VkSurfaceKHR surface;
91+
const vk::Result result =
92+
vk::Result(glfwCreateWindowSurface(instance, impl_->window_, nullptr, &surface));
93+
- vk::resultCheck(result, "Failed to create glfw window surface");
94+
+ if (result != vk::Result::eSuccess) {
95+
+ vk::throwResultException(result, "Failed to create glfw window surface");
96+
+ }
97+
return surface;
98+
}
99+
100+
diff --git a/modules/holoviz/src/vulkan/vulkan_app.cpp b/modules/holoviz/src/vulkan/vulkan_app.cpp
101+
index b398cf97c..d91db9da9 100644
102+
--- a/modules/holoviz/src/vulkan/vulkan_app.cpp
103+
+++ b/modules/holoviz/src/vulkan/vulkan_app.cpp
104+
@@ -1333,7 +1333,7 @@ void Vulkan::Impl::cleanup_transfer_jobs() {
105+
106+
it->fence_triggered_ = true;
107+
} else if (result != vk::Result::eNotReady) {
108+
- vk::resultCheck(result, "Failed to get upload fence status");
109+
+ vk::throwResultException(result, "Failed to get upload fence status");
110+
}
111+
}
112+
113+
@@ -1351,7 +1351,7 @@ void Vulkan::Impl::cleanup_transfer_jobs() {
114+
it = next;
115+
continue;
116+
} else if (result != vk::Result::eNotReady) {
117+
- vk::resultCheck(result, "Failed to get frame fence status");
118+
+ vk::throwResultException(result, "Failed to get frame fence status");
119+
}
120+
} else {
121+
// this is a stale transfer buffer (no end_transfer_pass()?), remove it
122+
@@ -1382,7 +1382,7 @@ void Vulkan::Impl::prepare_frame() {
123+
if (result != vk::Result::eSuccess) {
124+
// This allows Aftermath to do things and exit below
125+
usleep(1000);
126+
- vk::resultCheck(result, "Failed to wait for frame fences");
127+
+ vk::throwResultException(result, "Failed to wait for frame fences");
128+
exit(-1);
129+
}
130+
131+
@@ -1414,7 +1414,9 @@ void Vulkan::Impl::submit_frame() {
132+
133+
const vk::Result result =
134+
vk::Result(nvvk_.batch_submission_.execute(wait_fences_[image_index].get(), 0b0000'0001));
135+
- vk::resultCheck(result, "Failed to execute bach submission");
136+
+ if (result != vk::Result::eSuccess) {
137+
+ vk::throwResultException(result, "Failed to execute bach submission");
138+
+ }
139+
140+
// Presenting frame
141+
fb_sequence_.present(queue_gct_);
142+
@@ -2514,7 +2516,7 @@ void Vulkan::Impl::read_framebuffer(ImageFormat fmt, uint32_t width, uint32_t he
143+
if (result != vk::Result::eSuccess) {
144+
// This allows Aftermath to do things and exit below
145+
usleep(1000);
146+
- vk::resultCheck(result, "Failed to wait for frame fences");
147+
+ vk::throwResultException(result, "Failed to wait for frame fences");
148+
exit(-1);
149+
}
150+
151+
@@ -2569,7 +2571,9 @@ void Vulkan::Impl::read_framebuffer(ImageFormat fmt, uint32_t width, uint32_t he
152+
// submit the command buffer
153+
const vk::Result result =
154+
vk::Result(nvvk_.batch_submission_.execute(read_job.fence_.get(), 0b0000'0001));
155+
- vk::resultCheck(result, "Failed to execute bach submission");
156+
+ if (result != vk::Result::eSuccess) {
157+
+ vk::throwResultException(result, "Failed to execute bach submission");
158+
+ }
159+
160+
// copy the buffer to CUDA memory
161+
{

0 commit comments

Comments
 (0)