Open leios opened 2 years ago
Important note: the chaos_test
introduced in #24 causes a segfault on AMDGPU, but not on CUDA / CPU. This will take some digging to figure out, so I disabled it for AMD specifically.
So I am not quite sure where to put this. In #28 I added a test to run all examples. It will run locally, but something about the julia namespace bugs out on the testsuite:
Got exception outside of a @test
MethodError: no method matching smear_example(::Int64, ::Int64, ::Int64; ArrayType=Array)
Closest candidates are:
smear_example(::Any, ::Any, ::Any; ArrayType, output_type) at ~/projects/Fae.jl/examples/smear.jl:3
Stacktrace:
[1] example_tests(ArrayType::Type{Array})
@ Main ~/projects/Fae.jl/test/example_tests.jl:28
[2] macro expansion
@ ~/projects/Fae.jl/test/example_tests.jl:40 [inlined]
[3] macro expansion
@ ~/builds/julia-1.7.1/share/julia/stdlib/v1.7/Test/src/Test.jl:1283 [inlined]
[4] example_testsuite(ArrayType::Type{Array})
@ Main ~/projects/Fae.jl/test/example_tests.jl:40
[5] top-level scope
@ REPL[59]:1
[6] top-level scope
@ ~/.julia/packages/CUDA/DfvRa/src/initialization.jl:52
[7] eval
@ ./boot.jl:373 [inlined]
[8] eval_user_input(ast::Any, backend::REPL.REPLBackend)
@ REPL ~/builds/julia-1.7.1/share/julia/stdlib/v1.7/REPL/src/REPL.jl:150
[9] repl_backend_loop(backend::REPL.REPLBackend)
@ REPL ~/builds/julia-1.7.1/share/julia/stdlib/v1.7/REPL/src/REPL.jl:244
[10] start_repl_backend(backend::REPL.REPLBackend, consumer::Any)
@ REPL ~/builds/julia-1.7.1/share/julia/stdlib/v1.7/REPL/src/REPL.jl:229
[11] run_repl(repl::REPL.AbstractREPL, consumer::Any; backend_on_current_task::Bool)
@ REPL ~/builds/julia-1.7.1/share/julia/stdlib/v1.7/REPL/src/REPL.jl:362
[12] run_repl(repl::REPL.AbstractREPL, consumer::Any)
@ REPL ~/builds/julia-1.7.1/share/julia/stdlib/v1.7/REPL/src/REPL.jl:349
[13] (::Base.var"#930#932"{Bool, Bool, Bool})(REPL::Module)
@ Base ./client.jl:394
[14] #invokelatest#2
@ ./essentials.jl:716 [inlined]
[15] invokelatest
@ ./essentials.jl:714 [inlined]
[16] run_main_repl(interactive::Bool, quiet::Bool, banner::Bool, history_file::Bool, color_set::Bool)
@ Base ./client.jl:379
[17] exec_options(opts::Base.JLOptions)
@ Base ./client.jl:309
[18] _start()
@ Base ./client.jl:495
Test Summary: | Pass Error Total
running all examples on Arrays | 4 1 5
We get such errors at random, so I am not sure how to fix this right now.
Maybe take inspiration from: https://github.com/JuliaGPU/KernelAbstractions.jl/blob/master/test/examples.jl ?
I need to modify it to make sure we run the correct example with the ..._example(...)
function.
Fae.jl is currently lacking tests. Here are some that we need:
define_...(...)
functions, so we should testdefine_square(...)
anddefine_rectangle(...)
as well as a few different configurations for each shape. #30 is a bit limiting here, so we should also tackle this.Broken Tests: