From a4e1550521235621ba5b98a1a5803bb1559a1500 Mon Sep 17 00:00:00 2001 From: Michael Strecke Date: Thu, 7 Aug 2025 11:47:19 +0200 Subject: [PATCH] Fix race condition --- .../gxf/foundationpose/foundationpose_render.cu | 3 +++ 1 file changed, 3 insertions(+) diff --git a/isaac_ros_gxf_extensions/gxf_isaac_foundationpose/gxf/foundationpose/foundationpose_render.cu b/isaac_ros_gxf_extensions/gxf_isaac_foundationpose/gxf/foundationpose/foundationpose_render.cu index 3b992d7..cdc64d2 100644 --- a/isaac_ros_gxf_extensions/gxf_isaac_foundationpose/gxf/foundationpose/foundationpose_render.cu +++ b/isaac_ros_gxf_extensions/gxf_isaac_foundationpose/gxf/foundationpose/foundationpose_render.cu @@ -233,6 +233,9 @@ __global__ void pose_clip_kernel_fused( result = matrix_vec_mul4x4(shared_bbox, result); *transformed_matrix = result; + + // Make sure all threads have read the shared memory before thread 0 writes to it in the next iteration + __syncthreads(); } }