Skip to content

Conversation

@zsotakal
Copy link

A collection of several depthwise convolution related improvements.

Proposed changes

The list of todos came from the investigation of 2d convolution performance on fp32 data input. It turns out CK has limited support for merged group convolutions. The purpose of this PR is to add some of the missing functionality.

  • Added merged groups implementation for backward data convolution in 2d and 3d.
  • Added new instances for fp32 bit fwd convolution with merge group sizes 2 and 4
  • Added missing instances for fp32 wrw convolution
  • Added tuned instances bwd data convolution

Checklist

Please put an x into the boxes that apply. You can also fill these out after creating the PR. If you're not sure, please don't hesitate to ask.

  • I have added tests relevant to the introduced functionality, and the unit tests are passing locally
  • I have added the test to REGRESSION_TESTS list defined at the top of CMakeLists.txt in tests/CMakeLists.txt, IF the test takes more than 30 seconds to run.
  • I have added inline documentation which enables the maintainers with understanding the motivation
  • I have removed the stale documentation which is no longer relevant after this pull request
  • (If this change is user-facing) I have added release notes which provide the end users with a brief summary of the improvement from this pull request
  • I have run clang-format on all changed files
  • Any dependent changes have been merged

Discussion

If this is a relatively large or complex change, feel free to start a discussion by explaining why you chose the solution you did and what alternatives you considered

@zsotakal zsotakal force-pushed the streamhpc/conv_mergegroups_updates branch from 706ca76 to 6fe2eaa Compare December 18, 2025 10:36
Comment on lines +594 to +596
// implement on demand
static_assert(NumGroupsToMerge == 1);

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a message that merge group doesn't support GNHWK?

Comment on lines +611 to +613
// implement on demand
static_assert(NumGroupsToMerge == 1);

Copy link
Contributor

Choose a reason for hiding this comment

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

Same here and in the other parts

Sequence<3>{},
Sequence<4>{}));

#if CK_USE_CUSTOM_TENSOR_TRANSFORM_FOR_BWD_DATA_OUT == 0
Copy link
Contributor

Choose a reason for hiding this comment

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

what's the purpose of this?

index_t Ho,
index_t Wo,
index_t K,
[[maybe_unused]] index_t YDot,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this needed?

}
};

/**
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a way to avoid duplication with the struct above? Afaik, these functions are only used in two places, so I would recommend to always call the MG variant and to have a defalut value (and ignore the GStep return value) to avoid duplicating the rest of the logic

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants