Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor and update benchmarks #1965

Merged
merged 1 commit into from
Aug 30, 2024
Merged

Conversation

charleskawczynski
Copy link
Member

This PR updates and refactors the benchmarks in a few ways:

  • If a column is the same for all benchmarks, then simply include that information at the table's header and remove the column
  • Starts a dictionary for device specs and uses CUDA.name(CUDA.device()) to look up the device specs
function device_info()
    device_specs =
        Dict("NVIDIA A100-SXM4-80GB" => (; device_bandwidth_GBs = 2_039))
    is_cuda = ClimaComms.device() isa ClimaComms.CUDADevice
    if is_cuda && haskey(device_specs, CUDA.name(CUDA.device()))
        (; device_bandwidth_GBs) = device_specs[CUDA.name(CUDA.device())]
        return (;
            device_bandwidth_GBs,
            exists = true,
            name = CUDA.name(CUDA.device()),
        )
    else
        return (;
            device_bandwidth_GBs = 1,
            exists = false,
            name = CUDA.name(CUDA.device()),
        )
    end
end

Now, we can add more devices in device_specs.

  • Pass in kernel_time_s to push_info so that it's decoupled from nreps. This is clearer and becomes compatible with benchmarks generated from BenchmarkTools
  • Pass in problem_size into push_info, so that a benchmark table can have multiple problem sizes (this is helpful for our copyto benchmarks)
  • Use the benchmark utils in the copyto! benchmarks.

@charleskawczynski charleskawczynski force-pushed the ck/update_copyto_benchmarks branch from b44e5f0 to 256319a Compare August 30, 2024 18:51
@charleskawczynski charleskawczynski merged commit aed16b0 into main Aug 30, 2024
11 of 13 checks passed
@charleskawczynski charleskawczynski deleted the ck/update_copyto_benchmarks branch August 30, 2024 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant