Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
YingboMa committed Aug 1, 2023
1 parent fcee7cf commit e48c413
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/build_function.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,8 @@ function _build_function(target::JuliaTarget, op, args...;
cse = false,
nanmath = false,
kwargs...)
if nanmath
states.rewrites[:nanmath] = true
end

states.rewrites[:nanmath] = nanmath
dargs = map((x) -> destructure_arg(x[2], !checkbounds, Symbol("ˍ₋arg$(x[1])")), enumerate([args...]))
expr = if cse
fun = Func(dargs, [], Code.cse(unwrap(op)))
Expand Down Expand Up @@ -149,9 +147,7 @@ function _build_function(target::JuliaTarget, op::Union{Arr, ArrayOp}, args...;
dargs = map((x) -> destructure_arg(x[2], !checkbounds,
Symbol("ˍ₋arg$(x[1])")), enumerate([args...]))

if nanmath
states.rewrites[:nanmath] = true
end
states.rewrites[:nanmath] = nanmath
expr = if cse
toexpr(Func(dargs, [], Code.cse(unwrap(op))), states)
else
Expand Down Expand Up @@ -276,9 +272,7 @@ function _build_function(target::JuliaTarget, rhss::AbstractArray, args...;
nanmath = false,
parallel=nothing, cse = false, kwargs...)

if nanmath
states.rewrites[:nanmath] = true
end
states.rewrites[:nanmath] = nanmath
# We cannot switch to ShardedForm because it deadlocks with
# RuntimeGeneratedFunctions
dargs = map((x) -> destructure_arg(x[2], !checkbounds,
Expand Down

0 comments on commit e48c413

Please sign in to comment.