-
Notifications
You must be signed in to change notification settings - Fork 1
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
Extend BenchmarkTools at-benchmark #61
Conversation
39d7a98
to
9c5a4bd
Compare
9c5a4bd
to
1602882
Compare
src/weak_deps/benchmark_tools.jl
Outdated
macro benchmark(device, expr) | ||
return quote | ||
if $(esc(device)) isa CUDADevice | ||
BenchmarkTools.@benchmark CUDA.@async $(expr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the recommended way to do this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's mentioned here: https://cuda.juliagpu.org/dev/development/profiling/#Time-measurements
@@ -6,6 +6,7 @@ version = "0.5.2" | |||
[deps] | |||
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" | |||
MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" | |||
Requires = "ae029012-a4dd-5104-9daa-d747884805df" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe set it up so it can use package extensions on Julia 1.9:
https://pkgdocs.julialang.org/v1/creating-packages/#Conditional-loading-of-code-in-packages-(Extensions)
You can see how MPI.jl does it with CUDA.jl here: https://github.com/JuliaParallel/MPI.jl/blob/master/ext/CUDAExt.jl
1f21e40
to
7e86073
Compare
Whoops, meant to use |
This PR extends BenchmarkTools
@benchmark
(ref: https://cuda.juliagpu.org/dev/development/profiling/#Time-measurements)