-
Notifications
You must be signed in to change notification settings - Fork 154
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 NVBench and linestring distance benchmark #577
Add NVBench and linestring distance benchmark #577
Conversation
…into fea/bench_linestring_distance
…into fea/bench_linestring_distance
Tagging @vyasr for cmake related changes, thanks! |
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.
One minor comment, otherwise the CMake LGTM.
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.
Suggest some simplification by dropping the cudf dependency.
thrust::make_counting_iterator(static_cast<cudf::size_type>(num_points)), | ||
offsets.begin(), | ||
[num_segments_per_string] __device__(auto i) { return i * num_segments_per_string; }); | ||
auto points_x = cudf::make_fixed_width_column( |
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.
Why deal with columns at all? This forces you to deal with x and y separately when you could do them both with the same functor and reduce the number of Thrust calls nearly in half. That would make this code much more readable without comments and also more maintainable.
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.
Hmm, now that you mention, you are right about that. The code is adapted from an earlier version that uses the cudf column API. With header only API in place, we can bypass using columns in all.
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.
Great
…into fea/bench_linestring_distance
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.
CMake changes LGTM
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.
I approve. Just one question.
|
||
#include <memory> | ||
|
||
namespace cuspatial { |
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.
Not sure why these functions are being added to the cuSpatial namespace?
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.
Good catch. The benchmarks shouldn't be counted in the library namespace because they are considered external code that treats the target API as a black box. I think it would be helpful to mention this in https://github.com/rapidsai/cudf/blob/branch-22.08/cpp/docs/BENCHMARKING.md
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.
Did you open an issue for adding a namespace mention to BENCHMARKING.md?
rerun tests |
1 similar comment
rerun tests |
@gpucibot merge |
This PR adds NVBench to cuspatial and introduces benchmarks for
pairwise_linestring_distance
.