[FEA] transpose in epilogue/prologue
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.5k
- Forks
- 2.1k
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 7
Description
Now I'm using cutlass in my project. I found that some cases have constraints to the layout, such as input matrix A and output matrix C should be row major. These kinds of assumption limit the feasibility to add the cutlass gemm kernel directly in my project without transpose kernels. If cutlass can provide examples to show how to fuse the transpose in the epilogue and "prologue" phases, overhead of the transpose kernels will be eliminated.
I did some tests to show the overhead of adding transpose kernels of an MxN matrix on A100-80G:
m = 8, n = 4096, latency = 8.40 us
m = 8, n = 1024, latency = 7.03 us
m = 8, n = 14336, latency = 7.12 us
m = 8, n = 4096, latency = 6.98 us
m = 32, n = 4096, latency = 6.97 us
m = 32, n = 1024, latency = 6.98 us
m = 32, n = 14336, latency = 8.26 us
m = 32, n = 4096, latency = 8.35 us
m = 256, n = 4096, latency = 15.65 us
m = 256, n = 1024, latency = 7.16 us
m = 256, n = 14336, latency = 46.49 us
m = 256, n = 4096, latency = 15.83 us
m = 512, n = 4096, latency = 28.82 us
m = 512, n = 1024, latency = 10.31 us
m = 512, n = 14336, latency = 92.73 us
m = 512, n = 4096, latency = 28.88 us
m = 4096, n = 8, latency = 7.07 us
m = 1024, n = 8, latency = 8.18 us
m = 14336, n = 8, latency = 7.52 us
m = 4096, n = 8, latency = 8.34 us
m = 4096, n = 32, latency = 8.35 us
m = 1024, n = 32, latency = 7.83 us
m = 14336, n = 32, latency = 9.65 us
m = 4096, n = 32, latency = 8.34 us
m = 4096, n = 256, latency = 15.90 us
m = 1024, n = 256, latency = 8.18 us
m = 14336, n = 256, latency = 46.24 us
m = 4096, n = 256, latency = 15.90 us
m = 4096, n = 512, latency = 26.69 us
m = 1024, n = 512, latency = 10.29 us
m = 14336, n = 512, latency = 88.09 us
m = 4096, n = 512, latency = 26.65 us
It can be seen that when m or n is large, e.g. 14336, the transpose kernel hurts the e2e performance of a model.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, entry points, or tests. Start by locating CUTLASS GEMM epilogue and prologue examples, then review how layouts are constrained and how the A100 transpose benchmarks were measured. Done should include documented examples showing fused transpose handling and evidence that the separate transpose overhead is addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100