Skip to content
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

Remove cudf_io namespace alias #11827

Merged
merged 1 commit into from
Oct 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions cpp/benchmarks/io/csv/csv_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
constexpr size_t data_size = 256 << 20;
constexpr cudf::size_type num_cols = 64;

namespace cudf_io = cudf::io;

class CsvWrite : public cudf::benchmark {
};

Expand All @@ -44,9 +42,9 @@ void BM_csv_write_varying_inout(benchmark::State& state)
auto mem_stats_logger = cudf::memory_stats_logger();
for (auto _ : state) {
cuda_event_timer raii(state, true); // flush_l2_cache = true, stream = 0
cudf_io::csv_writer_options options =
cudf_io::csv_writer_options::builder(source_sink.make_sink_info(), view).include_header(true);
cudf_io::write_csv(options);
cudf::io::csv_writer_options options =
cudf::io::csv_writer_options::builder(source_sink.make_sink_info(), view);
cudf::io::write_csv(options);
}

state.SetBytesProcessed(data_size * state.iterations());
Expand Down Expand Up @@ -74,12 +72,11 @@ void BM_csv_write_varying_options(benchmark::State& state)
auto mem_stats_logger = cudf::memory_stats_logger();
for (auto _ : state) {
cuda_event_timer raii(state, true); // flush_l2_cache = true, stream = 0
cudf_io::csv_writer_options options =
cudf_io::csv_writer_options::builder(source_sink.make_sink_info(), view)
.include_header(true)
cudf::io::csv_writer_options options =
cudf::io::csv_writer_options::builder(source_sink.make_sink_info(), view)
.na_rep(na_per)
.rows_per_chunk(rows_per_chunk);
cudf_io::write_csv(options);
cudf::io::write_csv(options);
}

state.SetBytesProcessed(data_size * state.iterations());
Expand Down
16 changes: 7 additions & 9 deletions cpp/benchmarks/io/cuio_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@

#include <unistd.h>

namespace cudf_io = cudf::io;

temp_directory const cuio_source_sink_pair::tmpdir{"cudf_gbench"};

std::string random_file_in_dir(std::string const& dir_path)
Expand All @@ -43,21 +41,21 @@ cuio_source_sink_pair::cuio_source_sink_pair(io_type type)
{
}

cudf_io::source_info cuio_source_sink_pair::make_source_info()
cudf::io::source_info cuio_source_sink_pair::make_source_info()
{
switch (type) {
case io_type::FILEPATH: return cudf_io::source_info(file_name);
case io_type::HOST_BUFFER: return cudf_io::source_info(buffer.data(), buffer.size());
case io_type::FILEPATH: return cudf::io::source_info(file_name);
case io_type::HOST_BUFFER: return cudf::io::source_info(buffer.data(), buffer.size());
default: CUDF_FAIL("invalid input type");
}
}

cudf_io::sink_info cuio_source_sink_pair::make_sink_info()
cudf::io::sink_info cuio_source_sink_pair::make_sink_info()
{
switch (type) {
case io_type::VOID: return cudf_io::sink_info(&void_sink);
case io_type::FILEPATH: return cudf_io::sink_info(file_name);
case io_type::HOST_BUFFER: return cudf_io::sink_info(&buffer);
case io_type::VOID: return cudf::io::sink_info(&void_sink);
case io_type::FILEPATH: return cudf::io::sink_info(file_name);
case io_type::HOST_BUFFER: return cudf::io::sink_info(&buffer);
default: CUDF_FAIL("invalid output type");
}
}
Expand Down
Loading