Skip to content

Conversation

@EnigmaWH
Copy link

@EnigmaWH EnigmaWH commented Jul 1, 2025

Description

This PR adds LLVM legalization support for tir.erf using the Abramowitz and Stegun approximation, which avoids the precision issues found in the tanh approximation based implementation.
@Hzfengsy @tqchen @Lunderberg @mshr-h

@cbalint13
Copy link
Contributor

cbalint13 commented Jul 1, 2025

Hi @Gokulnathsrinivasanmcw ,

Thanks for the addition, erf is welcome !

There is another concurent proposal open here (have tests, didnt pass lint).
Just please add a test case for erf and make sure all required CI tasks are in green.

@cbalint13 cbalint13 self-assigned this Jul 1, 2025
@EnigmaWH
Copy link
Author

EnigmaWH commented Jul 1, 2025

Hi @Gokulnathsrinivasanmcw ,

Thanks for the addition, erf is welcome !

There is another concurent proposal open here (have tests, didnt pass lint). Jut please add a test case for erf and make sure all required CI tasks are in green.

Sure, @cbalint13 — I’ll check that out. Thanks for letting me know!

@EnigmaWH EnigmaWH closed this Jul 2, 2025
@EnigmaWH EnigmaWH reopened this Jul 2, 2025
@EnigmaWH
Copy link
Author

EnigmaWH commented Jul 3, 2025

Hi @Gokulnathsrinivasanmcw ,

Thanks for the addition, erf is welcome !

There is another concurent proposal open here (have tests, didnt pass lint). Jut please add a test case for erf and make sure all required CI tasks are in green.

Hi @cbalint13, I've added a test case.

@cbalint13
Copy link
Contributor

Thank you @Gokulnathsrinivasanmcw !

@cbalint13 cbalint13 merged commit 6620fe2 into apache:main Jul 3, 2025
17 of 18 checks passed
ShiboXing pushed a commit to ShiboXing/tvm that referenced this pull request Aug 10, 2025
This PR adds LLVM legalization support for tir.erf using the Abramowitz and Stegun approximation, which avoids the precision issues found in the tanh approximation based implementation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants