-
Notifications
You must be signed in to change notification settings - Fork 271
[CK_TILE] Add irregular tail vectorloads pipeline #3606
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -63,6 +63,22 @@ CK_TILE_DEVICE auto load_tile_with_elementwise(const TileWindow_& tile_window, | |||||
| tile_window, elementwise, number<i_access>{}, bool_constant<oob_conditional_check>{}); | ||||||
| } | ||||||
|
|
||||||
| template <typename TileWindow_, | ||||||
| typename ElementWise_, | ||||||
| index_t i_access = -1, | ||||||
| bool oob_conditional_check = true> | ||||||
| CK_TILE_DEVICE auto | ||||||
| load_tile_with_elementwise_vectorload1(const TileWindow_& tile_window, | ||||||
| ElementWise_ elementwise, | ||||||
| number<i_access> = {}, | ||||||
| bool_constant<oob_conditional_check> = {}) | ||||||
| { | ||||||
| // TODO: Tile windows should works with unknow number of params | ||||||
| // Load element_wise API works only when the input typle is a tuple-type | ||||||
|
||||||
| // Load element_wise API works only when the input typle is a tuple-type | |
| // Load element_wise API works only when the input tuple is a tuple-type |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -421,6 +421,19 @@ struct UniversalGemmKernel | |
| return false; | ||
| } | ||
|
|
||
| if(GemmPipeline::GetPipelineName() == "COMPUTE_V7") | ||
| { | ||
| if(GemmPipeline::kPadK == false || GemmPipeline::kPadM == false || | ||
| GemmPipeline::kPadN == false) | ||
| { | ||
| if(ck_tile::EnvIsEnabled(CK_TILE_ENV(CK_TILE_LOGGING))) | ||
| { | ||
| CK_TILE_ERROR("Compute pipeline v7 needs all paddings enabled!"); | ||
| } | ||
| return false; | ||
| } | ||
| } | ||
|
|
||
| const auto vectorSizeA = is_wave32() ? GemmPipeline::template GetVectorSizeA<true>() | ||
| : GemmPipeline::template GetVectorSizeA<false>(); | ||
| bool AsTensorIsValid = {true}; | ||
|
|
@@ -439,7 +452,7 @@ struct UniversalGemmKernel | |
| } | ||
| AsTensorIsValid = false; | ||
| } | ||
| if(kargs.K % vectorSizeA != 0) | ||
| if(kargs.K % vectorSizeA != 0 && GemmPipeline::GetPipelineName() != "COMPUTE_V7") | ||
|
||
| { | ||
| const auto remainder = kargs.K % vectorSizeA; | ||
| constexpr ck_tile::index_t APackedSize = | ||
|
|
@@ -471,7 +484,7 @@ struct UniversalGemmKernel | |
| } | ||
| AsTensorIsValid = false; | ||
| } | ||
| if(kargs.M % vectorSizeA != 0) | ||
| if(kargs.M % vectorSizeA != 0 && GemmPipeline::GetPipelineName() != "COMPUTE_V7") | ||
| { | ||
| const auto remainder = kargs.M % vectorSizeA; | ||
| constexpr ck_tile::index_t APackedSize = | ||
|
|
@@ -511,7 +524,7 @@ struct UniversalGemmKernel | |
| } | ||
| BsTensorIsValid = false; | ||
| } | ||
| if(kargs.N % vectorSizeB != 0) | ||
| if(kargs.N % vectorSizeB != 0 && GemmPipeline::GetPipelineName() != "COMPUTE_V7") | ||
| { | ||
| const auto remainder = kargs.N % vectorSizeB; | ||
| constexpr ck_tile::index_t BPackedSize = | ||
|
|
@@ -544,7 +557,8 @@ struct UniversalGemmKernel | |
| } | ||
| BsTensorIsValid = false; | ||
| } | ||
| if(kargs.K % vectorSizeB != 0) | ||
| if(kargs.K % vectorSizeB != 0 && | ||
| GemmPipeline::GetPipelineName() != "COMPUTE_V7") | ||
| { | ||
| const auto remainder = kargs.K % vectorSizeB; | ||
| constexpr ck_tile::index_t BPackedSize = | ||
|
|
||
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.
Corrected spelling of 'unknow' to 'unknown' and grammar 'works' to 'work'.