Skip to content

Commit

Permalink
Merge branch 'branch-21.10' of https://github.com/rapidsai/cudf into …
Browse files Browse the repository at this point in the history
…8660
  • Loading branch information
isVoid committed Aug 24, 2021
2 parents bf46f3c + 8075199 commit eb399fb
Show file tree
Hide file tree
Showing 191 changed files with 8,714 additions and 3,695 deletions.
2 changes: 1 addition & 1 deletion ci/gpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ gpuci_mamba_retry install -y \
"rapids-notebook-env=$MINOR_VERSION.*" \
"dask-cuda=${MINOR_VERSION}" \
"rmm=$MINOR_VERSION.*" \
"ucx-py=0.21.*"
"ucx-py=0.22.*"

# https://docs.rapids.ai/maintainers/depmgmt/
# gpuci_mamba_retry remove --force rapids-build-env rapids-notebook-env
Expand Down
2 changes: 1 addition & 1 deletion ci/gpu/java.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ gpuci_conda_retry install -y \
"rapids-notebook-env=$MINOR_VERSION.*" \
"dask-cuda=${MINOR_VERSION}" \
"rmm=$MINOR_VERSION.*" \
"ucx-py=0.21.*" \
"ucx-py=0.22.*" \
"openjdk=8.*" \
"maven"

Expand Down
13 changes: 9 additions & 4 deletions conda/recipes/libcudf/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ test:
- test -f $PREFIX/include/cudf/aggregation.hpp
- test -f $PREFIX/include/cudf/ast/detail/expression_parser.hpp
- test -f $PREFIX/include/cudf/ast/detail/operators.hpp
- test -f $PREFIX/include/cudf/ast/nodes.hpp
- test -f $PREFIX/include/cudf/ast/operators.hpp
- test -f $PREFIX/include/cudf/ast/expressions.hpp
- test -f $PREFIX/include/cudf/binaryop.hpp
- test -f $PREFIX/include/cudf/labeling/label_bins.hpp
- test -f $PREFIX/include/cudf/column/column_factories.hpp
Expand Down Expand Up @@ -119,19 +118,25 @@ test:
- test -f $PREFIX/include/cudf/hashing.hpp
- test -f $PREFIX/include/cudf/interop.hpp
- test -f $PREFIX/include/cudf/io/avro.hpp
- test -f $PREFIX/include/cudf/io/csv.hpp
- test -f $PREFIX/include/cudf/io/data_sink.hpp
- test -f $PREFIX/include/cudf/io/datasource.hpp
- test -f $PREFIX/include/cudf/io/orc_metadata.hpp
- test -f $PREFIX/include/cudf/io/csv.hpp
- test -f $PREFIX/include/cudf/io/detail/avro.hpp
- test -f $PREFIX/include/cudf/io/detail/csv.hpp
- test -f $PREFIX/include/cudf/io/detail/json.hpp
- test -f $PREFIX/include/cudf/io/detail/orc.hpp
- test -f $PREFIX/include/cudf/io/detail/parquet.hpp
- test -f $PREFIX/include/cudf/io/detail/utils.hpp
- test -f $PREFIX/include/cudf/io/json.hpp
- test -f $PREFIX/include/cudf/io/orc_metadata.hpp
- test -f $PREFIX/include/cudf/io/orc.hpp
- test -f $PREFIX/include/cudf/io/parquet.hpp
- test -f $PREFIX/include/cudf/io/text/data_chunk_source_factories.hpp
- test -f $PREFIX/include/cudf/io/text/data_chunk_source.hpp
- test -f $PREFIX/include/cudf/io/text/detail/multistate.hpp
- test -f $PREFIX/include/cudf/io/text/detail/tile_state.hpp
- test -f $PREFIX/include/cudf/io/text/detail/trie.hpp
- test -f $PREFIX/include/cudf/io/text/multibyte_split.hpp
- test -f $PREFIX/include/cudf/io/types.hpp
- test -f $PREFIX/include/cudf/ipc.hpp
- test -f $PREFIX/include/cudf/join.hpp
Expand Down
24 changes: 21 additions & 3 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ elseif(CMAKE_CUDA_ARCHITECTURES STREQUAL "")
set(CUDF_BUILD_FOR_DETECTED_ARCHS TRUE)
endif()

file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-21.10/RAPIDS.cmake
${CMAKE_BINARY_DIR}/RAPIDS.cmake)
include(${CMAKE_BINARY_DIR}/RAPIDS.cmake)

include(rapids-cmake)
include(rapids-cpm)
include(rapids-cuda)
include(rapids-export)
include(rapids-find)


project(CUDF VERSION 21.10.00 LANGUAGES C CXX)

