Minor experiment fixes
This commit is contained in:
@ -44,14 +44,14 @@ if isfile(results_filename)
|
||||
df = CSV.read(results_filename, DataFrame)
|
||||
end
|
||||
|
||||
nInputs = 2^24
|
||||
nInputs = 2^20
|
||||
|
||||
function cpu_bench(compute_function, inputs)
|
||||
bench = @benchmark begin
|
||||
@inbounds Threads.@threads for i in eachindex($inputs)
|
||||
@invokelatest $compute_function($inputs[i])
|
||||
end
|
||||
end gcsample = true seconds = 300
|
||||
end gcsample = true samples = 20 evals = 1
|
||||
|
||||
time = median(bench.times) / 1e9
|
||||
s = std(bench.times) / 1e9
|
||||
@ -67,9 +67,9 @@ function gpu_bench(kernel!, inputs)
|
||||
ts = 32
|
||||
bs = Int(n / ts)
|
||||
bench = @benchmark begin
|
||||
@cuda threads = ts blocks = bs always_inline = true kernel!.($inputs, $outputs, $n)
|
||||
@cuda threads = $ts blocks = $bs always_inline = true $kernel!($inputs, $outputs, $n)
|
||||
CUDA.device_synchronize()
|
||||
end gcsample = true seconds = 300
|
||||
end gcsample = true samples = 20 evals = 1
|
||||
|
||||
time = median(bench.times) / 1e9
|
||||
s = std(bench.times) / 1e9
|
||||
@ -210,7 +210,7 @@ machine = Machine(
|
||||
# sadly cannot put these in functions because the world age must increase after the function is created which happens only in the global scope
|
||||
|
||||
## -- WARMUP TO COMPILE FUNCTIONS first
|
||||
|
||||
#=
|
||||
optimizer = RandomWalkOptimizer(MersenneTwister(0))
|
||||
|
||||
# 2-photon compton
|
||||
@ -230,7 +230,7 @@ opt_time = @elapsed optimize_to_fixpoint!(optimizer, graph)
|
||||
func_gen_time = @elapsed compute_func = get_compute_function(graph, process, machine)
|
||||
kernel! = get_cuda_kernel(graph, process, machine)
|
||||
bench_process(process, "warmup", graph, compute_func, kernel!, gen_time, opt_time, func_gen_time)
|
||||
|
||||
=#
|
||||
## -- WARMUP END
|
||||
|
||||
optimizer = ReductionOptimizer()
|
||||
|
Reference in New Issue
Block a user