Skip to content

@global

A tensor declared in a @persistent kernel is scratch the launch owns. The compiler holds it in shared memory when every block writes all of it alike, and publishes it to device memory otherwise.

@global(H, ..)

@global keeps each named scratch tensor in device memory even when it could be held: one buffer every block shares, a parameter the launch supplies after the declared ones. @shared asserts the opposite. See the Attributes table in the spec.