Skip to content

Tiny index fix#1

Merged
jph00 merged 1 commit into
gpu-mode:mainfrom
lancerts:patch-1
Jan 28, 2024
Merged

Tiny index fix#1
jph00 merged 1 commit into
gpu-mode:mainfrom
lancerts:patch-1

Conversation

@lancerts

@lancerts lancerts commented Jan 28, 2024

Copy link
Copy Markdown
Contributor

Fix the indices typo.
If tpb.x = tbp.y and blocks.x = blocks.y wrt the following code from def matmul_2d(m, n):

    tpb = ns(x=16,y=16)
    blocks = ns(x=math.ceil(w/tpb.x), y=math.ceil(h/tpb.y))

then the original way gives the correct result (otherwise not).

fix the indices typo.
If tpb.x = tbp.y and blocks.x = blocks.y, then the original way gives the correct result. Otherwise, not correct.
```
    tpb = ns(x=16,y=16)
    blocks = ns(x=math.ceil(w/tpb.x), y=math.ceil(h/tpb.y))
```
@lancerts lancerts changed the title Update pmpp.ipynb Tiny index fix Jan 28, 2024
@jph00 jph00 merged commit 0429593 into gpu-mode:main Jan 28, 2024
@jph00

jph00 commented Jan 28, 2024

Copy link
Copy Markdown
Member

Many thanks!

jhonprice pushed a commit to jhonprice/gpumode-lectures that referenced this pull request Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants