Skip to content

[Kernel][Build/CI] Bump CUTLASS to 3.8 and add initializers for cutlass epilogues #13797

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 26, 2025

Conversation

henrylhtsang
Copy link
Contributor

@henrylhtsang henrylhtsang commented Feb 25, 2025

The original code was added in #9855. I am seeing errors like

cutlass_extensions/epilogue/scaled_mm_epilogues_c3x.hpp:149:194: error: missing initializer for member ‘cutlass::epilogue::fusion::detail::Sm90VisitorImplBase<cutlass::epilogue::fusion::Sm90RowOrScalarBroadcast<0, cute::tuple<cute::C<128>, cute::C<128>, cute::C<128> >, float, cute::tuple<cute::C<0>, cute::C<1>, cute::C<0> >, 4>, cutlass::epilogue::fusion::Sm90AccFetch, cutlass::epilogue::fusion::Sm90Compute<cutlass::multiplies, float, float, cutlass::FloatRoundStyle::round_to_nearest, void> >::Arguments::op_2’ [-Werror=missing-field-initializers]
cutlass_extensions/epilogue/scaled_mm_epilogues_c3x.hpp:150:38: error: missing initializer for member ‘cutlass::epilogue::fusion::detail::Sm90VisitorImplBase<cutlass::epilogue::fusion::Sm90ColOrScalarBroadcast<0, cute::tuple<cute::C<128>, cute::C<128>, cute::C<128> >, float, cute::tuple<cute::C<1>, cute::C<0>, cute::C<0> >, 4>, cutlass::epilogue::fusion::Sm90TreeVisitor<cutlass::epilogue::fusion::Sm90Compute<cutlass::multiplies, float, float, cutlass::FloatRoundStyle::round_to_nearest, void>, cutlass::epilogue::fusion::Sm90RowOrScalarBroadcast<0, cute::tuple<cute::C<128>, cute::C<128>, cute::C<128> >, float, cute::tuple<cute::C<0>, cute::C<1>, cute::C<0> >, 4>, cutlass::epilogue::fusion::Sm90AccFetch>, cutlass::epilogue::fusion::Sm90Compute<cutlass::multiplies, cutlass::half_t, float, cutlass::FloatRoundStyle::round_to_nearest, void> >::Arguments::op_2’ [-Werror=missing-field-initializers]
  150 |     return ArgumentType{a_args, evt0_args};
      |                                      ^

when I moved to cutlass 3.8. I think it is due to https://github.com/NVIDIA/cutlass/blob/main/include/cute/atom/mma_traits_sm100.hpp#L49-L52, which are newly added for 3.8.

From my setup, this change works. Feel free to suggest other changes that can help resolve the errors and/or tests to do before merging.

Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

🚀

@henrylhtsang henrylhtsang changed the title add initializer for arguments for cutlass kernels [cutlass kernel] add initializer for arguments for cutlass kernels Feb 25, 2025
@henrylhtsang
Copy link
Contributor Author

@LucasWilkinson any idea?

Copy link
Collaborator

@tlrmchlsmth tlrmchlsmth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix looks good. Exact same change is in #13798, but maybe this one lands first as it's smaller.

Go ahead and update CUTLASS to 3.8 in this PR?

@henrylhtsang
Copy link
Contributor Author

The fix looks good. Exact same change is in #13798, but maybe this one lands first as it's smaller.

Go ahead and update CUTLASS to 3.8 in this PR?

Thanks, it is this one right?

GIT_TAG v3.7.0

btw noob question: why does the order of arguments seem to not matter? For example, for

  using EVTCompute0 =
      cutlass::epilogue::threadblock::Sm80EVT<Compute0, ScaleB, Accum>;

shouldn't it be

    typename EVTCompute0::Arguments evt0_args{{}, b_args, {}};

?

@mergify mergify bot added the ci/build label Feb 25, 2025
@jwfromm
Copy link

jwfromm commented Feb 25, 2025

I think the argument order should matter and needs to be:

{argument 0, argument 1, operator}

In this case argument 0 is ScaleB, argument 1 is the accumulator (represented by {}) and argument 2 is multiplies (also represented by {}). so {b_args, {}, {}} is correct.

@henrylhtsang
Copy link
Contributor Author

I think the argument order should matter and needs to be:

{argument 0, argument 1, operator}

In this case argument 0 is ScaleB, argument 1 is the accumulator (represented by {}) and argument 2 is multiplies (also represented by {}). so {b_args, {}, {}} is correct.

Thanks Josh. also sharing the source https://github.com/NVIDIA/cutlass/blob/eefa171318b79cbe2e78514d4cce5cd0fe919d0c/include/cutlass/epilogue/fusion/sm90_callbacks_tma_warpspecialized.hpp#L57-L58

template <class NodeOp, class... ChildOps>
struct Sm90TreeVisitor : Sm90VisitorImpl<ChildOps..., NodeOp> {

@henrylhtsang
Copy link
Contributor Author

So I think this should be good to land

@tlrmchlsmth tlrmchlsmth changed the title [cutlass kernel] add initializer for arguments for cutlass kernels [Kernel][Build/CI] Bump CUTLASS to 3.8 and add initializers for cutlass epilogues Feb 25, 2025
@tlrmchlsmth tlrmchlsmth enabled auto-merge (squash) February 25, 2025 20:00
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Feb 25, 2025
@simon-mo simon-mo merged commit 094b7d9 into vllm-project:main Feb 26, 2025
71 of 75 checks passed
Akshat-Tripathi pushed a commit to krai/vllm that referenced this pull request Mar 3, 2025
lulmer pushed a commit to lulmer/vllm that referenced this pull request Apr 7, 2025
shreyankg pushed a commit to shreyankg/vllm that referenced this pull request May 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/build ready ONLY add when PR is ready to merge/full CI is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants