Flux.jl/test/runtests.jl

48 lines
1.0 KiB
Julia
Raw Normal View History

2018-08-20 14:38:25 +00:00
# Pkg.test runs with --check_bounds=1, forcing all bounds checks.
# This is incompatible with CUDAnative (see JuliaGPU/CUDAnative.jl#98)
if Base.JLOptions().check_bounds == 1
file = @__FILE__
run(```
$(Base.julia_cmd())
--color=$(Base.have_color ? "yes" : "no")
--compiled-modules=$(Bool(Base.JLOptions().use_compiled_modules) ? "yes" : "no")
--startup-file=$(Base.JLOptions().startupfile != 2 ? "yes" : "no")
--code-coverage=$(["none", "user", "all"][1+Base.JLOptions().code_coverage])
$(file)
```)
exit()
end
2018-07-18 07:01:06 +00:00
using Flux, Test, Random
2018-08-11 09:51:07 +00:00
using Random
2016-12-15 23:11:35 +00:00
2018-08-11 09:51:07 +00:00
Random.seed!(0)
2018-02-08 10:33:51 +00:00
2018-08-20 12:08:04 +00:00
# So we can use the system CuArrays
insert!(LOAD_PATH, 2, "@v#.#")
2017-07-04 17:32:21 +00:00
@testset "Flux" begin
2018-09-05 14:39:00 +00:00
@info "Testing Basics"
2017-08-19 19:20:20 +00:00
include("utils.jl")
2018-08-21 03:29:57 +00:00
include("onehot.jl")
2018-09-05 14:39:00 +00:00
include("optimise.jl")
include("data.jl")
@info "Testing Layers"
2017-10-26 10:46:12 +00:00
include("layers/normalisation.jl")
include("layers/stateless.jl")
2018-09-04 13:35:20 +00:00
include("layers/conv.jl")
2018-09-05 14:39:00 +00:00
@info "Running Gradient Checks"
include("tracker.jl")
2017-06-26 09:21:17 +00:00
2018-08-20 12:08:04 +00:00
if Base.find_package("CuArrays") != nothing
2018-08-11 12:53:47 +00:00
include("cuda/cuda.jl")
end
2018-01-16 17:58:14 +00:00
2017-07-04 17:32:21 +00:00
end