Fix discrepancy in a_stride_m/a_stride_k for transposed dot kernels#9840
Open
copybara-service[bot] wants to merge 1 commit intomasterfrom
Open
Fix discrepancy in a_stride_m/a_stride_k for transposed dot kernels#9840copybara-service[bot] wants to merge 1 commit intomasterfrom
copybara-service[bot] wants to merge 1 commit intomasterfrom
Conversation
Currently, the stride of k for transposed kernels (passed as a_stride_m because this is the row dimension when A is transposed) is the stride of tile_k values of k. This is inconsistent, because the stride is not for one value of k, which we assume in several places. This leads to multiplying or dividing strides to make them consistent. In particular, `run_dot` multiplies the stride by k, while kernels do not, which means we can't use the same stride for both `run_dot` and a kernel. This discrepancy is preventing refactoring `run_dot` to capture the strides to pass to the kernels easily, which I think is a necessary step towards addressing some issues (packing A/B in the loops of `run_dot`). PiperOrigin-RevId: 892702737
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.
Fix discrepancy in a_stride_m/a_stride_k for transposed dot kernels
Currently, the stride of k for transposed kernels (passed as a_stride_m because this is the row dimension when A is transposed) is the stride of tile_k values of k. This is inconsistent, because the stride is not for one value of k, which we assume in several places. This leads to multiplying or dividing strides to make them consistent.
In particular,
run_dotmultiplies the stride by k, while kernels do not, which means we can't use the same stride for bothrun_dotand a kernel. This discrepancy is preventing refactoringrun_dotto capture the strides to pass to the kernels easily, which I think is a necessary step towards addressing some issues (packing A/B in the loops ofrun_dot).