Skip to content

Commit

Permalink
enable optimization analysis tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed Sep 23, 2021
1 parent 2983f2c commit 4659d48
Showing 1 changed file with 20 additions and 21 deletions.
41 changes: 20 additions & 21 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,26 +80,25 @@ include("setup.jl")
test_call(JET.report_package, (Union{String,Module,Nothing},);
target_modules)

# TODO enable once https://github.com/JuliaLang/julia/issues/42258 is resolved
# # optimization analysis
# # =====================
#
# function function_filter(@nospecialize ft)
# if ft === typeof(JET.widenconst) ||
# ft === typeof(JET.print) ||
# ft === typeof(Base.CoreLogging.handle_message) ||
# ft == Type{<:JET.InferenceErrorReport} # the constructor used in `restore_cached_report` is very dynamic
# return false
# end
# return true
# end
# # JETAnalyzer
# test_opt(JET.analyze_frame!, (JETAnalyzerT, InferenceState);
# target_modules,
# function_filter)
# # OptAnalyzer
# test_opt(JET.analyze_frame!, (OptAnalyzerT, InferenceState);
# target_modules,
# function_filter)
# optimization analysis
# =====================

function function_filter(@nospecialize ft)
if ft === typeof(JET.widenconst) ||
ft === typeof(JET.print) ||
ft === typeof(Base.CoreLogging.handle_message) ||
ft == Type{<:JET.InferenceErrorReport} # the constructor used in `restore_cached_report` is very dynamic
return false
end
return true
end
# JETAnalyzer
test_opt(JET.analyze_frame!, (JETAnalyzerT, InferenceState);
target_modules,
function_filter)
# OptAnalyzer
test_opt(JET.analyze_frame!, (OptAnalyzerT, InferenceState);
target_modules,
function_filter)
end
end

0 comments on commit 4659d48

Please sign in to comment.