Pause GC during benchmark to reduce noise

This commit is contained in:
Tom Lin 2021-08-28 11:16:19 +01:00
parent 13cb8ffced
commit 41f1767365

View File

@ -260,8 +260,9 @@ function main()
init::Tuple{type,type,type} = DefaultInit
scalar::type = DefaultScalar
(data, context) = make_stream(config.arraysize, scalar, device, config.csv)
GC.enable(false)
(data, context) = make_stream(config.arraysize, scalar, device, config.csv)
init_arrays!(data, context, init)
if benchmark == All
(timings, sum) = run_all!(data, context, config.numtimes)
@ -290,6 +291,8 @@ function main()
error("Bad benchmark $(benchmark)")
end
GC.enable(true)
if !valid
exit(1)
end