# Needed because GoogleBenchmark changes the state of FindThreads.cmake,
Expand Down Expand Up @@ -138,6 +149,9 @@ include(cmake/thirdparty/CUDF_GetArrow.cmake)
include(cmake/thirdparty/CUDF_GetDLPack.cmake)
# find libcu++
include(cmake/thirdparty/CUDF_GetLibcudacxx.cmake)
# find cuCollections
# Should come after including thrust and libcudacxx
include(cmake/thirdparty/CUDF_GetcuCollections.cmake)
# find or install GoogleTest
include(cmake/thirdparty/CUDF_GetGTest.cmake)
# preprocess jitify-able kernels
Expand All @@ -153,6 +167,7 @@ add_library(cudf
src/aggregation/aggregation.cu
src/aggregation/result_cache.cpp
src/ast/expression_parser.cpp
src/ast/expressions.cpp
src/binaryop/binaryop.cpp
src/binaryop/compiled/binary_ops.cu
src/binaryop/compiled/Add.cu
Expand Down Expand Up @@ -284,14 +299,15 @@ add_library(cudf
src/io/orc/writer_impl.cu
src/io/parquet/compact_protocol_writer.cpp
src/io/parquet/page_data.cu
src/io/parquet/page_dict.cu
src/io/parquet/chunk_dict.cu
src/io/parquet/page_enc.cu
src/io/parquet/page_hdr.cu
src/io/parquet/parquet.cpp
src/io/parquet/reader_impl.cu
src/io/parquet/writer_impl.cu
src/io/statistics/orc_column_statistics.cu
src/io/statistics/parquet_column_statistics.cu
src/io/text/multibyte_split.cu
src/io/utilities/column_buffer.cpp
src/io/utilities/data_sink.cpp
src/io/utilities/datasource.cpp
Expand Down Expand Up @@ -353,8 +369,9 @@ add_library(cudf
src/reshape/interleave_columns.cu
src/reshape/tile.cu
src/rolling/grouped_rolling.cu
src/rolling/rolling.cu
src/rolling/range_window_bounds.cpp
src/rolling/rolling.cu
src/rolling/rolling_collect_list.cu
src/round/round.cu
src/scalar/scalar.cpp
src/scalar/scalar_factories.cpp
Expand Down Expand Up @@ -526,7 +543,8 @@ target_link_libraries(cudf
PUBLIC ZLIB::ZLIB
${ARROW_LIBRARIES}
cudf::Thrust
rmm::rmm)
rmm::rmm
PRIVATE cuco::cuco)

if(CUDA_STATIC_RUNTIME)
# Tell CMake what CUDA language runtime to use
Expand Down
5 changes: 5 additions & 0 deletions cpp/benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -245,3 +245,8 @@ ConfigureBench(STRINGS_BENCH
# - json benchmark -------------------------------------------------------------------
ConfigureBench(JSON_BENCH
string/json_benchmark.cpp)

###################################################################################################
# - io benchmark ---------------------------------------------------------------------
ConfigureBench(MULTIBYTE_SPLIT_BENCHMARK
io/text/multibyte_split_benchmark.cpp)
10 changes: 5 additions & 5 deletions cpp/benchmarks/ast/transform_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,22 +95,22 @@ static void BM_ast_transform(benchmark::State& state)
// Note that a std::list is required here because of its guarantees against reference invalidation
// when items are added or removed. References to items in a std::vector are not safe if the
// vector must re-allocate.
auto expressions = std::list<cudf::ast::expression>();
auto expressions = std::list<cudf::ast::operation>();

// Construct tree that chains additions like (((a + b) + c) + d)
auto const op = cudf::ast::ast_operator::ADD;
if (reuse_columns) {
expressions.push_back(cudf::ast::expression(op, column_refs.at(0), column_refs.at(0)));
expressions.push_back(cudf::ast::operation(op, column_refs.at(0), column_refs.at(0)));
for (cudf::size_type i = 0; i < tree_levels - 1; i++) {
expressions.push_back(cudf::ast::expression(op, expressions.back(), column_refs.at(0)));
expressions.push_back(cudf::ast::operation(op, expressions.back(), column_refs.at(0)));
}
} else {
expressions.push_back(cudf::ast::expression(op, column_refs.at(0), column_refs.at(1)));
expressions.push_back(cudf::ast::operation(op, column_refs.at(0), column_refs.at(1)));
std::transform(std::next(column_refs.cbegin(), 2),
column_refs.cend(),
std::back_inserter(expressions),
[&](auto const& column_ref) {
return cudf::ast::expression(op, expressions.back(), column_ref);
return cudf::ast::operation(op, expressions.back(), column_ref);
});
}

Expand Down
8 changes: 4 additions & 4 deletions cpp/benchmarks/binaryop/binaryop_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ static void BM_binaryop_transform(benchmark::State& state)
auto const op = cudf::binary_operator::ADD;
auto result_data_type = cudf::data_type(cudf::type_to_id<key_type>());
if (reuse_columns) {
auto result = cudf::binary_operation(columns.at(0), columns.at(0), op, result_data_type);
auto result = cudf::jit::binary_operation(columns.at(0), columns.at(0), op, result_data_type);
for (cudf::size_type i = 0; i < tree_levels - 1; i++) {
result = cudf::binary_operation(result->view(), columns.at(0), op, result_data_type);
result = cudf::jit::binary_operation(result->view(), columns.at(0), op, result_data_type);
}
} else {
auto result = cudf::binary_operation(columns.at(0), columns.at(1), op, result_data_type);
auto result = cudf::jit::binary_operation(columns.at(0), columns.at(1), op, result_data_type);
std::for_each(std::next(columns.cbegin(), 2), columns.cend(), [&](auto const& col) {
result = cudf::binary_operation(result->view(), col, op, result_data_type);
result = cudf::jit::binary_operation(result->view(), col, op, result_data_type);
});
}
}
Expand Down
4 changes: 2 additions & 2 deletions cpp/benchmarks/binaryop/compiled_binaryop_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ void BM_compiled_binaryop(benchmark::State& state, cudf::binary_operator binop)
auto output_dtype = cudf::data_type(cudf::type_to_id<TypeOut>());

// Call once for hot cache.
cudf::experimental::binary_operation(lhs, rhs, binop, output_dtype);
cudf::binary_operation(lhs, rhs, binop, output_dtype);

for (auto _ : state) {
cuda_event_timer timer(state, true);
cudf::experimental::binary_operation(lhs, rhs, binop, output_dtype);
cudf::binary_operation(lhs, rhs, binop, output_dtype);
}
}

Expand Down
4 changes: 2 additions & 2 deletions cpp/benchmarks/binaryop/jit_binaryop_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ void BM_binaryop(benchmark::State& state, cudf::binary_operator binop)
auto output_dtype = cudf::data_type(cudf::type_to_id<TypeOut>());

// Call once for hot cache.
cudf::binary_operation(lhs, rhs, binop, output_dtype);
cudf::jit::binary_operation(lhs, rhs, binop, output_dtype);

for (auto _ : state) {
cuda_event_timer timer(state, true);
cudf::binary_operation(lhs, rhs, binop, output_dtype);
cudf::jit::binary_operation(lhs, rhs, binop, output_dtype);
}
}

