ROCm / aotriton

Ahead of Time (AOT) Triton Math Library
MIT License
42 stars 15 forks source link

[Feature]: Fix the mandatory boundary_check when loading bias tensor #17

Open xinyazhang opened 7 months ago

xinyazhang commented 7 months ago

Suggestion Description

The boundary_check option should only be applied when seqlen_q/k cannot be divided by BLOCK_M/N https://github.com/ROCm/aotriton/blob/d6c6dccfd12f36ff695bda1beb9dcb8e746d23f2/tritonsrc/bwd_split_kernel.py#L218-L229 https://github.com/ROCm/aotriton/blob/d6c6dccfd12f36ff695bda1beb9dcb8e746d23f2/tritonsrc/bwd_split_kernel.py#L458-L470

However according to our tests, it is mandatory for all cases. Hence there are two questions to be answered here

  1. Why is this mandatory?
  2. Can we remove it?

Operating System

No response

GPU

No response

ROCm Component

No response