-
Notifications
You must be signed in to change notification settings - Fork 922
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
Adds Nested Json benchmark #11466
Adds Nested Json benchmark #11466
Conversation
…ite-state-transducer-trimmed
…ite-state-transducer-trimmed
Codecov Report
@@ Coverage Diff @@
## branch-22.10 #11466 +/- ##
===============================================
Coverage ? 86.40%
===============================================
Files ? 145
Lines ? 22959
Branches ? 0
===============================================
Hits ? 19838
Misses ? 3121
Partials ? 0 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
|
||
#include <benchmarks/common/generate_input.hpp> | ||
#include <benchmarks/fixture/rmm_pool_raii.hpp> | ||
#include <nvbench/nvbench.cuh> |
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.
Do we need this file to be cu
file in order to include this header?
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 there a hpp
version of this file available?
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.
You only need to be .cu
file if you are doing device calls.
Including a .cuh
file is fine as long as you are not using any of the device functions (or data) in it.
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.
Should we place this include right before #include <cstdlib>
since nvbench
header is further than cudf ones?
auto& d_string_scalar = static_cast<cudf::string_scalar&>(*d_input_scalar); | ||
auto d_scalar = cudf::strings::repeat_string(d_string_scalar, repeat_times); | ||
auto& d_input = static_cast<cudf::scalar_type_t<std::string>&>(*d_scalar); | ||
auto generated_json = std::string(d_input); |
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.
Wait, are you constructing a host string from device string?
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.
yes. only due to limitation of parse_nested_json
at the moment. This will change once the API is complete.
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 meant you're reading device memory from the host side, which is typically illegal. Should this be invalid and cause crash?
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 is the operator std::string
operator in string_scalar
which takes care of allocation and copying data to host.
cudf/cpp/include/cudf/scalar/scalar.hpp
Line 519 in f94146b
explicit operator std::string() const; |
auto const string_size{size_type(state.get_int64("string_size"))}; | ||
|
||
auto input = make_test_json_data(string_size, cudf::default_stream_value); | ||
state.add_element_count(input.size()); |
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.
Will this show/compute throughput?
Here is an example of nvbench throughput https://github.com/NVIDIA/nvbench/blob/main/docs/benchmarks.md#throughput-measurements
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.
Thank you. This is very helpful. 👍
I wanted to see overall chars/sec throughput only. It's difficult to track the number of global memory reads, write manually for this entire algorithm. so, I skipped it.
@gpucibot merge |
Fixes compile error introduced in PR #11466 due to mismatched changes occurring in PR #11534 https://gpuci.gpuopenanalytics.com/job/rapidsai/job/gpuci/job/cudf/job/prb/job/cudf-cpu-cuda-build/CUDA=11.5/11851/console Authors: - David Wendt (https://github.com/davidwendt) Approvers: - Elias Stehle (https://github.com/elstehle) - Karthikeyan (https://github.com/karthikeyann) - Nghia Truong (https://github.com/ttnghia) URL: #11637
Description
Adds nvbench for nested json parser.
Depends on #11388
Checklist