[DOC] Wrong stride in Layout Algebra docs, composition worked example
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 92/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- documentation
Research direction
Open media/docs/cpp/cute/02_layout_algebra.md and read the Computing Composition section around the (3,6,2,8) / 72 example. Confirm the stride tuple against the rule and the provided Python verification, then correct the third entry from 4x to 4y and check that the rendered documentation reflects the change.
Written by the indexing model from the issue text.
Description
Report incorrect documentation
Location of incorrect documentation
media/docs/cpp/cute/02_layout_algebra.md.
https://docs.nvidia.com/cutlass/latest/media/docs/cpp/cute/02_layout_algebra.html
Describe the problems or issues found in the documentation
In the example in the Computing Composition section, The third entry in the resulting stride tuple is written as 4*x, but it should be 4*y. Each entry in the result is supposed to be the residue multiplied by the corresponding mode's original stride which is y for the third residue, since the strides of A are (w, x, y, z). This is likely just a typo.
Steps taken to verify documentation is incorrect
Re-derived the residues for (3,6,2,8) / 72 mode-by-mode using the rule described earlier in the same section. This result can be verified with:
import cutlass.cute as cute
@cute.jit
def check():
# Pick (w,x,y,z) = (1,3,18,36) so that x and y are DIFFERENT numbers.
A = cute.make_layout((3, 6, 2, 8), stride=(1, 3, 18, 36))
R = cute.composition(A, cute.make_layout(4, stride=72))
cute.printf("R = {}", R) # prints: 4:72
cute.printf("strides = {}", R.stride) # prints: 72
check()
# Then the third stride lets us tell the two predictions apart:
print("old = (72, 72, 12, 72) # 4*x = 4*3 = 12")
print("fixed = (72, 72, 72, 72) # 4*y = 4*18 = 72")
Suggested fix for documentation.
Change:
... produces
(72*w,24*x,4*x,2*z)as the strides of the strided layout.
to:
... produces
(72*w,24*x,4*y,2*z)as the strides of the strided layout
- Dominant language
- C++
- Stars
- 10.5k
- Forks
- 2.1k
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 7
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.
More from NVIDIA/cutlass
-
CUTLASS C++
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
CUTLASS C++
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
CUTLASS C++
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
CUTLASS C++
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
CUTLASS C++
Difficulty 1/5 Under an hour Newbie friendliness 91/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
infiniflow/infinity#3502 ·