Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 18, 2025

The forward layer norm kernel was using THREADS_PER_WARP without declaring it as a local enum, causing build failures after clang-format was applied.

Changes

  • Added missing enum { THREADS_PER_WARP = Ktraits::THREADS_PER_WARP }; declaration in ln_fwd_kernel to match the pattern used in ln_bwd_kernel

The constant was referenced at lines 36, 37, and 42 but never brought into local scope from the Ktraits template parameter.

template <typename Ktraits>
__global__ __launch_bounds__(Ktraits::THREADS_PER_CTA) void ln_fwd_kernel(FwdParams params) {
  enum { ROWS_PER_CTA = Ktraits::ROWS_PER_CTA };
  // ... other enums ...
  enum { THREADS_PER_WARP = Ktraits::THREADS_PER_WARP };  // Added
  enum { CTAS_PER_ROW = Ktraits::CTAS_PER_ROW };

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: crcrpar <16191443+crcrpar@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback on GitHub Actions workflow for pre-commit checks Fix undefined THREADS_PER_WARP in ln_fwd_kernels.cuh Nov 18, 2025
Copilot AI requested a review from crcrpar November 18, 2025 18:24
@crcrpar crcrpar closed this Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants