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

Eliminate literal parameters to uvector::set_element_async and device_scalar::set_value #7563

Merged
merged 3 commits into from
Mar 19, 2021
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion cpp/src/io/json/reader_impl.cu
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ std::unique_ptr<table> create_json_keys_info_table(const parse_options_view &opt
auto const info_table_mdv = mutable_table_device_view::create(info_table->mutable_view(), stream);

// Reset the key counter - now used for indexing
key_counter.set_value(0, stream);
key_counter.set_value_zero(stream);
// Fill the allocated columns
cudf::io::json::gpu::collect_keys_info(
options, data, row_offsets, key_counter.data(), {*info_table_mdv}, stream);
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/join/hash_join.cu
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ std::pair<rmm::device_vector<size_type>, rmm::device_vector<size_type>> probe_jo

constexpr int block_size{DEFAULT_JOIN_BLOCK_SIZE};
detail::grid_1d config(probe_table.num_rows(), block_size);
write_index.set_value(0, stream);
write_index.set_value_zero(stream);

row_hash hash_probe{probe_table};
row_equality equality{probe_table, build_table, compare_nulls == null_equality::EQUAL};
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/join/hash_join.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ size_type estimate_join_output_size(table_device_view build_table,
do {
sample_probe_num_rows = std::min(sample_probe_num_rows, probe_table_num_rows);

size_estimate.set_value(0, stream);
size_estimate.set_value_zero(stream);

row_hash hash_probe{probe_table};
row_equality equality{probe_table, build_table, compare_nulls == null_equality::EQUAL};
Expand Down
6 changes: 3 additions & 3 deletions cpp/src/join/nested_loop_join.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ size_type estimate_nested_loop_join_output_size(table_device_view left,
int num_sms{-1};
CUDA_TRY(cudaDeviceGetAttribute(&num_sms, cudaDevAttrMultiProcessorCount, dev_id));

size_estimate.set_value(0, stream);
size_estimate.set_value_zero(stream);

row_equality equality{left, right, compare_nulls == null_equality::EQUAL};
// Determine number of output rows without actually building the output to simply
Expand Down Expand Up @@ -163,7 +163,7 @@ get_base_nested_loop_join_indices(table_view const& left,

constexpr int block_size{DEFAULT_JOIN_BLOCK_SIZE};
detail::grid_1d config(left_table->num_rows(), block_size);
write_index.set_value(0);
write_index.set_value_zero(stream);

row_equality equality{*left_table, *right_table, compare_nulls == null_equality::EQUAL};
const auto& join_output_l =
Expand All @@ -182,7 +182,7 @@ get_base_nested_loop_join_indices(table_view const& left,

CHECK_CUDA(stream.value());

join_size = write_index.value();
join_size = write_index.value(stream);
current_estimated_size = estimated_size;
estimated_size *= 2;
} while ((current_estimated_size < join_size));
Expand Down
6 changes: 4 additions & 2 deletions cpp/tests/jit/jit-cache-multiprocess-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ TEST_F(JitCacheMultiProcessTest, MultiProcessTest)
// Brand new cache object that has nothing in in-memory cache
cudf::jit::cudfJitCache cache;

input->set_value(4);
output->set_value(1);
auto const in{4};
auto const out{1};
input->set_value(in);
output->set_value(out);
Comment on lines +52 to +55
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


// make program
auto program = cache.getProgram("FileCacheTestProg3", program3_source);
Expand Down