-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HEXAGON][QHL] Clippling the inputs of HVX version of QHL Sigmoid operation #12919
Conversation
…enerates incorrect output if the input falls outside of [-8.0, 8.0]. To fix this, we need to clip the input to sigmoid in the range between >-8.0 and <8.0.
I believe we need to change Line 869 in 397cf87
|
|
||
func_name = "sigmoid" | ||
with tvm.transform.PassContext(opt_level=3): | ||
runtime_module = tvm.build(tir_s.mod, target=target, name=func_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we check the generated asm to make sure that the HVX sigmoid is generated? It needs QHL to be enabled on Hexagon CI.
@masahi |
Good point, I don't find a way to make this per-target registration. For now I think it's fine to make |
…ration (apache#12919) * [HEXAGON][QHL] HVX version of QHL(Qualcomm Hexagon Library) sigmoid generates incorrect output if the input falls outside of [-8.0, 8.0]. To fix this, we need to clip the input to sigmoid in the range between >-8.0 and <8.0. * setting vectorize attribute for tir.sigmoid to enable vectorization at TIR level * Asserting if sigmoid/vmin/vmax are not generated * formatting the test file Co-authored-by: quic_rutkoor <quic_rutkoor@quicinc.com>
HVX version of QHL(Qualcomm Hexagon Library) sigmoid generates incorrect output if the input falls outside of [-8.0, 8.0]. To fix this, we need to clip the input to sigmoid in the range between >-8.0 and <8.0.