Add multilingual language and systems learning tracks

This commit is contained in:
Admin committed 2026-11-01 15:46:21 +08:00
1 parent 07338189fc
commit d8d1c40118
844 files changed
+6061

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
# CPU/GPU Core & Memory Mapping · 3
[Agila University track](https://edu.agilaos.com/track.php?track=30&lang=en)
About 15 minutes per lesson. Predict, run, change, explain, then complete the check in University.
- [Lesson 1: GPU buffers and transfer cost](lesson-1/lesson.html)
- [Lesson 2: Coalescing and shared workgroup memory](lesson-2/lesson.html)
- [Lesson 3: Synchronization and buffer ownership](lesson-3/lesson.html)
+6
View File
@@ -0,0 +1,6 @@
<!doctype html><html lang="en"><meta charset="utf-8"><title>GPU buffers and transfer cost</title><h1>GPU buffers and transfer cost</h1><p>15-minute session: read for 3 minutes, trace for 3, experiment for 7, and complete the check for 2. Spend longer whenever you need.</p><p>Discrete GPUs often have device memory separate from host RAM. Uploads, downloads, launch overhead, and synchronization can dominate a small kernel. Unified memory changes the API but does not make movement free. Pinned host memory is a limited resource. The sample uses explicitly hypothetical timings; it illustrates accounting, not hardware performance.</p><p><strong>Practice and evidence:</strong> Predict the example or draw its state transitions. Change one assumption, test the boundary, and record the actual result. Explain what this small model does not establish about a production system.</p><pre><code class="language-python">cpu_ms=8
upload_ms,kernel_ms,download_ms=5,2,4
print(&quot;Hypothetical GPU total:&quot;,upload_ms+kernel_ms+download_ms)
print(&quot;Hypothetical CPU total:&quot;,cpu_ms)
</code></pre><p><strong>Expected result:</strong> <code>Hypothetical GPU total: 11
Hypothetical CPU total: 8</code></p><h3>Practice and evidence</h3><p>Keep three notes: your prediction, the actual result, and why they match or differ. The completion check grades understanding; the practice task builds skill.</p><p><a href="https://git.agilaos.com/matt/open_agx">Language reference: git.agilaos.com</a></p><p><a href="https://docs.nvidia.com/cuda/cuda-c-best-practices-guide/">Language reference: docs.nvidia.com</a></p></html>
+4
View File
@@ -0,0 +1,4 @@
cpu_ms=8
upload_ms,kernel_ms,download_ms=5,2,4
print("Hypothetical GPU total:",upload_ms+kernel_ms+download_ms)
print("Hypothetical CPU total:",cpu_ms)
+7
View File
@@ -0,0 +1,7 @@
<!doctype html><html lang="en"><meta charset="utf-8"><title>Coalescing and shared workgroup memory</title><h1>Coalescing and shared workgroup memory</h1><p>15-minute session: read for 3 minutes, trace for 3, experiment for 7, and complete the check for 2. Spend longer whenever you need.</p><p>GPU lanes accessing adjacent elements can allow efficient memory transactions. Workgroup-shared memory may reduce repeated global reads, but it consumes a limited resource and requires correct synchronization. Names and details vary across CUDA, Metal, Vulkan, and other APIs. Draw which lane reads which element before changing data layout; validate the output after every layout change.</p><p><strong>Practice and evidence:</strong> Predict the example or draw its state transitions. Change one assumption, test the boundary, and record the actual result. Explain what this small model does not establish about a production system.</p><pre><code class="language-python">lanes=4
contiguous=[lane for lane in range(lanes)]
strided=[lane*16 for lane in range(lanes)]
print(contiguous)
print(strided)
</code></pre><p><strong>Expected result:</strong> <code>[0, 1, 2, 3]
[0, 16, 32, 48]</code></p><h3>Practice and evidence</h3><p>Keep three notes: your prediction, the actual result, and why they match or differ. The completion check grades understanding; the practice task builds skill.</p><p><a href="https://git.agilaos.com/matt/open_agx">Language reference: git.agilaos.com</a></p><p><a href="https://docs.nvidia.com/cuda/cuda-c-best-practices-guide/">Language reference: docs.nvidia.com</a></p></html>
+5
View File
@@ -0,0 +1,5 @@
lanes=4
contiguous=[lane for lane in range(lanes)]
strided=[lane*16 for lane in range(lanes)]
print(contiguous)
print(strided)
+7
View File
@@ -0,0 +1,7 @@
<!doctype html><html lang="en"><meta charset="utf-8"><title>Synchronization and buffer ownership</title><h1>Synchronization and buffer ownership</h1><p>15-minute session: read for 3 minutes, trace for 3, experiment for 7, and complete the check for 2. Spend longer whenever you need.</p><p>Submitting a GPU job may return before execution finishes. Reusing or freeing its buffers too early can corrupt results. Model allocated, uploaded, submitted, completed, and released states. Require completion before reuse. A barrier has a defined scope; a workgroup barrier is not automatically synchronization between every workgroup or with the host.</p><p><strong>Practice and evidence:</strong> Predict the example or draw its state transitions. Change one assumption, test the boundary, and record the actual result. Explain what this small model does not establish about a production system.</p><pre><code class="language-python">state=&quot;submitted&quot;
def can_release(state): return state==&quot;completed&quot;
assert not can_release(state)
state=&quot;completed&quot;
assert can_release(state)
print(&quot;Passed&quot;)
</code></pre><p><strong>Expected result:</strong> <code>Passed</code></p><h3>Practice and evidence</h3><p>Keep three notes: your prediction, the actual result, and why they match or differ. The completion check grades understanding; the practice task builds skill.</p><p><a href="https://git.agilaos.com/matt/open_agx">Language reference: git.agilaos.com</a></p><p><a href="https://docs.nvidia.com/cuda/cuda-c-best-practices-guide/">Language reference: docs.nvidia.com</a></p></html>
+6
View File
@@ -0,0 +1,6 @@
state="submitted"
def can_release(state): return state=="completed"
assert not can_release(state)
state="completed"
assert can_release(state)
print("Passed")