Skip to content
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

Fix LSU bug. #778

Merged
merged 1 commit into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tensilelite/Tensile/Components/GlobalWriteBatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -1225,6 +1225,11 @@ def _emitNonatomicAdd(self, module: Module):
else:
gradientInput = self.ss.elementSumIdx[elementIdx]
enableValuC = True
if self.kernel["LocalSplitU"] > 1:
# When LSU > 1, the VGPRs are from LSU output.
# the elementSumIdx has indicated the VGPRs from LSU.
# Don't use the ValuC prefix here.
enableValuC = False
if self.kernel["ActivationFuncCall"]:
if (activationCDataType == self.kernel["ProblemType"]["DestDataType"]) and \
(activationCDataType != self.kernel["ProblemType"]["ComputeDataType"]) and ((self.kernel["ProblemType"]["UseScaleCD"] == False) or (self.kernel["ProblemType"]["UseScaleAlphaVec"] == False)):
Expand Down
9 changes: 8 additions & 1 deletion tensilelite/Tensile/Tests/common/gemm/lsu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ BenchmarkProblems:
- GlobalSplitU: [1,2,9]
- GlobalSplitUAlgorithm: ["MultipleBuffer", "MultipleBufferSingleKernel"]
- SourceSwap: [0, 1]
- ActivationFuncCall: [0, 1]
BenchmarkJoinParameters:
BenchmarkFinalParameters:
- ProblemSizes:
Expand All @@ -409,6 +410,9 @@ BenchmarkProblems:
TransposeB: 0
UseBeta: True
Batched: True
Activation: True
ActivationHPA: True
UseScaleAlphaVec: True
- # BenchmarkProblemSizeGroup - Standard - All problem
InitialSolutionParameters:
BenchmarkCommonParameters:
Expand Down Expand Up @@ -450,7 +454,10 @@ BenchmarkProblems:
- GlobalSplitU: [1]
- GlobalSplitUAlgorithm: ["MultipleBuffer"]
- SourceSwap: [1]
- ActivationFuncCall: [0, 1]
BenchmarkJoinParameters:
BenchmarkFinalParameters:
- ProblemSizes:
- Exact: [128, 128, 1, 128]
- Exact: [128, 128, 1, 128]
- ActivationArgs:
- [Enum: tanh]