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

Fix cuFile I/O factories #13829

Merged
merged 1 commit into from
Aug 8, 2023
Merged
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
10 changes: 6 additions & 4 deletions cpp/src/io/utilities/file_io_utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,9 @@ std::unique_ptr<cufile_input_impl> make_cufile_input(std::string const& filepath
{
if (cufile_integration::is_gds_enabled()) {
try {
auto const cufile_in = std::make_unique<cufile_input_impl>(filepath);
auto cufile_in = std::make_unique<cufile_input_impl>(filepath);
CUDF_LOG_INFO("File successfully opened for reading with GDS.");
return cufile_in;
} catch (...) {
if (cufile_integration::is_always_enabled()) {
CUDF_LOG_ERROR(
Expand All @@ -302,15 +303,16 @@ std::unique_ptr<cufile_input_impl> make_cufile_input(std::string const& filepath
"buffer (possible performance impact).");
}
}
return nullptr;
return {};
}

std::unique_ptr<cufile_output_impl> make_cufile_output(std::string const& filepath)
{
if (cufile_integration::is_gds_enabled()) {
try {
auto const cufile_out = std::make_unique<cufile_output_impl>(filepath);
auto cufile_out = std::make_unique<cufile_output_impl>(filepath);
CUDF_LOG_INFO("File successfully opened for writing with GDS.");
return cufile_out;
} catch (...) {
if (cufile_integration::is_always_enabled()) {
CUDF_LOG_ERROR(
Expand All @@ -323,7 +325,7 @@ std::unique_ptr<cufile_output_impl> make_cufile_output(std::string const& filepa
"buffer (possible performance impact).");
}
}
return nullptr;
return {};
}

std::vector<file_io_slice> make_file_io_slices(size_t size, size_t max_slice_size)
Expand Down