Skip to content

[Unity]Add FastMathTransform pass to Relax#15814

Merged
Hzfengsy merged 3 commits intoapache:unityfrom
HongHongHongL:add-fast-math
Oct 11, 2023
Merged

[Unity]Add FastMathTransform pass to Relax#15814
Hzfengsy merged 3 commits intoapache:unityfrom
HongHongHongL:add-fast-math

Conversation

@HongHongHongL
Copy link
Contributor

@HongHongHongL HongHongHongL commented Sep 25, 2023

This PR adds FastMathTransform pass to convert the expensive non linear functions to their fast but approximate counterparts. This pass replaces relax.nn.softmax, relax.exp, relax.erf, relax.tanh with topi.nn.fast_softmax, topi.fast_exp, topi.fast_erf, topi.fast_tanh.

@HongHongHongL HongHongHongL changed the title [Unity]Add fast_softmax op and FastMathTransform pass [Unity]Add FastMathTransform pass Oct 10, 2023
@HongHongHongL HongHongHongL changed the title [Unity]Add FastMathTransform pass [Unity]Add FastMathTransform pass to Relax Oct 10, 2023
Copy link
Member

@Hzfengsy Hzfengsy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @HongHongHongL

@Hzfengsy Hzfengsy merged commit 58e00f3 into apache:unity Oct 11, 2023
@HongHongHongL HongHongHongL deleted the add-fast-math branch October 11, 2023 11:15
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