Repository navigation
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.
Do we need this file to be cu file in order to include this header?
There was a problem hiding this comment.
is there a hpp version of this file available?
There was a problem hiding this comment.
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.
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.
Wait, are you constructing a host string from device string?
There was a problem hiding this comment.
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.
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.
There is the operator std::string operator in string_scalar which takes care of allocation and copying data to host.
https://github.com/rapidsai/cudf/blob/f94146b59fd3163be604344d40c2d3cee011d151/cpp/include/cudf/scalar/scalar.hpp#L519
| 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.
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.
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