Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
Dale-Black committed Jan 22, 2025
1 parent 0af683b commit dc3eb7f
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions benchmarks/setup.jl
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,10 @@ function setup_benchmarks(suite::BenchmarkGroup, backend::String, num_cpu_thread
memory_info["3D_Size_$(n)"] = benchmark_result.peak_memory_mb
end

# Store memory info in a file with a different name to avoid conflicts
open(joinpath(@__DIR__, "results", "$(backend)_memory_info.json"), "w") do io
# Create results directory if it doesn't exist
results_dir = joinpath(@__DIR__, "results")
mkpath(results_dir)
open(joinpath(results_dir, "$(backend)_memory_info.json"), "w") do io
JSON.print(io, memory_info)
end
elseif backend == "CUDA"
Expand All @@ -174,7 +176,10 @@ function setup_benchmarks(suite::BenchmarkGroup, backend::String, num_cpu_thread
memory_info["3D_Size_$(n)"] = benchmark_result.peak_memory_mb
end

open(joinpath(@__DIR__, "results", "$(backend)_memory_info.json"), "w") do io
# Create results directory if it doesn't exist
results_dir = joinpath(@__DIR__, "results")
mkpath(results_dir)
open(joinpath(results_dir, "$(backend)_memory_info.json"), "w") do io
JSON.print(io, memory_info)
end
elseif backend == "AMDGPU"
Expand All @@ -196,7 +201,10 @@ function setup_benchmarks(suite::BenchmarkGroup, backend::String, num_cpu_thread
memory_info["3D_Size_$(n)"] = benchmark_result.peak_memory_mb
end

open(joinpath(@__DIR__, "results", "$(backend)_memory_info.json"), "w") do io
# Create results directory if it doesn't exist
results_dir = joinpath(@__DIR__, "results")
mkpath(results_dir)
open(joinpath(results_dir, "$(backend)_memory_info.json"), "w") do io
JSON.print(io, memory_info)
end
elseif backend == "oneAPI"
Expand All @@ -218,7 +226,10 @@ function setup_benchmarks(suite::BenchmarkGroup, backend::String, num_cpu_thread
memory_info["3D_Size_$(n)"] = benchmark_result.peak_memory_mb
end

open(joinpath(@__DIR__, "results", "$(backend)_memory_info.json"), "w") do io
# Create results directory if it doesn't exist
results_dir = joinpath(@__DIR__, "results")
mkpath(results_dir)
open(joinpath(results_dir, "$(backend)_memory_info.json"), "w") do io
JSON.print(io, memory_info)
end
else
Expand Down

0 comments on commit dc3eb7f

Please sign in to comment.