From 5c47aaa387478a826648e8f792346e27923e6cb0 Mon Sep 17 00:00:00 2001 From: Tianyu Liu Date: Fri, 20 Dec 2024 15:51:55 -0500 Subject: [PATCH] Move sync around --- cpp/src/io/orc/stripe_data.cu | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cpp/src/io/orc/stripe_data.cu b/cpp/src/io/orc/stripe_data.cu index cfc8ca90c20..675169ca782 100644 --- a/cpp/src/io/orc/stripe_data.cu +++ b/cpp/src/io/orc/stripe_data.cu @@ -212,6 +212,8 @@ class run_cache_manager { auto const tid = threadIdx.x; + __syncthreads(); + // All threads in the block always take a uniform code path for the following branches. // _reusable_length ranges between [0, 512]. if (_reusable_length > 0) { @@ -220,11 +222,8 @@ class run_cache_manager { auto const src_idx = tid + length_to_skip; cache = src[src_idx]; } - // Block until all writes are done to safely change _status. - __syncthreads(); if (tid == 0) { _status = status::CAN_READ_FROM_CACHE; } } else { - __syncthreads(); if (tid == 0) { _status = status::DISABLED; } }