Guest User

Untitled

a guest
Oct 31st, 2024
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. <|begin_of_text|><|start_header_id|>system<|end_header_id|> │
  2. Cutting Knowledge Date: December 2023 │
  3. Today Date: 29 October 2024 │
  4. You are an AI assistant who helps software engineers write triton kernels which is a type of gpu kernel w│
  5. ritten in python.t<|eot_id|><|start_header_id|>user<|end_header_id|> │
  6. Write a Triton kernel function that performs matrix multiplication on two 1024x1024 matrices A and B, res│
  7. ulting in a 1024x1024 output matrix C, using BLOCK_SIZE_M = 128, BLOCK_SIZE_N = 128, and BLOCK_SIZE_K = 32;│
  8. ensure each block in C is calculated from corresponding blocks in A and B with a tiled approach; use tl.lo│
  9. ad with masking to handle boundaries, accumulate partial sums, and store the result in C; include Python ho│
  10. st code to launch the kernel with proper grid/block sizes, and verify correctness by comparing with torch.m│
  11. atmul, ensuring accuracy within 1e-4.<|eot_id|><|start_header_id|>assistant<|end_header_id|>
Add Comment
Please, Sign In to add comment