Skip to content

Verify Stream correctness in Barrier operators in cudf #16568

@karthikeyann

Description

@karthikeyann

Description

Barrier operators like CudfHashBuild, CudfHashAggregation, CudfTopN in cudf could accept inputs from multiple streams. If the input streams are not synchronized or not connected to current stream via cuda event by creating a dependency, the results could be wrong and it's hard to debug these issues, similar to multi-threading issues.
So, All Barrier cudf operators should be validated for stream dependency.

Here are Barrier operators

Suggested stream dependency injection:

void streamsWaitForStream(
    CudaEvent& event,
    cudf::host_span<rmm::cuda_stream_view const> streams,
    rmm::cuda_stream_view stream) {
  event.recordFrom(stream);
  std::for_each(
      streams.begin(), streams.end(), [&](auto& strm) { event.waitOn(strm); });
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    cudfcudf related - GPU accelerationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions