Skip to content
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

add tl.math.tanh instead of tl.libdevice.tanh #339

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

michaelfeil
Copy link

Seems like tanh moved to a

see triton/language/math.py-L1238

@core.extern
def tanh(arg0, _builder=None):
    return core.extern_elementwise(
        "libdevice", libdevice_path(), [arg0], {
            (core.dtype("fp32"), ): ("__nv_tanhf", core.dtype("fp32")),
            (core.dtype("fp64"), ): ("__nv_tanh", core.dtype("fp64")),
        }, is_pure=True, _builder=_builder)

@michaelfeil
Copy link
Author

@pommedeterresautee FYI, unit tests seem to pass. What do you think about this PR?

@michaelfeil
Copy link
Author

@pommedeterresautee friendly reminder!

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.

1 participant