# \#gpu\_puzzle

**URL:** https://forum.modular.com/tag/gpu-puzzle/33.md

[Latest](https://forum.modular.com/latest.md) · [Categories](https://forum.modular.com/categories.md) · [Tags](https://forum.modular.com/tags.md)

---

## [Puzzle 32 shared memory data race](https://forum.modular.com/t/puzzle-32-shared-memory-data-race/3063)

<div class="topic-metadata">

**Author:** [@BeastBritish](https://forum.modular.com/u/BeastBritish)\
**Replies:** 1\
**Last updated:** [May 12, 2026, 7:50pm UTC](https://forum.modular.com/t/puzzle-32-shared-memory-data-race/3063 "2026-05-12T19:50:35Z")

</div>

In Puzzle 32: Bank Conflicts, the two-way conflict kernel doesn’t always pass the test: $ mojo problems/p32/p32.mojo --test Testing bank conflict kernels... No-conflict kernel test: passed Two-way conflict kernel test: …

---

## [Puzzle 29 Barriers](https://forum.modular.com/t/puzzle-29-barriers/3043)

<div class="topic-metadata">

**Author:** [@BeastBritish](https://forum.modular.com/u/BeastBritish)\
**Replies:** 1\
**Last updated:** [May 8, 2026, 7:04pm UTC](https://forum.modular.com/t/puzzle-29-barriers/3043 "2026-05-08T19:04:11Z")

</div>

Should all threads be synchronized after the barrier initialization and before participating in the barrier just like in an Nvidia Asynchronous Barriers example https://docs.nvidia.com/cuda/cuda-programming-guide/04-spe…

---

## [Mojo Puzzles fail to compile on a supported architecture (apple M2)](https://forum.modular.com/t/mojo-puzzles-fail-to-compile-on-a-supported-architecture-apple-m2/3008)

<div class="topic-metadata">

**Author:** [@abahrani](https://forum.modular.com/u/abahrani)\
**Replies:** 6\
**Last updated:** [April 29, 2026, 9:52pm UTC](https://forum.modular.com/t/mojo-puzzles-fail-to-compile-on-a-supported-architecture-apple-m2/3008 "2026-04-29T21:52:29Z")

</div>

@debugging Hi everyone I have just started solving “Mojo GPU Puzzles”. However, I failed to compile puzzle 1 with this error. /Users/\<user\>/mojo-gpu-puzzles/problems/p01/p01.mojo:24:5: error: function instantiation fa…

---

## [How can I get the Mojo VS Code extension to work?](https://forum.modular.com/t/how-can-i-get-the-mojo-vs-code-extension-to-work/2888)

<div class="topic-metadata">

**Author:** [@leandrolcampos](https://forum.modular.com/u/leandrolcampos)\
**Replies:** 3\
**Last updated:** [March 31, 2026, 9:18am UTC](https://forum.modular.com/t/how-can-i-get-the-mojo-vs-code-extension-to-work/2888 "2026-03-31T09:18:10Z")

</div>

Hi everyone, I have not been able to get the Mojo VS Code extension to work properly. For example, when I hover over a symbol, I do not get the expected documentation popup. I first tried installing the extension from …

---

## [Make 'mut' keyword work for GPU function parameters](https://forum.modular.com/t/make-mut-keyword-work-for-gpu-function-parameters/2812)

<div class="topic-metadata">

**Author:** [@laranzu](https://forum.modular.com/u/laranzu)\
**Replies:** 14\
**Last updated:** [March 17, 2026, 10:47am UTC](https://forum.modular.com/t/make-mut-keyword-work-for-gpu-function-parameters/2812 "2026-03-17T10:47:52Z")

</div>

For reasons I haven’t been able to do anything with Mojo for a few months. Today I decided to catch up with what’s new, install the latest Mojo, and make sure my Julia set generator in Mojo for CPU and GPU still ran. (ht…

---

## [\[Proposal\] Korean Translation of Mojo GPU Puzzles](https://forum.modular.com/t/proposal-korean-translation-of-mojo-gpu-puzzles/2643)

<div class="topic-metadata">

**Author:** [@gzu](https://forum.modular.com/u/gzu)\
**Replies:** 10\
**Last updated:** [February 19, 2026, 1:56pm UTC](https://forum.modular.com/t/proposal-korean-translation-of-mojo-gpu-puzzles/2643 "2026-02-19T13:56:25Z")

</div>

I’m really into puzzles.modular.com and have made a few contributions to the repo. I pitched this idea to @Ehsan and he encouraged me to share it with the community, so here it is! I’m planning to translate the puzzles …

---

## [Custom MultiHead Self Attention Transformer Training Phase using AMD RX 9070 XT 16GB. Python/Pythorch Vs Mojo](https://forum.modular.com/t/custom-multihead-self-attention-transformer-training-phase-using-amd-rx-9070-xt-16gb-python-pythorch-vs-mojo/2633)

<div class="topic-metadata">

**Author:** [@Andrea](https://forum.modular.com/u/Andrea)\
**Replies:** 6\
**Last updated:** [February 7, 2026, 4:57pm UTC](https://forum.modular.com/t/custom-multihead-self-attention-transformer-training-phase-using-amd-rx-9070-xt-16gb-python-pythorch-vs-mojo/2633 "2026-02-07T16:57:48Z")

</div>

I wrote a program in python that uses the pytorch package that performs the four steps to build an LLM and use it. Preparation of the data corpus. Training on unsupervised data (wikipedia dump). Training on supervised …

---

## [GPU puzzles mental model](https://forum.modular.com/t/gpu-puzzles-mental-model/2442)

<div class="topic-metadata">

**Author:** [@AffableHoneyBadger](https://forum.modular.com/u/AffableHoneyBadger)\
**Replies:** 3\
**Last updated:** [November 13, 2025, 9:46pm UTC](https://forum.modular.com/t/gpu-puzzles-mental-model/2442 "2025-11-13T21:46:53Z")

</div>

Spoiler alert: I’m asking a question which references the solution to puzzle 4: 2D Map from the Modular puzzle exercises Modular’s puzzle series is my first time working with any sort of GPU programming. I’ve been read…

---

## [Question on LayoutTenson mut parameter](https://forum.modular.com/t/question-on-layouttenson-mut-parameter/2438)

<div class="topic-metadata">

**Author:** [@antonl2219](https://forum.modular.com/u/antonl2219)\
**Replies:** 3\
**Last updated:** [November 10, 2025, 5:07pm UTC](https://forum.modular.com/t/question-on-layouttenson-mut-parameter/2438 "2025-11-10T17:07:05Z")

</div>

Hello, I’m confused about the way mut parameter works in LayoutTensor. For example in gpu puzzle 16 ( and others) the out\_tensor is declared in main with mut=False but in the parameter list of the kernel functions mut=…

---

## [Question regarding \`copy\_dram\_to\_sram\_async\` in Puzzle 16 MatMul](https://forum.modular.com/t/question-regarding-copy-dram-to-sram-async-in-puzzle-16-matmul/2375)

<div class="topic-metadata">

**Author:** [@m4nhb4nhq](https://forum.modular.com/u/m4nhb4nhq)\
**Replies:** 1\
**Last updated:** [October 16, 2025, 11:32am UTC](https://forum.modular.com/t/question-regarding-copy-dram-to-sram-async-in-puzzle-16-matmul/2375 "2025-10-16T11:32:25Z")

</div>

Hi everyone. I’m a beginer trying to learn about GPU programming with Mojo. In Puzzle 16 it is suggested to use the following code to load data from global memory to shared memory alias load\_a\_layout = Layout.row\_major…

---

## [Directly pixi run fails on apple, but success via pixi shell](https://forum.modular.com/t/directly-pixi-run-fails-on-apple-but-success-via-pixi-shell/2330)

<div class="topic-metadata">

**Author:** [@phybd44](https://forum.modular.com/u/phybd44)\
**Replies:** 4\
**Last updated:** [October 4, 2025, 11:56am UTC](https://forum.modular.com/t/directly-pixi-run-fails-on-apple-but-success-via-pixi-shell/2330 "2025-10-04T11:56:00Z")

</div>

I try to run puzzles via pixi pixi shell mojo run solutions/p01/p01.mojo mojo run solutions/p02/p02.mojo But direct run pixi run p01 -e apple will got below error /Users/posheng\_chang/Work/work\_modular/mojo-gpu-puzz…

---

## [Puzzle 23. Why use strided loading of tiles?](https://forum.modular.com/t/puzzle-23-why-use-strided-loading-of-tiles/2322)

<div class="topic-metadata">

**Author:** [@cudawarped](https://forum.modular.com/u/cudawarped)\
**Replies:** 4\
**Last updated:** [October 3, 2025, 11:08pm UTC](https://forum.modular.com/t/puzzle-23-why-use-strided-loading-of-tiles/2322 "2025-10-03T23:08:38Z")

</div>

In Puzzle 23 the tiling approach is proposed to increase cache locality. This approach swaps the coalesced global memory access used in the elementwise approach for striped uncoalesced global memory access. Is the point…

---

## [Puzzle 23 CUDA SIMD load, store and basic ops](https://forum.modular.com/t/puzzle-23-cuda-simd-load-store-and-basic-ops/2319)

<div class="topic-metadata">

**Author:** [@cudawarped](https://forum.modular.com/u/cudawarped)\
**Replies:** 1\
**Last updated:** [October 3, 2025, 10:16pm UTC](https://forum.modular.com/t/puzzle-23-cuda-simd-load-store-and-basic-ops/2319 "2025-10-03T22:16:57Z")

</div>

In the solution to Puzzle 23 the simple add function is supposed to load and store SIMD\_WIDTH values at a time and perform SIMD addition in one instruction on those values if available. Currently it perfoms the loads, s…

---

## [CUDA\_ERROR\_ILLEGAL\_ADDRESS when running p19 solution of mojo-gpu-puzzles](https://forum.modular.com/t/cuda-error-illegal-address-when-running-p19-solution-of-mojo-gpu-puzzles/1993)

<div class="topic-metadata">

**Author:** [@marsmxm](https://forum.modular.com/u/marsmxm)\
**Replies:** 1\
**Last updated:** [July 20, 2025, 3:41pm UTC](https://forum.modular.com/t/cuda-error-illegal-address-when-running-p19-solution-of-mojo-gpu-puzzles/1993 "2025-07-20T15:41:50Z")

</div>

cd solutions/p19 pixi run python p19.py then: Puzzle 19: Mojo Embedding Kernel Comparison ====================================================================== Configuration: B=8, L=512, V=10000, E=512 --------------…

---

## [GPU puzzle challenge - Softmax multistage](https://forum.modular.com/t/gpu-puzzle-challenge-softmax-multistage/1944)

<div class="topic-metadata">

**Author:** [@dolewhip](https://forum.modular.com/u/dolewhip)\
**Replies:** 1\
**Last updated:** [July 12, 2025, 7:34pm UTC](https://forum.modular.com/t/gpu-puzzle-challenge-softmax-multistage/1944 "2025-07-12T19:34:11Z")

</div>

I was looking at puzzle 16 And did the challenge 1.1, 1.2 I did a multi stage and an online\_softmax. Didn’t do the two pass but saw it in the max kernels. maybe later do a two pass etc. Have fun

---

## [Tiled Matrix Multiplication Puzzle](https://forum.modular.com/t/tiled-matrix-multiplication-puzzle/1888)

<div class="topic-metadata">

**Author:** [@ajinkya](https://forum.modular.com/u/ajinkya)\
**Replies:** 2\
**Last updated:** [July 4, 2025, 12:28am UTC](https://forum.modular.com/t/tiled-matrix-multiplication-puzzle/1888 "2025-07-04T00:28:20Z")

</div>

I am going through the GPU puzzles and currently on the matrix tiling problem. https://puzzles.modular.com/puzzle\_14/tiled.html#tile-processing-steps I don’t understand the need to the second barrier after computing tile…
