Skip to content

Commit 5a44af0

Browse files
authored
Merge branch 'master' into cleanup-iddict
2 parents 4f64f9e + 46dc417 commit 5a44af0

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

.github/workflows/benchmark_pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
echo $PATH
3939
ls -l ~/.julia/bin
4040
mkdir results
41-
benchpkg ${{ steps.extract-package-name.outputs.package_name }} --rev="${{github.event.repository.default_branch}},${{github.event.pull_request.head.sha}}" --url=${{ github.event.repository.clone_url }} --bench-on="${{github.event.repository.default_branch}}" --output-dir=results/ --tune
41+
benchpkg ${{ steps.extract-package-name.outputs.package_name }} --rev="${{github.event.repository.default_branch}},${{github.event.pull_request.head.sha}}" --url=${{ github.event.repository.clone_url }} --bench-on="${{github.event.pull_request.head.sha}}" --output-dir=results/ --tune
4242
- name: Create plots from benchmarks
4343
run: |
4444
mkdir -p plots

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
1010
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
1111
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1212
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
13-
SnoopPrecompile = "66db9d55-30c0-4569-8b51-7e840670fc0c"
13+
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
1414
SymbolicUtils = "d1185830-fcd6-423d-90d6-eec64667417b"
1515
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
1616
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
@@ -19,7 +19,7 @@ Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
1919
LoopVectorization = "0.12"
2020
MacroTools = "0.4, 0.5"
2121
Reexport = "1"
22-
SnoopPrecompile = "1"
22+
PrecompileTools = "1"
2323
SymbolicUtils = "0.19, ^1.0.5"
2424
Zygote = "0.6"
2525
julia = "1.6"

src/precompile.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import SnoopPrecompile: @precompile_all_calls, @precompile_setup
1+
import PrecompileTools: @compile_workload, @setup_workload
22

33
macro ignore_domain_error(ex)
44
return esc(
@@ -163,9 +163,9 @@ function test_functions_on_trees(::Type{T}, operators) where {T}
163163
return nothing
164164
end
165165

166-
macro maybe_precompile_setup(mode, ex)
166+
macro maybe_setup_workload(mode, ex)
167167
precompile_ex = Expr(
168-
:macrocall, Symbol("@precompile_setup"), LineNumberNode(@__LINE__), ex
168+
:macrocall, Symbol("@setup_workload"), LineNumberNode(@__LINE__), ex
169169
)
170170
return quote
171171
if $(esc(mode)) == :compile
@@ -178,9 +178,9 @@ macro maybe_precompile_setup(mode, ex)
178178
end
179179
end
180180

181-
macro maybe_precompile_all_calls(mode, ex)
181+
macro maybe_compile_workload(mode, ex)
182182
precompile_ex = Expr(
183-
:macrocall, Symbol("@precompile_all_calls"), LineNumberNode(@__LINE__), ex
183+
:macrocall, Symbol("@compile_workload"), LineNumberNode(@__LINE__), ex
184184
)
185185
return quote
186186
if $(esc(mode)) == :compile
@@ -195,12 +195,12 @@ end
195195

196196
"""`mode=:precompile` will use `@precompile_*` directives; `mode=:compile` runs."""
197197
function do_precompilation(; mode=:precompile)
198-
@maybe_precompile_setup mode begin
198+
@maybe_setup_workload mode begin
199199
binary_operators = [[+, -, *, /]]
200200
unary_operators = [[sin, cos]]
201201
turbo = [false]
202202
types = [Float32, Float64]
203-
@maybe_precompile_all_calls mode begin
203+
@maybe_compile_workload mode begin
204204
test_all_combinations(;
205205
binary_operators=binary_operators,
206206
unary_operators=unary_operators,
@@ -216,7 +216,7 @@ function do_precompilation(; mode=:precompile)
216216
# Want to precompile all above calls.
217217
types = [Float32, Float64]
218218
for T in types
219-
@maybe_precompile_all_calls mode begin
219+
@maybe_compile_workload mode begin
220220
test_functions_on_trees(T, operators)
221221
end
222222
end

0 commit comments

Comments
 (0)