Skip to content

Commit fec5965

Browse files
Use cuda::stream_ref::sync() for the table-init stream sync (review: bdice)
Replace the CUDF_CUDA_TRY(cudaStreamSynchronize(stream.get())) calls added for stream safety with the idiomatic stream.sync() in all three find_or_initialize lambdas.
1 parent 30d6ce0 commit fec5965

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎cpp/src/strings/utilities.cu‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ character_flags_table_type const* get_character_flags_table(cuda::stream_ref str
110110
// The copy above is asynchronous and the cached pointer is shared across
111111
// callers/streams; synchronize so the table is fully populated before it is
112112
// handed out (first-use only).
113-
CUDF_CUDA_TRY(cudaStreamSynchronize(stream.get()));
113+
stream.sync();
114114
return table;
115115
});
116116
}
@@ -132,7 +132,7 @@ character_cases_table_type const* get_character_cases_table(cuda::stream_ref str
132132
// The copy above is asynchronous and the cached pointer is shared across
133133
// callers/streams; synchronize so the table is fully populated before it is
134134
// handed out (first-use only).
135-
CUDF_CUDA_TRY(cudaStreamSynchronize(stream.get()));
135+
stream.sync();
136136
return table;
137137
});
138138
}
@@ -154,7 +154,7 @@ special_case_mapping const* get_special_case_mapping_table(cuda::stream_ref stre
154154
// The copy above is asynchronous and the cached pointer is shared across
155155
// callers/streams; synchronize so the table is fully populated before it is
156156
// handed out (first-use only).
157-
CUDF_CUDA_TRY(cudaStreamSynchronize(stream.get()));
157+
stream.sync();
158158
return table;
159159
});
160160
}

0 commit comments

Comments
 (0)