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

@test_opt without the printing #617

Open
gdalle opened this issue Mar 15, 2024 · 2 comments
Open

@test_opt without the printing #617

gdalle opened this issue Mar 15, 2024 · 2 comments

Comments

@gdalle
Copy link

gdalle commented Mar 15, 2024

Is it possible to avoid printing the report to the REPL?
I've looked into toplever_logger and vscode_console_output but neither of those has helped me deactivate the printing

julia> using JET

julia> f() = rand(rand([Float64, Float32, Float16, Float8, Int64, Int32, Int16, Int8]))
f (generic function with 1 method)

julia> @test_opt f()
JET-test failed at REPL[7]:1
  Expression: #= REPL[7]:1 =# JET.@test_opt f()
  ═════ 14 possible errors found ═════
  ┌ f() @ Main ./REPL[6]:1
  │┌ vect(::Type{Float64}, ::Type{Float32}, ::Type{Float16}, ::Any, ::Type{Int64}, ::Type{Int32}, ::Type{Int16}, ::Type{Int8}) @ Base ./array.jl:186
  ││┌ promote_typeof(::Type{Float64}, ::Type{Float32}, ::Type{Float16}, ::Any, ::Type{Int64}, ::Type{Int32}, ::Type{Int16}, ::Type{Int8}) @ Base ./promotion.jl:373
  │││┌ promote_typeof(::Type{Float32}, ::Type{Float16}, ::Any, ::Type{Int64}, ::Type{Int32}, ::Type{Int16}, ::Type{Int8}) @ Base ./promotion.jl:373
  ││││┌ promote_typeof(::Type{Float16}, ::Any, ::Type{Int64}, ::Type{Int32}, ::Type{Int16}, ::Type{Int8}) @ Base ./promotion.jl:373
  │││││┌ promote_typeof(::Any, ::Type{Int64}, ::Type{Int32}, ::Type{Int16}, ::Type{Int8}) @ Base ./promotion.jl:373
  ││││││┌ promote_type(::DataType, ::Type{DataType}) @ Base ./promotion.jl:313
  │││││││┌ promote_result(::DataType, ::Type{DataType}, ::Type{Union{}}, ::Type{Union{}}) @ Base ./promotion.jl:336
  ││││││││┌ typejoin(a::DataType, b::Type{DataType}) @ Base ./promotion.jl:63
  │││││││││┌ typejoin(a::Any, b::Any) @ Base ./promotion.jl:127
  ││││││││││ runtime dispatch detected: Base.UnionAll(%403::Any, %405::Any)::Any
  │││││││││└────────────────────
  ││││││││┌ typejoin(a::DataType, b::Type{DataType}) @ Base ./promotion.jl:127
  │││││││││ runtime dispatch detected: Base.UnionAll(%358::Any, %360::Any)::Any
  ││││││││└────────────────────
  ││││││┌ promote_type(::DataType, ::Type{DataType}) @ Base ./promotion.jl:313
  │││││││ runtime dispatch detected: promote_rule(%2::DataType, ::DataType)::Any
  ││││││└────────────────────
  ││││││┌ promote_type(::DataType, ::Type{DataType}) @ Base ./promotion.jl:313
  │││││││ runtime dispatch detected: Base.promote_result(%1::DataType, ::DataType, %3::Any, )::Any
  ││││││└────────────────────
  │││││┌ promote_typeof(::Any, ::Type{Int64}, ::Type{Int32}, ::Type{Int16}, ::Type{Int8}) @ Base ./promotion.jl:373
  ││││││ runtime dispatch detected: promote_type(%1::DataType, ::DataType)::Any
  │││││└────────────────────
  │││││┌ promote_type(::Type{DataType}, ::Type{S}) where S @ Base ./promotion.jl:313
  ││││││┌ promote_result(::Type{DataType}, ::Type{S}, ::Type{Union{}}, ::Type{Union{}}) where S @ Base ./promotion.jl:336
  │││││││┌ typejoin(a::Type{DataType}, b::Type) @ Base ./promotion.jl:36
  ││││││││┌ typejoin(a::Type{DataType}, b::Any) @ Base ./promotion.jl:127
  │││││││││ runtime dispatch detected: Base.UnionAll(%381::Any, %383::Any)::Any
  ││││││││└────────────────────
  │││││││┌ typejoin(a::Type{DataType}, b::Type) @ Base ./promotion.jl:127
  ││││││││ runtime dispatch detected: Base.UnionAll(%376::Any, %378::Any)::Any
  │││││││└────────────────────
  │││││┌ promote_result(::Type{DataType}, ::Type, ::Type{DataType}, ::Type{S}) where S @ Base ./promotion.jl:333
  ││││││ runtime dispatch detected: promote_type(::DataType, %1::Type)::Any
  │││││└────────────────────
  │││┌ promote_typeof(::Type{Float32}, ::Type{Float16}, ::Any, ::Type{Int64}, ::Type{Int32}, ::Type{Int16}, ::Type{Int8}) @ Base ./promotion.jl:373
  ││││ runtime dispatch detected: Base.promote_typeof(%1::Type{Float16}, %2::Any, %3::Type{Int64}, %4::Type{Int32}, %5::Type{Int16}, %6::Type{Int8})::Any
  │││└────────────────────
  │││┌ promote_typeof(::Type{Float32}, ::Type{Float16}, ::Any, ::Type{Int64}, ::Type{Int32}, ::Type{Int16}, ::Type{Int8}) @ Base ./promotion.jl:373
  ││││ runtime dispatch detected: promote_type(::DataType, %7::Any)::Any
  │││└────────────────────
  ││┌ promote_typeof(::Type{Float64}, ::Type{Float32}, ::Type{Float16}, ::Any, ::Type{Int64}, ::Type{Int32}, ::Type{Int16}, ::Type{Int8}) @ Base ./promotion.jl:373
  │││ runtime dispatch detected: promote_type(::DataType, %8::Any)::Any
  ││└────────────────────
  │┌ vect(::Type{Float64}, ::Type{Float32}, ::Type{Float16}, ::Any, ::Type{Int64}, ::Type{Int32}, ::Type{Int16}, ::Type{Int8}) @ Base ./array.jl:187
  ││ runtime dispatch detected: (%17::Any)[%19::Type{Float64}, %20::Type{Float32}, %21::Type{Float16}, %22::Any, %23::Type{Int64}, %24::Type{Int32}, %25::Type{Int16}, %26::Type{Int8}]::Any
  │└────────────────────
  ┌ f() @ Main ./REPL[6]:1
  │ runtime dispatch detected: rand(%2::Any)::Any
  └────────────────────
  ┌ f() @ Main ./REPL[6]:1
  │ runtime dispatch detected: rand(%3::Any)::Any
  └────────────────────
  
