Skip to content

Commit

Permalink
Merge pull request #466 from willow-ahrens/wma/fastmath
Browse files Browse the repository at this point in the history
bug fixes and performance improvements
  • Loading branch information
willow-ahrens authored Mar 14, 2024
2 parents c00f9e5 + fd10d93 commit 9d0ff9d
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Finch"
uuid = "9177782c-1635-4eb9-9bfb-d9dfa25e6bce"
authors = ["Willow Ahrens"]
version = "0.6.16"
version = "0.6.17"

[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
Expand Down
6 changes: 3 additions & 3 deletions docs/src/interactive.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "1.10.2"
"version": "1.6.7"
},
"kernelspec": {
"name": "julia-1.10",
"display_name": "Julia 1.10.2",
"name": "julia-1.6",
"display_name": "Julia 1.6.7",
"language": "julia"
}
},
Expand Down
4 changes: 2 additions & 2 deletions src/execute.jl
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ execute(ex) = execute(ex, NamedTuple())
code = execute_code(:ex, ex; virtualize(:opts, opts, ctx)...)
quote
# try
@inbounds begin
@inbounds @fastmath begin
$(code |> unblock)
end
# catch
Expand Down Expand Up @@ -229,7 +229,7 @@ function finch_kernel(fname, args, prgm; algebra = DefaultAlgebra(), mode = safe
end |> pretty |> unresolve |> dataflow |> unquote_literals
arg_defs = map(((key, val),) -> :($key::$(maybe_typeof(val))), args)
striplines(:(function $fname($(arg_defs...))
@inbounds $(striplines(unblock(code)))
@inbounds @fastmath $(striplines(unblock(code)))
end))
end

Expand Down
2 changes: 1 addition & 1 deletion src/util/limits.jl
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,6 @@ for S in limit_types
end
end

Base.promote_rule(::Type{Limit{T}}, ::Type{Limit{S}}) where {T, S} = Limit(promote_type(T, S))
Base.promote_rule(::Type{Limit{T}}, ::Type{Limit{S}}) where {T, S} = Limit{promote_type(T, S)}
Base.convert(::Type{Limit{T}}, i::Limit) where {T} = Limit{T}(convert(T, i.val), i.sign)
Base.hash(x::Limit, h::UInt) = hash(typeof(x), hash(x.val, hash(x.sign, h)))
4 changes: 2 additions & 2 deletions test/reference32/issues/issue288_concordize_double_let.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ begin
for i_9 = 1:A_mode1_stop
val = X[i_9, j_5]
for l_6 = 1:A_mode2_stop
val_2 = A[i_9, l_6, k_6]
phase_stop = min(i_9, l_6 + -1)
if phase_stop >= i_9
for s_4 = i_9:phase_stop
val_2 = A[i_9, l_6, k_6]
for s_5 = i_9:phase_stop
C[i_9, j_5, k_6] = val_2 * val + C[i_9, j_5, k_6]
C[i_9, j_5, k_6] = val * val_2 + C[i_9, j_5, k_6]
end
Expand Down
2 changes: 1 addition & 1 deletion test/reference64/issues/short_circuit_bfs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ begin
if y_lvl_i == phase_stop_2 && A_lvl_2_i == phase_stop_2
A_lvl_3_val = A_lvl_2_val[A_lvl_2_q]
y_lvl_2_val = y_lvl_val[y_lvl_q]
p_val = (Finch.Chooser{0}())(p_val, ifelse(y_lvl_2_val && A_lvl_3_val, phase_stop_2, 0))
p_val = (Finch.Chooser{0}())(p_val, (Core).ifelse(y_lvl_2_val && A_lvl_3_val, phase_stop_2, 0))
y_lvl_q += 1
A_lvl_2_q += 1
elseif A_lvl_2_i == phase_stop_2
Expand Down

2 comments on commit 9d0ff9d

@willow-ahrens
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/102893

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.6.17 -m "<description of version>" 9d0ff9d4daa0794e50f6c1021cb13a5627d5c90f
git push origin v0.6.17

Please sign in to comment.