CUDA Tutor
Quiz-based tutor that tracks what the user knows and doesn't know at the concept level across the
6 CUDA topics. The goal is to surface blind spots in NVIDIA GPU programming knowledge through
zero-hint questions and rephrased drills on missed concepts.
Prerequisite: Paired Skill
This skill requires a pre-built CUDA StudyVault. If none exists in CWD, tell the user:
"No StudyVault found. Run the cuda-tutor-setup skill first to generate one."
The expected vault layout β produced by cuda-tutor-setup Phase CU9 / C9 / D9 β is described under ## File Structure below.
Curriculum Structure (read once, internalize)
The vault is organized around 6 topics with a fixed prerequisite chain. Session-type selection in Phase 2 below depends on this DAG:
1. CUDA Kernels (foundation)
β
βββββββββββββΌββββββββββββββββββββββββ
βΌ βΌ βΌ
2. CUTLASS 3. cuTile 4. Open GPU Kernel Modules
β β
ββpeerβββββββ
β
ββββββββββββββββββ
βΌ
5. NCCL β 6. NVSHMEM
When the user picks "Follow curriculum order", serve the next unmastered topic in this chain (CUDA Kernels first; never NCCL/NVSHMEM before CUDA Kernels is π©+).
File Structure
StudyVault/
βββ *dashboard* β Compact overview: proficiency table + stats
βββ concepts/
βββ cuda-kernels.md β Per-topic concept tracker
βββ cutlass.md
βββ cutile.md
βββ open-gpu-kernel-modules.md
βββ nccl.md
βββ nvshmem.md
- Dashboard: aggregated numbers only. Links to concept files. Stays small forever.
- Concept files: one per topic. Tracks each concept with attempts / correct / last tested / status / error notes. Bounded growth.
Workflow
Phase 0: Detect Language
Detect the user's language from their message β {LANG}. All quiz prompts, explanations, and file content render in {LANG}. Technical CUDA terms (e.g., cp.async, ncclAllReduce, nvshmem_put) stay verbatim in English regardless of {LANG}.
Phase 1: Discover Vault
- Glob
**/StudyVault/ in the project.
- List section directories β expect numbered topic folders (e.g.,
01-CUDA-Kernels/, 02-CUTLASS/, ...).
- Glob
**/StudyVault/*dashboard* for the dashboard.
- If found, read it. Preserve existing file path regardless of
{LANG}.
- If not found, create from the Dashboard Template below.
- If no StudyVault exists, tell the user to run
cuda-tutor-setup first, then stop.
Phase 2: Ask Session Type
MANDATORY: use AskUserQuestion to let the user pick a session. Read the dashboard proficiency table first, then build context-aware options:
- Unmeasured areas (β¬) exist β include "Diagnostic" targeting those areas (e.g., "Cover the 2 unmeasured topics: cuTile, NVSHMEM").
- Weak areas (π₯/π¨) exist β include "Drill weak areas" naming the weakest topic(s) (e.g., "Drill NCCL β currently π₯ 28%").
- Always include "Choose a topic" so the user can pick any of the 6 topics.
- All areas π©/π¦ β include "Hard-mode review" (hardest difficulty mix).
- If the StudyVault declares a recommended prerequisite chain (it does: CUDA kernels β CUTLASS/cuTile, CUDA kernels β driver, CUDA kernels β NCCL β NVSHMEM), include "Follow curriculum order" which serves the next unmastered topic in the chain.
Header: "Session". Concise option descriptions that list which topics each option targets. No (Recommended) tag. The user MUST select before proceeding.
Phase 3: Build Questions
- Read the markdown files inside the target topic folder(s) of the StudyVault.
- If drilling a weak area: also read
concepts/{topic}.md to find π΄ unresolved concepts β rephrase these in a new context (different API call, different hardware generation, different failure scenario). Never repeat the literal question.
- For cross-topic drill sessions (e.g., NCCL + NVSHMEM): include at least one question that probes the interaction (e.g., "When does it make sense to layer NVSHMEM under NCCL?").
- Craft exactly 4 questions following
references/quiz-rules.md. Cross-stack requirement: if the session covers CUDA Kernels (matmul subset), CUTLASS, or cuTile, at least 1 of the 4 questions MUST be a cross-stack question from references/cross-stack-rosetta.md (Triton equivalent of a CUDA/CUTLASS/cuTile mechanism). The cross-stack question is attributed to its CUDA-side primary topic for proficiency tracking. When this rule and the cross-topic rule in item 3 both apply, the cross-stack question may double-count as the cross-topic question.
CRITICAL: read references/quiz-rules.md before crafting ANY question. Zero hints allowed.
Phase 4: Present Quiz
Use AskUserQuestion:
- 4 questions per round, 4 options each, single-select.
- Header:
"Q1. <β€12-char tag>" (examples: Q1. WarpSched, Q2. CuTeLO, Q3. ncclAlgo, Q4. nvshmemAPI).
- Descriptions: neutral, no hints. Distractors must be plausible CUDA concepts (not absurd).
Phase 5: Grade & Explain
- Show a results table: question / correct answer / user answer / β
or β.
- Wrong answers: concise 1β3 line explanation that names the underlying concept and links the relevant StudyVault note via
[[wiki-link]].
- Map each question to its topic for the file-update phase.
Phase 6: Update Files
1. Update concept file (concepts/{topic}.md)
For each question answered:
- New concept β add row to the concept table. If wrong, also add an error-note entry.
- Existing π΄ concept answered correctly β increment
Attempts and Correct, flip status to π’, keep the error note as learning history.
- Existing π’ concept answered wrong again β increment
Attempts, flip status back to π΄, update the error note.
Concept table format:
| Concept | Attempts | Correct | Last Tested | Status |
|---------|----------|---------|-------------|--------|
| TMA cp.async.bulk vs cp.async | 2 | 1 | 2026-05-15 | π΄ |
Error-note format (only for wrong answers):
### Error Notes
**TMA cp.async.bulk vs cp.async**
- Confusion: user picked cp.async for 2D tiles
- Key point: cp.async.bulk (TMA) handles 1D-5D tensor copies via descriptor; cp.async is per-thread 4/8/16-byte
2. Update dashboard
- Recalculate per-topic stats from the concept files (sum
Attempts and Correct across each topic).
- Update proficiency badges:
- π₯ Weak 0β39%
- π¨ Fair 40β69%
- π© Good 70β89%
- π¦ Mastered 90β100%
- β¬ Unmeasured (no data)
- Update aggregate stats: total questions, cumulative rate, unresolved/resolved counts, weakest/strongest topic.
Dashboard stays compact β no per-session logs, no per-question records.
Dashboard Template
Create when no dashboard exists. Filename localized to {LANG}. Example in English:
# CUDA Learning Dashboard
> Concept-level metacognition tracker for the 6-topic CUDA learning path. See linked files for details.
---
## Proficiency by Topic
| Topic | Correct | Wrong | Rate | Level | Details |
|-------|---------|-------|------|-------|---------|
| 1. CUDA Kernels | 0 | 0 | - | β¬ Unmeasured | [[concepts/cuda-kernels]] |
| 2. CUTLASS | 0 | 0 | - | β¬ Unmeasured | [[concepts/cutlass]] |
| 3. cuTile | 0 | 0 | - | β¬ Unmeasured | [[concepts/cutile]] |
| 4. Open GPU Kernel Modules | 0 | 0 | - | β¬ Unmeasured | [[concepts/open-gpu-kernel-modules]] |
| 5. NCCL | 0 | 0 | - | β¬ Unmeasured | [[concepts/nccl]] |
| 6. NVSHMEM | 0 | 0 | - | β¬ Unmeasured | [[concepts/nvshmem]] |
| **Total** | **0** | **0** | **-** | β¬ Unmeasured | |
> π₯ Weak (0-39%) Β· π¨ Fair (40-69%) Β· π© Good (70-89%) Β· π¦ Mastered (90-100%) Β· β¬ Unmeasured
---
## Stats
- **Total Questions**: 0
- **Cumulative Rate**: -
- **Unresolved Concepts**: 0
- **Resolved Concepts**: 0
- **Weakest Topic**: -
- **Strongest Topic**: -
---
## Curriculum Order
Recommended progression (do not unlock the next tier until the prior is π©+):
1. CUDA Kernels
2. CUTLASS Β· cuTile Β· Open GPU Kernel Modules (parallel tier β all build on CUDA Kernels)
3. NCCL β NVSHMEM (final tier β multi-GPU communication)
Concept File Template
Create per topic when its first question is asked. Example for concepts/cuda-kernels.md:
# CUDA Kernels β Concept Tracker
| Concept | Attempts | Correct | Last Tested | Status |
|---------|----------|---------|-------------|--------|
### Error Notes
(added as concepts are missed)
Important Reminders
- ALWAYS read
references/quiz-rules.md before creating questions.
- NEVER include hints in option labels or descriptions.
- NEVER tag any option with "(Recommended)".
- Randomize the correct answer's position across Q1βQ4.
- Wrong-answer explanations MUST link to the relevant
[[concept note]] in the StudyVault.
- After grading, ALWAYS update both the concept file AND the dashboard.
- Keep technical CUDA identifiers verbatim (
ncclAllReduce, cp.async.bulk, wgmma.mma_async, nvshmem_quiet) even when prose is in another language.
- For cross-topic questions, attribute the concept to the topic that owns the primary mechanism being tested.
- For seed question banks per topic, see
references/cuda-question-bank-seeds.md.
- For exact proficiency-tracking formulas and edge cases, see
references/proficiency-tracking.md.
1---2name: cuda-tutor3description: Interactive quiz tutor for a CUDA StudyVault built by `cuda-tutor-setup`. Delivers 4-question rounds with concept-level proficiency tracking (π₯/π¨/π©/π¦/β¬) across the 6 CUDA learning topics: CUDA kernels (threads/blocks/warps, memory hierarchy, TMA, WGMMA, cp.async), CUTLASS + CuTe (Layout/Stride/Tensor, MMA atoms, GEMM pipelines), cuTile (Python-first tile DSL), open-gpu-kernel-modules (RM, GSP firmware, UVM, kernel-open layout), NCCL (collectives, topology, NVLink-SHARP, transports), and NVSHMEM (PGAS, symmetric heap, IBGDA, on-stream API). Use when the user wants to (1) take a diagnostic CUDA assessment, (2) drill weak GPU concepts, (3) study a specific CUDA topic, (4) review the learning dashboard, or says things like "quiz me on CUDA", "test my CUTLASS knowledge", "drill NCCL", "/cuda-tutor", "ν΄μ¦".4---56# CUDA Tutor78Quiz-based tutor that tracks what the user knows and doesn't know at the **concept level** across the96 CUDA topics. The goal is to surface blind spots in NVIDIA GPU programming knowledge through10zero-hint questions and rephrased drills on missed concepts.1112## Prerequisite: Paired Skill1314This skill **requires a pre-built CUDA StudyVault**. If none exists in CWD, tell the user:1516> "No StudyVault found. Run the `cuda-tutor-setup` skill first to generate one."1718The expected vault layout β produced by `cuda-tutor-setup` Phase CU9 / C9 / D9 β is described under `## File Structure` below.1920## Curriculum Structure (read once, internalize)2122The vault is organized around 6 topics with a fixed prerequisite chain. Session-type selection in Phase 2 below depends on this DAG:2324```25 1. CUDA Kernels (foundation)26 β27 βββββββββββββΌββββββββββββββββββββββββ28 βΌ βΌ βΌ29 2. CUTLASS 3. cuTile 4. Open GPU Kernel Modules30 β β31 ββpeerβββββββ32 β33 ββββββββββββββββββ34 βΌ35 5. NCCL β 6. NVSHMEM36```3738When the user picks "Follow curriculum order", serve the next unmastered topic in this chain (CUDA Kernels first; never NCCL/NVSHMEM before CUDA Kernels is π©+).3940## File Structure4142```43StudyVault/44βββ *dashboard* β Compact overview: proficiency table + stats45βββ concepts/46 βββ cuda-kernels.md β Per-topic concept tracker47 βββ cutlass.md48 βββ cutile.md49 βββ open-gpu-kernel-modules.md50 βββ nccl.md51 βββ nvshmem.md52```5354- **Dashboard**: aggregated numbers only. Links to concept files. Stays small forever.55- **Concept files**: one per topic. Tracks each concept with attempts / correct / last tested / status / error notes. Bounded growth.5657## Workflow5859### Phase 0: Detect Language6061Detect the user's language from their message β `{LANG}`. All quiz prompts, explanations, and file content render in `{LANG}`. Technical CUDA terms (e.g., `cp.async`, `ncclAllReduce`, `nvshmem_put`) stay verbatim in English regardless of `{LANG}`.6263### Phase 1: Discover Vault64651. Glob `**/StudyVault/` in the project.662. List section directories β expect numbered topic folders (e.g., `01-CUDA-Kernels/`, `02-CUTLASS/`, ...).673. Glob `**/StudyVault/*dashboard*` for the dashboard.684. If found, read it. Preserve existing file path regardless of `{LANG}`.695. If not found, create from the Dashboard Template below.706. If no StudyVault exists, tell the user to run `cuda-tutor-setup` first, then stop.7172### Phase 2: Ask Session Type7374**MANDATORY**: use AskUserQuestion to let the user pick a session. Read the dashboard proficiency table first, then build context-aware options:75761. Unmeasured areas (β¬) exist β include **"Diagnostic"** targeting those areas (e.g., "Cover the 2 unmeasured topics: cuTile, NVSHMEM").772. Weak areas (π₯/π¨) exist β include **"Drill weak areas"** naming the weakest topic(s) (e.g., "Drill NCCL β currently π₯ 28%").783. Always include **"Choose a topic"** so the user can pick any of the 6 topics.794. All areas π©/π¦ β include **"Hard-mode review"** (hardest difficulty mix).805. If the StudyVault declares a recommended prerequisite chain (it does: CUDA kernels β CUTLASS/cuTile, CUDA kernels β driver, CUDA kernels β NCCL β NVSHMEM), include **"Follow curriculum order"** which serves the next unmastered topic in the chain.8182Header: `"Session"`. Concise option descriptions that list which topics each option targets. No `(Recommended)` tag. The user MUST select before proceeding.8384### Phase 3: Build Questions85861. Read the markdown files inside the target topic folder(s) of the StudyVault.872. If drilling a weak area: also read `concepts/{topic}.md` to find π΄ unresolved concepts β **rephrase these in a new context** (different API call, different hardware generation, different failure scenario). Never repeat the literal question.883. For cross-topic drill sessions (e.g., NCCL + NVSHMEM): include at least one question that probes the **interaction** (e.g., "When does it make sense to layer NVSHMEM under NCCL?").894. Craft exactly 4 questions following `references/quiz-rules.md`. **Cross-stack requirement**: if the session covers CUDA Kernels (matmul subset), CUTLASS, or cuTile, at least 1 of the 4 questions MUST be a cross-stack question from `references/cross-stack-rosetta.md` (Triton equivalent of a CUDA/CUTLASS/cuTile mechanism). The cross-stack question is attributed to its CUDA-side primary topic for proficiency tracking. When this rule and the cross-topic rule in item 3 both apply, the cross-stack question may double-count as the cross-topic question.9091**CRITICAL**: read `references/quiz-rules.md` before crafting ANY question. Zero hints allowed.9293### Phase 4: Present Quiz9495Use AskUserQuestion:96- 4 questions per round, 4 options each, single-select.97- Header: `"Q1. <β€12-char tag>"` (examples: `Q1. WarpSched`, `Q2. CuTeLO`, `Q3. ncclAlgo`, `Q4. nvshmemAPI`).98- Descriptions: neutral, no hints. Distractors must be plausible CUDA concepts (not absurd).99100### Phase 5: Grade & Explain1011021. Show a results table: question / correct answer / user answer / β
or β.1032. Wrong answers: concise 1β3 line explanation that names the underlying concept and links the relevant StudyVault note via `[[wiki-link]]`.1043. Map each question to its topic for the file-update phase.105106### Phase 6: Update Files107108#### 1. Update concept file (`concepts/{topic}.md`)109110For each question answered:111- **New concept** β add row to the concept table. If wrong, also add an error-note entry.112- **Existing π΄ concept answered correctly** β increment `Attempts` and `Correct`, flip status to π’, keep the error note as learning history.113- **Existing π’ concept answered wrong again** β increment `Attempts`, flip status back to π΄, update the error note.114115Concept table format:116```markdown117| Concept | Attempts | Correct | Last Tested | Status |118|---------|----------|---------|-------------|--------|119| TMA cp.async.bulk vs cp.async | 2 | 1 | 2026-05-15 | π΄ |120```121122Error-note format (only for wrong answers):123```markdown124### Error Notes125126**TMA cp.async.bulk vs cp.async**127- Confusion: user picked cp.async for 2D tiles128- Key point: cp.async.bulk (TMA) handles 1D-5D tensor copies via descriptor; cp.async is per-thread 4/8/16-byte129```130131#### 2. Update dashboard132133- Recalculate per-topic stats from the concept files (sum `Attempts` and `Correct` across each topic).134- Update proficiency badges:135 - π₯ Weak 0β39%136 - π¨ Fair 40β69%137 - π© Good 70β89%138 - π¦ Mastered 90β100%139 - β¬ Unmeasured (no data)140- Update aggregate stats: total questions, cumulative rate, unresolved/resolved counts, weakest/strongest topic.141142Dashboard stays compact β no per-session logs, no per-question records.143144## Dashboard Template145146Create when no dashboard exists. Filename localized to `{LANG}`. Example in English:147148```markdown149# CUDA Learning Dashboard150151> Concept-level metacognition tracker for the 6-topic CUDA learning path. See linked files for details.152153---154155## Proficiency by Topic156157| Topic | Correct | Wrong | Rate | Level | Details |158|-------|---------|-------|------|-------|---------|159| 1. CUDA Kernels | 0 | 0 | - | β¬ Unmeasured | [[concepts/cuda-kernels]] |160| 2. CUTLASS | 0 | 0 | - | β¬ Unmeasured | [[concepts/cutlass]] |161| 3. cuTile | 0 | 0 | - | β¬ Unmeasured | [[concepts/cutile]] |162| 4. Open GPU Kernel Modules | 0 | 0 | - | β¬ Unmeasured | [[concepts/open-gpu-kernel-modules]] |163| 5. NCCL | 0 | 0 | - | β¬ Unmeasured | [[concepts/nccl]] |164| 6. NVSHMEM | 0 | 0 | - | β¬ Unmeasured | [[concepts/nvshmem]] |165| **Total** | **0** | **0** | **-** | β¬ Unmeasured | |166167> π₯ Weak (0-39%) Β· π¨ Fair (40-69%) Β· π© Good (70-89%) Β· π¦ Mastered (90-100%) Β· β¬ Unmeasured168169---170171## Stats172173- **Total Questions**: 0174- **Cumulative Rate**: -175- **Unresolved Concepts**: 0176- **Resolved Concepts**: 0177- **Weakest Topic**: -178- **Strongest Topic**: -179180---181182## Curriculum Order183184Recommended progression (do not unlock the next tier until the prior is π©+):1851861. CUDA Kernels1872. CUTLASS Β· cuTile Β· Open GPU Kernel Modules (parallel tier β all build on CUDA Kernels)1883. NCCL β NVSHMEM (final tier β multi-GPU communication)189```190191## Concept File Template192193Create per topic when its first question is asked. Example for `concepts/cuda-kernels.md`:194195```markdown196# CUDA Kernels β Concept Tracker197198| Concept | Attempts | Correct | Last Tested | Status |199|---------|----------|---------|-------------|--------|200201### Error Notes202203(added as concepts are missed)204```205206## Important Reminders207208- ALWAYS read `references/quiz-rules.md` before creating questions.209- NEVER include hints in option labels or descriptions.210- NEVER tag any option with "(Recommended)".211- Randomize the correct answer's position across Q1βQ4.212- Wrong-answer explanations MUST link to the relevant `[[concept note]]` in the StudyVault.213- After grading, ALWAYS update both the concept file AND the dashboard.214- Keep technical CUDA identifiers verbatim (`ncclAllReduce`, `cp.async.bulk`, `wgmma.mma_async`, `nvshmem_quiet`) even when prose is in another language.215- For cross-topic questions, attribute the concept to the topic that owns the **primary** mechanism being tested.216- For seed question banks per topic, see `references/cuda-question-bank-seeds.md`.217- For exact proficiency-tracking formulas and edge cases, see `references/proficiency-tracking.md`.