Initial project scaffold
This commit is contained in:
19
tasks/01_vector_add/triton_skeleton.py
Normal file
19
tasks/01_vector_add/triton_skeleton.py
Normal file
@@ -0,0 +1,19 @@
|
||||
"""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())
|
||||
Reference in New Issue
Block a user