Skip to content

Commit

Permalink
Move sync around
Browse files Browse the repository at this point in the history
  • Loading branch information
kingcrimsontianyu committed Dec 20, 2024
1 parent 2029eb2 commit 5c47aaa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cpp/src/io/orc/stripe_data.cu
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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; }
}

Expand Down

0 comments on commit 5c47aaa

Please sign in to comment.