Skip to content

Reduction Kernels locked to 1 block #175

Description

@jplauzie

Hi,

I was poking about the existing reduction kernels for #171 . It seems like in reduce.cu and cudalaunch.hpp, the reduction kernels seem to be hard locked to only use a single block (256 threads):

  dim3 gridDims(1);
  cudaStream_t s0 = getCudaStream();
  kernelfunction<<<gridDims, blockDims, 0, s0>>>(args...);

Is this intended/known bug? (Maybe left over from trying to debug the cudamemcpyasyncs?). This would be a pretty large performance penalty for reductions. For something like standardproblem3 or hysteresis which is all minimizes, it's something like ~45%, and probably scales with larger grid sizes. For any dynamic sims, the effect is probably smaller since the FFT kernels will dominate.

(There are some other potential optimizations in terms of things like warp shuffles as well, but that is probably better suited for a PR)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions