diff --git a/cpp/src/io/json/nested_json.hpp b/cpp/src/io/json/nested_json.hpp index 52ea23c7f1c..5817a01c21f 100644 --- a/cpp/src/io/json/nested_json.hpp +++ b/cpp/src/io/json/nested_json.hpp @@ -302,9 +302,16 @@ reduce_to_column_tree(tree_meta_t& tree, cudf::io::parse_options parsing_options(cudf::io::json_reader_options const& options, rmm::cuda_stream_view stream); -/** @copydoc host_parse_nested_json +/** + * @brief Parses the given JSON string and generates table from the given input. + * * All processing is done in device memory. * + * @param input The JSON input + * @param options Parsing options specifying the parsing behaviour + * @param stream The CUDA stream to which kernels are dispatched + * @param mr Optional, resource with which to allocate + * @return The data parsed from the given JSON input */ table_with_metadata device_parse_nested_json(device_span input, cudf::io::json_reader_options const& options, @@ -337,20 +344,6 @@ struct path_from_tree { std::vector get_path(NodeIndexT this_col_id); }; -/** - * @brief Parses the given JSON string and generates table from the given input. - * - * @param input The JSON input - * @param options Parsing options specifying the parsing behaviour - * @param stream The CUDA stream to which kernels are dispatched - * @param mr Optional, resource with which to allocate - * @return The data parsed from the given JSON input - */ -table_with_metadata host_parse_nested_json(device_span input, - cudf::io::json_reader_options const& options, - rmm::cuda_stream_view stream, - rmm::device_async_resource_ref mr); - } // namespace detail } // namespace cudf::io::json diff --git a/cpp/src/io/json/read_json.cu b/cpp/src/io/json/read_json.cu index 89c301ec055..0ead5c56264 100644 --- a/cpp/src/io/json/read_json.cu +++ b/cpp/src/io/json/read_json.cu @@ -307,7 +307,6 @@ table_with_metadata read_json(host_span> sources, cudf::device_span(reinterpret_cast(bufview.data()), bufview.size()); stream.synchronize(); return device_parse_nested_json(buffer, reader_opts, stream, mr); - // For debug purposes, use host_parse_nested_json() } } // namespace cudf::io::json::detail diff --git a/cpp/tests/io/nested_json_test.cpp b/cpp/tests/io/nested_json_test.cpp index 2e2d5cae34c..112ee8fb57b 100644 --- a/cpp/tests/io/nested_json_test.cpp +++ b/cpp/tests/io/nested_json_test.cpp @@ -620,15 +620,12 @@ TEST_F(JsonTest, TokenStream2) } } -struct JsonParserTest : public cudf::test::BaseFixture, public testing::WithParamInterface {}; -INSTANTIATE_TEST_SUITE_P(IsFullGPU, JsonParserTest, testing::Bool()); +struct JsonParserTest : public cudf::test::BaseFixture {}; -TEST_P(JsonParserTest, ExtractColumn) +TEST_F(JsonParserTest, ExtractColumn) { using cuio_json::SymbolT; - bool const is_full_gpu = GetParam(); - auto json_parser = is_full_gpu ? cuio_json::detail::device_parse_nested_json - : cuio_json::detail::host_parse_nested_json; + auto json_parser = cuio_json::detail::device_parse_nested_json; // Prepare cuda stream for data transfers & kernels auto const stream = cudf::get_default_stream(); @@ -867,14 +864,12 @@ TEST_F(JsonTest, PostProcessTokenStream) } } -TEST_P(JsonParserTest, UTF_JSON) +TEST_F(JsonParserTest, UTF_JSON) { // Prepare cuda stream for data transfers & kernels - auto const stream = cudf::get_default_stream(); - auto mr = rmm::mr::get_current_device_resource(); - bool const is_full_gpu = GetParam(); - auto json_parser = is_full_gpu ? cuio_json::detail::device_parse_nested_json - : cuio_json::detail::host_parse_nested_json; + auto const stream = cudf::get_default_stream(); + auto mr = rmm::mr::get_current_device_resource(); + auto json_parser = cuio_json::detail::device_parse_nested_json; // Default parsing options cudf::io::json_reader_options default_options{}; @@ -924,12 +919,10 @@ TEST_P(JsonParserTest, UTF_JSON) CUDF_EXPECT_NO_THROW(json_parser(d_utf_pass, default_options, stream, mr)); } -TEST_P(JsonParserTest, ExtractColumnWithQuotes) +TEST_F(JsonParserTest, ExtractColumnWithQuotes) { using cuio_json::SymbolT; - bool const is_full_gpu = GetParam(); - auto json_parser = is_full_gpu ? cuio_json::detail::device_parse_nested_json - : cuio_json::detail::host_parse_nested_json; + auto json_parser = cuio_json::detail::device_parse_nested_json; // Prepare cuda stream for data transfers & kernels auto const stream = cudf::get_default_stream(); @@ -959,12 +952,10 @@ TEST_P(JsonParserTest, ExtractColumnWithQuotes) CUDF_TEST_EXPECT_COLUMNS_EQUAL(expected_col2, parsed_col2); } -TEST_P(JsonParserTest, ExpectFailMixStructAndList) +TEST_F(JsonParserTest, ExpectFailMixStructAndList) { using cuio_json::SymbolT; - bool const is_full_gpu = GetParam(); - auto json_parser = is_full_gpu ? cuio_json::detail::device_parse_nested_json - : cuio_json::detail::host_parse_nested_json; + auto json_parser = cuio_json::detail::device_parse_nested_json; // Prepare cuda stream for data transfers & kernels auto const stream = cudf::get_default_stream(); @@ -1002,12 +993,10 @@ TEST_P(JsonParserTest, ExpectFailMixStructAndList) } } -TEST_P(JsonParserTest, EmptyString) +TEST_F(JsonParserTest, EmptyString) { using cuio_json::SymbolT; - bool const is_full_gpu = GetParam(); - auto json_parser = is_full_gpu ? cuio_json::detail::device_parse_nested_json - : cuio_json::detail::host_parse_nested_json; + auto json_parser = cuio_json::detail::device_parse_nested_json; // Prepare cuda stream for data transfers & kernels auto const stream = cudf::get_default_stream();