ERROR: There was an error during testing
@aviatesk
Copy link
Owner

Doesn't it suppress the printing if you add semicolons?

@test_call func(args...);

@gdalle
Copy link
Author

gdalle commented Mar 15, 2024

No, still the same

julia> using JET

julia> f() = rand(rand([Float64, Float32, Float16, Float8, Int64, Int32, Int16, Int8]))
f (generic function with 1 method)

julia> @test_opt f();
JET-test failed at REPL[3]:1
  Expression: #= REPL[3]:1 =# JET.@test_opt f()
  ═════ 14 possible errors found ═════
  ┌ f() @ Main ./REPL[2]:1
  │┌ vect(::Type{Float64}, ::Type{Float32}, ::Type{Float16}, ::Any, ::Type{Int64}, ::Type{Int32}, ::Type{Int16}, ::Type{Int8}) @ Base ./array.jl:186
  ││┌ promote_typeof(::Type{Float64}, ::Type{Float32}, ::Type{Float16}, ::Any, ::Type{Int64}, ::Type{Int32}, ::Type{Int16}, ::Type{Int8}) @ Base ./promotion.jl:373
  │││┌ promote_typeof(::Type{Float32}, ::Type{Float16}, ::Any, ::Type{Int64}, ::Type{Int32}, ::Type{Int16}, ::Type{Int8}) @ Base ./promotion.jl:373
  ││││┌ promote_typeof(::Type{Float16}, ::Any, ::Type{Int64}, ::Type{Int32}, ::Type{Int16}, ::Type{Int8}) @ Base ./promotion.jl:373
  │││││┌ promote_typeof(::Any, ::Type{Int64}, ::Type{Int32}, ::Type{Int16}, ::Type{Int8}) @ Base ./promotion.jl:373
  ││││││┌ promote_type(::DataType, ::Type{DataType}) @ Base ./promotion.jl:313
  │││││││┌ promote_result(::DataType, ::Type{DataType}, ::Type{Union{}}, ::Type{Union{}}) @ Base ./promotion.jl:336
  ││││││││┌ typejoin(a::DataType, b::Type{DataType}) @ Base ./promotion.jl:53
  │││││││││┌ typejoin(a::Any, b::Any) @ Base ./promotion.jl:127
  ││││││││││ runtime dispatch detected: Base.UnionAll(%403::Any, %405::Any)::Any
  │││││││││└────────────────────
  ││││││││┌ typejoin(a::DataType, b::Type{DataType}) @ Base ./promotion.jl:127
  │││││││││ runtime dispatch detected: Base.UnionAll(%358::Any, %360::Any)::Any
  ││││││││└────────────────────
  ││││││┌ promote_type(::DataType, ::Type{DataType}) @ Base ./promotion.jl:313
  │││││││ runtime dispatch detected: promote_rule(%2::DataType, ::DataType)::Any
  ││││││└────────────────────
  ││││││┌ promote_type(::DataType, ::Type{DataType}) @ Base ./promotion.jl:313
  │││││││ runtime dispatch detected: Base.promote_result(%1::DataType, ::DataType, %3::Any, )::Any
  ││││││└────────────────────
  │││││┌ promote_typeof(::Any, ::Type{Int64}, ::Type{Int32}, ::Type{Int16}, ::Type{Int8}) @ Base ./promotion.jl:373
  ││││││ runtime dispatch detected: promote_type(%1::DataType, ::DataType)::Any
  │││││└────────────────────
  │││││┌ promote_type(::Type{DataType}, ::Type{S}) where S @ Base ./promotion.jl:313
  ││││││┌ promote_result(::Type{DataType}, ::Type{S}, ::Type{Union{}}, ::Type{Union{}}) where S @ Base ./promotion.jl:336
  │││││││┌ typejoin(a::Type{DataType}, b::Type) @ Base ./promotion.jl:36
  ││││││││┌ typejoin(a::Type{DataType}, b::Any) @ Base ./promotion.jl:127
  │││││││││ runtime dispatch detected: Base.UnionAll(%381::Any, %383::Any)::Any
  ││││││││└────────────────────
  │││││││┌ typejoin(a::Type{DataType}, b::Type) @ Base ./promotion.jl:127
  ││││││││ runtime dispatch detected: Base.UnionAll(%376::Any, %378::Any)::Any
  │││││││└────────────────────
  │││││┌ promote_result(::Type{DataType}, ::Type, ::Type{DataType}, ::Type{S}) where S @ Base ./promotion.jl:333
  ││││││ runtime dispatch detected: promote_type(::DataType, %1::Type)::Any
  │││││└────────────────────
  │││┌ promote_typeof(::Type{Float32}, ::Type{Float16}, ::Any, ::Type{Int64}, ::Type{Int32}, ::Type{Int16}, ::Type{Int8}) @ Base ./promotion.jl:373
  ││││ runtime dispatch detected: Base.promote_typeof(%1::Type{Float16}, %2::Any, %3::Type{Int64}, %4::Type{Int32}, %5::Type{Int16}, %6::Type{Int8})::Any
  │││└────────────────────
  │││┌ promote_typeof(::Type{Float32}, ::Type{Float16}, ::Any, ::Type{Int64}, ::Type{Int32}, ::Type{Int16}, ::Type{Int8}) @ Base ./promotion.jl:373
  ││││ runtime dispatch detected: promote_type(::DataType, %7::Any)::Any
  │││└────────────────────
  ││┌ promote_typeof(::Type{Float64}, ::Type{Float32}, ::Type{Float16}, ::Any, ::Type{Int64}, ::Type{Int32}, ::Type{Int16}, ::Type{Int8}) @ Base ./promotion.jl:373
  │││ runtime dispatch detected: promote_type(::DataType, %8::Any)::Any
  ││└────────────────────
  │┌ vect(::Type{Float64}, ::Type{Float32}, ::Type{Float16}, ::Any, ::Type{Int64}, ::Type{Int32}, ::Type{Int16}, ::Type{Int8}) @ Base ./array.jl:187
  ││ runtime dispatch detected: (%17::Any)[%19::Type{Float64}, %20::Type{Float32}, %21::Type{Float16}, %22::Any, %23::Type{Int64}, %24::Type{Int32}, %25::Type{Int16}, %26::Type{Int8}]::Any
  │└────────────────────
  ┌ f() @ Main ./REPL[2]:1
  │ runtime dispatch detected: rand(%2::Any)::Any
  └────────────────────
  ┌ f() @ Main ./REPL[2]:1
  │ runtime dispatch detected: rand(%3::Any)::Any
  └────────────────────
  
ERROR: There was an error during testing

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

No branches or pull requests

2 participants