FlashAttention-2 assigns thread blocks to query blocks so that GPU streaming multiprocessors stay busy. The number of such blocks determines how many can run in parallel.
Implement num_blocks(n, block), the ceiling of n divided by the block size.
Use integer ceiling division.
No results yet
Run your code to check it against the examples, or submit to run every test.