-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
A Gemini comment??
When you write the UNARY_OP and BINARY_OP macros into your string generator, I highly recommend adding a grid boundary check.
In your C++ execute() loop, threadgroup sizes are often multiples of 32 or 64. If your tensor has 100 elements, you might dispatch 128 threads to the GPU. Those extra 28 threads will execute the kernel, read past the end of your buffer, and crash the GPU driver.
Pass the total_elements (numel) as a scalar, and put this at the very top of your macros:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels