-
Notifications
You must be signed in to change notification settings - Fork 269
[CK_BUILDER] Replace reference conv with old ck implementation #3604
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
Conversation
There was a problem hiding this 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 replaces the CK Tile reference convolution implementation with the more comprehensive reference implementation from old CK. The change improves test coverage and adds support for different layouts and non-passthrough elementwise operations.
Changes:
- Replaced CK Tile reference implementation with old CK reference implementation in the reference factory
- Removed "old CK API" methods (MakeArgumentPointer/MakeInvokerPointer) and associated tests
- Simplified
ConvTensorLayoutsinterface to remove redundantSPATIAL_DIMtemplate parameter
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test_reference_instance_traits.cpp | Removed debug console output statements |
| test_reference_execution.cpp | Updated tests to use new reference implementation API, removed old CK interface tests |
| unit_conv_tensor_layout.cpp | Removed SPATIAL_DIM template parameter from ConvTensorLayouts usage |
| conv_fwd.hpp | Updated to use simplified ConvTensorLayouts interface |
| reference_factory.hpp | Replaced implementation to call old CK reference functions, removed old API methods |
| reference_common.hpp | File deleted as it's no longer needed |
| conv_tile_tensor_layout.hpp | Updated template parameters to use SCREAMING_SNAKE_CASE, removed SPATIAL_DIM parameter |
| conv_tensor_layout.hpp | Updated template parameters to use SCREAMING_SNAKE_CASE, removed SPATIAL_DIM parameter |
| Multiple factory files | Updated to use simplified ConvTensorLayouts interface |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
04bcd4b to
a2130d8
Compare
This information is already in the SIGNATURE, so its pointless to pass it separately. This streamlines the interface of those functions a bit. Also touches up the style of those files in general.
a2130d8 to
ff66426
Compare
The old ck implementation is more featureful and better tested.
This strips out the ck-tile gpu reference implementation completely.
- Remove unneccesary messages - Replace EXPECT_TRUE(true) with EXPECT_NO_THROW()
ff66426 to
ae4243b
Compare
|
From above:
We should remove the obsolete reference implementation before it gets used more. Yes, we probably want a CPU reference implementation, but that's very far down on our priorities. Since we have a working GPU reference implementation that we trust, we don't really need a CPU reference unless it helps with debugging updates to the GPU reference. The biggest use case for a CPU reference were if we were on a completely new GPU hardware where we doubted our GPU reference was working correctly, but that's only hypothetical right now. |
I will create a follow up for that. |
Proposed changes
In #3381, reference algorithms were added to CK Tile. But it turns out that there already was a reference implementation in old CK. This PR replaces the reference conv implementation used by CK-Builder by the one from CK for the following reasons:
This is still not a complete reference implementation though (no multi A/B/D support), but we can add that when required.
Details
This mainly just replaces the implementation that is called by the reference convolution factory, but there are a few extra details in this PR that should be noted:
ckt::run()anyway. I also removed the corresponding tests.ConvTensorLayoutsto not require theSPATIAL_DIM. Its passed viaSIGNATUREanyway, so it doesn't make sense to pass it extra. This also cleans up some of the use cases of that type.Open Questions