Files
kernel-lab/tasks/01_vector_add/triton_skeleton.py
2026-04-10 13:22:19 +00:00

20 lines
491 B
Python

"""Workbook-local Triton sketch for vector add.
The repository-level implementation lives in kernels/triton/vector_add.py.
Use this file as a short-form scratchpad before editing the real kernel.
"""
def notes() -> str:
return """
TODO(student):
1. Map one Triton program instance to one contiguous block of elements.
2. Compute offsets with pid * BLOCK_SIZE + arange.
3. Mask the tail.
4. Load x and y, add them, store the result.
"""
if __name__ == "__main__":
print(notes())