Tracing reduce, scan, sort in CUB: Looking for Algorithm-Level Insights #4496
-
After tracing the code to understand how the I found that the This, in turn, is defined in
The
I kept tracing further, but I haven’t found a clear or intuitive view of how the I understand that many optimizations are applied, but I was wondering if there’s a central piece of the implementation that outlines the core algorithm used for reduction. If I’ve missed something important or traced the wrong direction, I’d really appreciate your guidance. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Thank you for expressing your interest in exploring CUB's codebase, @Wilson1211! Implementation DetailsI can understand that the CUB dispatch mechanism can be overwhelming at times to developers that are new to CUB's codebase. You will find the implementation details in the Call TraceI think the next step in the call trace is:
The call trace of CUB's dispatch mechanism is outlined in the Dispatch Layer section of CUB's Developer Overview - that may be a good starting point for you. For
|
Beta Was this translation helpful? Give feedback.
Thank you for expressing your interest in exploring CUB's codebase, @Wilson1211!
Implementation Details
I can understand that the CUB dispatch mechanism can be overwhelming at times to developers that are new to CUB's codebase. You will find the implementation details in the
Agent*
of the respective algorithm, e.g.,AgentReduce
incub/agent/agent_reduce.cuh
.Call Trace
I think the next step in the call trace is:
The call trace of CUB's dispatch mechanism is outlined in the Dispatch Layer section of CUB's Developer Overview - that may be a good starting point for you.
For
DeviceReduce
…