-
Notifications
You must be signed in to change notification settings - Fork 94
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
Add operations/arguments to local CuPy array benchmark #524
Conversation
Codecov Report
@@ Coverage Diff @@
## branch-0.18 #524 +/- ##
===============================================
+ Coverage 90.42% 92.45% +2.02%
===============================================
Files 15 16 +1
Lines 1128 1550 +422
===============================================
+ Hits 1020 1433 +413
- Misses 108 117 +9
Continue to review full report at Codecov.
|
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.
Looks good to me, nice addition @charlesbluca.
Should there be an additional argument to specify the array slicing interval (which is currently fixed at 3)?
I think fixing it to 3 is fine for now. If we need to benchmark the impact of step sizes, we can always add it. At that point, we might consider using the first position argument as a command and use the following arguments as command-specific (e.g. like how git
works)
Could the JSON output be cleaned up? Currently, a (truncated) sample output file looks like:
Looks fine to me :)
dask_cuda/benchmarks/local_cupy.py
Outdated
@@ -179,6 +197,40 @@ async def run(args): | |||
) | |||
print(fmt % (d1, d2, bw[0], bw[1], bw[2], total_nbytes[(d1, d2)])) | |||
|
|||
if args.benchmark_json: | |||
import json |
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.
Moving import json
to the top should be fine
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.
Done! Also going to change this to from json import dump
.
x = rs.random((args.size, args.size), chunks=args.chunk_size).persist() | ||
await wait(x) | ||
func_args = (x,) | ||
|
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.
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.
LGTM as well, thanks @charlesbluca !
@gpucibot merge |
This PR adds the following operations to the local CuPy array benchmark:
This also adds an additional special argument,
--benchmark-json
, which takes an optional path to dump the results of the benchmark in JSON format. This would allow us to generate plots using the output, as discussed in #517.Some thoughts: