fix: dot/schedule_bench A_stride_m for transpose_a kernels#10004
Open
kasper0406 wants to merge 1 commit intogoogle:masterfrom
Open
fix: dot/schedule_bench A_stride_m for transpose_a kernels#10004kasper0406 wants to merge 1 commit intogoogle:masterfrom
kasper0406 wants to merge 1 commit intogoogle:masterfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Correctly supply the A stride for transpose_a kernels
ad4dea5 to
d49a1b5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
schedule_benchwas passinga_stride_m(the{i, tile_k}intra-row stride) as the 6th positional arg to kernels that setdot_flag::transpose_a, but for those kernels the 6th arg is consumed as the stride along the k1 dimension of the packed tensor (the advance per inner-k step)subgraph/dot.cc::call_kernelalready does the correct swap (transposed_a ? a_k_strides[0] : a_stride_m). This change mirrors it inschedule_benchso the bench exercises the same work the production path executesc == keverywhere) can't catch this class of bug because the wrong-stride loads still return 1s. Benchmark GFLOPS numbers reported against this bench were inflated by artificial cache hits on overlapping readsTest plan
bazel test //ynnpack/kernels/dot/...passes (includingschedule_bench_test,schedule_test,consistent_arithmetic_test,test)