Expand Down
3 changes: 2 additions & 1 deletion cpp/benchmarks/groupby/group_nth_benchmark.cu
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ void BM_pre_sorted_nth(benchmark::State& state)
std::vector<cudf::groupby::aggregation_request> requests;
requests.emplace_back(cudf::groupby::aggregation_request());
requests[0].values = vals;
requests[0].aggregations.push_back(cudf::make_nth_element_aggregation(-1));
requests[0].aggregations.push_back(
cudf::make_nth_element_aggregation<cudf::groupby_aggregation>(-1));

for (auto _ : state) {
cuda_event_timer timer(state, true);
Expand Down
4 changes: 2 additions & 2 deletions cpp/benchmarks/groupby/group_sum_benchmark.cu
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void BM_basic_sum(benchmark::State& state)
std::vector<cudf::groupby::aggregation_request> requests;
requests.emplace_back(cudf::groupby::aggregation_request());
requests[0].values = vals;
requests[0].aggregations.push_back(cudf::make_sum_aggregation());
requests[0].aggregations.push_back(cudf::make_sum_aggregation<cudf::groupby_aggregation>());

for (auto _ : state) {
cuda_event_timer timer(state, true);
Expand Down Expand Up @@ -97,7 +97,7 @@ void BM_pre_sorted_sum(benchmark::State& state)
std::vector<cudf::groupby::aggregation_request> requests;
requests.emplace_back(cudf::groupby::aggregation_request());
requests[0].values = vals;
requests[0].aggregations.push_back(cudf::make_sum_aggregation());
requests[0].aggregations.push_back(cudf::make_sum_aggregation<cudf::groupby_aggregation>());

for (auto _ : state) {
cuda_event_timer timer(state, true);
Expand Down
2 changes: 2 additions & 0 deletions cpp/benchmarks/io/cuio_benchmark_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ using cudf::io::io_type;
benchmark(name##_buffer_output, type_or_group, static_cast<uint32_t>(io_type::HOST_BUFFER)); \
benchmark(name##_void_output, type_or_group, static_cast<uint32_t>(io_type::VOID));

std::string random_file_in_dir(std::string const& dir_path);

/**
* @brief Class to create a coupled `source_info` and `sink_info` of given type.
*/
Expand Down
Loading

0 comments on commit eb399fb

Please sign in to comment.