You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "MasterJH5574 (via GitHub)" <gi...@apache.org> on 2024/03/02 21:59:13 UTC
[PR] [Runtime][Builtin] Using float32 accumulation in attention kernel [tvm]
MasterJH5574 opened a new pull request, #16667:
URL: https://github.com/apache/tvm/pull/16667
Prior to this PR, the TIR attention kernels does not cast matmul operands to fp32 before multiplying.
For models like Phi-2 which may have large Q/K/V data (at the level of a few hundreds), the fp16 multiplication exceeds the range of fp16, and lead to attention result being NAN sometimes.
This PR fixes this issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Runtime][Builtin] Using float32 accumulation in attention kernel [tvm]
Posted by "yongwww (via GitHub)" <gi...@apache.org>.
yongwww merged PR #16667:
URL: https://github.com/apache/tvm/pull/16667
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Runtime][Builtin] Using float32 accumulation in attention kernel [tvm]
Posted by "MasterJH5574 (via GitHub)" <gi...@apache.org>.
MasterJH5574 commented on PR #16667:
URL: https://github.com/apache/tvm/pull/16667#issuecomment-1975195120
@tvm-bot rerun
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org