⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@bartekxk
Copy link
Contributor

Proposed changes

Please describe the motivation behind the pull request, whether it enables a new feature or fixes a bug. If there are associated pull requests or issues, please link them to the pull request.

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

@bartekxk bartekxk force-pushed the barkocot/basic-v1-interwave branch from 94ea368 to 4010341 Compare January 20, 2026 13:48
@afagaj afagaj requested a review from Copilot January 20, 2026 22:10
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new interwave pipeline implementation for GEMM operations in the CK Tile library. The changes refactor the existing pipeline code to support multiple scheduling strategies (Intrawave and Interwave) through template specialization.

Changes:

  • Introduces GemmPipelineScheduler::Interwave specialization for GemmPipelineAGmemBGmemCRegV1
  • Refactors pipeline implementations to use a common base class (GemmPipelineAgBgCrImplBase)
  • Adds validation utilities with configurable tolerance values and max error tracking
  • Updates profiler output to include maximum error information

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
profiler/include/profiler/grouped_convolution_forward_tile_algs.hpp Adds max error reporting to validation output
include/ck_tile/ops/gemm/pipeline/gemm_pipeline_agmem_bgmem_creg_v2.hpp Refactors V2 pipeline to use base class and extract window creation logic
include/ck_tile/ops/gemm/pipeline/gemm_pipeline_agmem_bgmem_creg_v1.hpp Adds Interwave scheduler specialization and refactors V1 pipeline structure
experimental/builder/include/ck_tile/builder/testing/validation.hpp Adds tolerance getter functions and max error tracking to validation
example/ck_tile/20_grouped_convolution/conv_configs.hpp Adds pipeline type trait definitions for BASIC_V1 and BASIC_V2

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +41 to +43
else if constexpr(DataType::FP16== DT)

{
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

Missing space before == operator and unnecessary blank line. Should be DataType::FP16 == DT on line 41, and remove the blank line 42.

Copilot uses AI. Check for mistakes.
Comment on lines +46 to +48
else if constexpr(DataType::BF16 == DT)

{
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

Unnecessary blank line between the condition and opening brace. Remove line 47 for consistency.

Copilot uses AI. Check for mistakes.
// {
// return 1e-6;
// }
else if constexpr(DataType::FP16== DT)
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

Missing space before == operator. Should be DataType::FP16 == DT.

Copilot uses AI. Check for mistakes.

auto d_error_count = &reinterpret_cast<uint64_t*>(d_counters.get())[0];
auto d_zero_count = &reinterpret_cast<uint64_t*>(d_counters.get())[1];
auto d_max_error = &reinterpret_cast<double*>(d_counters.get())[2];
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

Incorrect pointer arithmetic. The buffer contains two uint64_t values followed by a double, so the offset calculation is wrong. Index [2] treats the buffer as an array of doubles, but the first 16 bytes are uint64_t values. Should calculate the byte offset correctly or cast to the appropriate type at the correct position.

Suggested change
auto d_max_error = &reinterpret_cast<double*>(d_counters.get())[2];
auto d_max_error =
reinterpret_cast<double*>(static_cast<char*>(d_counters.get()) + 2 * sizeof(uint64_t));

Copilot uses AI. Check for mistakes.
.wrong_elements = error_count,
.total_elements = descriptor.get_element_size(),
.zero_elements = zero_count,
.max_error= max_error,
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

Missing space before = operator. Should be .max_error = max_error,.

Copilot uses AI. Check for mistakes.
@bartekxk bartekxk closed this Jan 21, 2026
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