Skip to content

Commit

Permalink
A few new calls after merge.
Browse files Browse the repository at this point in the history
  • Loading branch information
harrism committed Sep 4, 2024
1 parent 4050f3d commit f83b64d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#pragma once

#include <cudf/column/column.hpp>
#include <cudf/utilities/default_stream.hpp>
#include <cudf/utilities/memory_resource.hpp>

#include <string>

Expand All @@ -36,7 +38,7 @@ std::unique_ptr<cudf::column> generate_random_string_column(
cudf::size_type upper,
cudf::size_type num_rows,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
* @brief Generate a column of random numbers
Expand All @@ -61,7 +63,7 @@ std::unique_ptr<cudf::column> generate_random_numeric_column(
T upper,
cudf::size_type num_rows,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
* @brief Generate a primary key column
Expand All @@ -81,7 +83,7 @@ std::unique_ptr<cudf::column> generate_primary_key_column(
cudf::scalar const& start,
cudf::size_type num_rows,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
* @brief Generate a column where all the rows have the same string value
Expand All @@ -101,7 +103,7 @@ std::unique_ptr<cudf::column> generate_repeat_string_column(
std::string const& value,
cudf::size_type num_rows,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
* @brief Generate a column by randomly choosing from set of strings
Expand All @@ -121,7 +123,7 @@ std::unique_ptr<cudf::column> generate_random_string_column_from_set(
cudf::host_span<const char* const> set,
cudf::size_type num_rows,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
* @brief Generate a column consisting of a repeating sequence of integers
Expand All @@ -145,6 +147,6 @@ std::unique_ptr<cudf::column> generate_repeat_sequence_column(
bool zero_indexed,
cudf::size_type num_rows,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

} // namespace cudf::datagen
20 changes: 11 additions & 9 deletions cpp/benchmarks/common/tpch_data_generator/table_helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#include <cudf/column/column_view.hpp>
#include <cudf/table/table.hpp>
#include <cudf/table/table_view.hpp>
#include <cudf/utilities/default_stream.hpp>
#include <cudf/utilities/memory_resource.hpp>

#include <vector>

Expand All @@ -37,7 +39,7 @@ std::unique_ptr<cudf::column> add_calendrical_days(
cudf::column_view const& timestamp_days,
cudf::column_view const& days,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
* @brief Perform a left join operation between two tables
Expand All @@ -56,7 +58,7 @@ std::unique_ptr<cudf::table> perform_left_join(
std::vector<cudf::size_type> const& left_on,
std::vector<cudf::size_type> const& right_on,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
* @brief Generate the `p_retailprice` column of the `part` table
Expand All @@ -68,7 +70,7 @@ std::unique_ptr<cudf::table> perform_left_join(
[[nodiscard]] std::unique_ptr<cudf::column> calculate_p_retailprice(
cudf::column_view const& p_partkey,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
* @brief Generate the `l_suppkey` column of the `lineitem` table
Expand All @@ -84,7 +86,7 @@ std::unique_ptr<cudf::table> perform_left_join(
cudf::size_type scale_factor,
cudf::size_type num_rows,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
* @brief Generate the `ps_suppkey` column of the `partsupp` table
Expand All @@ -100,7 +102,7 @@ std::unique_ptr<cudf::table> perform_left_join(
cudf::size_type scale_factor,
cudf::size_type num_rows,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());
/**
* @brief Calculate the cardinality of the `lineitem` table
*
Expand All @@ -111,7 +113,7 @@ std::unique_ptr<cudf::table> perform_left_join(
[[nodiscard]] cudf::size_type calculate_l_cardinality(
cudf::column_view const& o_rep_freqs,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());
/**
* @brief Calculate the charge column for the `lineitem` table
*
Expand All @@ -126,7 +128,7 @@ std::unique_ptr<cudf::table> perform_left_join(
cudf::column_view const& tax,
cudf::column_view const& discount,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
* @brief Generate a column of random addresses according to TPC-H specification clause 4.2.2.7
Expand All @@ -138,7 +140,7 @@ std::unique_ptr<cudf::table> perform_left_join(
[[nodiscard]] std::unique_ptr<cudf::column> generate_address_column(
cudf::size_type num_rows,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
* @brief Generate a phone number column according to TPC-H specification clause 4.2.2.9
Expand All @@ -150,6 +152,6 @@ std::unique_ptr<cudf::table> perform_left_join(
[[nodiscard]] std::unique_ptr<cudf::column> generate_phone_column(
cudf::size_type num_rows,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

} // namespace cudf::datagen
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#pragma once

#include <cudf/table/table.hpp>
#include <cudf/utilities/default_stream.hpp>
#include <cudf/utilities/memory_resource.hpp>

namespace CUDF_EXPORT cudf {
namespace datagen {
Expand All @@ -32,7 +34,7 @@ std::tuple<std::unique_ptr<cudf::table>, std::unique_ptr<cudf::table>, std::uniq
generate_orders_lineitem_part(
double scale_factor,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
* @brief Generate the `partsupp` table
Expand All @@ -44,7 +46,7 @@ generate_orders_lineitem_part(
std::unique_ptr<cudf::table> generate_partsupp(
double scale_factor,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
* @brief Generate the `supplier` table
Expand All @@ -56,7 +58,7 @@ std::unique_ptr<cudf::table> generate_partsupp(
std::unique_ptr<cudf::table> generate_supplier(
double scale_factor,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
* @brief Generate the `customer` table
Expand All @@ -68,7 +70,7 @@ std::unique_ptr<cudf::table> generate_supplier(
std::unique_ptr<cudf::table> generate_customer(
double scale_factor,
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
* @brief Generate the `nation` table
Expand All @@ -78,7 +80,7 @@ std::unique_ptr<cudf::table> generate_customer(
*/
std::unique_ptr<cudf::table> generate_nation(
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

/**
* @brief Generate the `region` table
Expand All @@ -88,7 +90,7 @@ std::unique_ptr<cudf::table> generate_nation(
*/
std::unique_ptr<cudf::table> generate_region(
rmm::cuda_stream_view stream = cudf::get_default_stream(),
rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref());

} // namespace datagen
} // namespace CUDF_EXPORT cudf

0 comments on commit f83b64d

Please sign in to comment.