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

muladd rule for zero tangent #752

Merged
merged 3 commits into from
Nov 10, 2023
Merged

muladd rule for zero tangent #752

merged 3 commits into from
Nov 10, 2023

Conversation

oxinabox
Copy link
Member

This is actually the only part of kf/forcedar that hasn't already been merged, or had code for it significantly changed (based on code that was already type pirated downstream)

Since this change is mostly written by Keno I am going to count this as already reviewed

@@ -94,6 +94,7 @@ end

@scalar_rule fma(x, y, z) (y, x, true)
@scalar_rule muladd(x, y, z) (y, x, true)
@scalar_rule muladd(x::Union{Number, ZeroTangent}, y::Union{Number, ZeroTangent}, z::Union{Number, ZeroTangent}) (y, x, true)
Copy link
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
@scalar_rule muladd(x::Union{Number, ZeroTangent}, y::Union{Number, ZeroTangent}, z::Union{Number, ZeroTangent}) (y, x, true)
@scalar_rule muladd(
x::Union{Number,ZeroTangent}, y::Union{Number,ZeroTangent}, z::Union{Number,ZeroTangent}
) (y, x, true)

Copy link
Member Author

Choose a reason for hiding this comment

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

no I don't like that

test/rulesets/Base/base.jl Outdated Show resolved Hide resolved
test/rulesets/Base/base.jl Outdated Show resolved Hide resolved
test/rulesets/Base/base.jl Outdated Show resolved Hide resolved
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@oxinabox oxinabox merged commit dd1f30a into main Nov 10, 2023
4 of 10 checks passed
@oxinabox oxinabox deleted the ox/muladd_zero_tangent branch November 10, 2023 08:04
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