Skip to content

Commit

Permalink
Merge branch 'branch-22.10' of github.com:rapidsai/cudf into fea-json…
Browse files Browse the repository at this point in the history
…-tree-gpu
  • Loading branch information
karthikeyann committed Sep 17, 2022
2 parents 90cd2dc + 75d126a commit 89188cd
Show file tree
Hide file tree
Showing 108 changed files with 3,644 additions and 1,154 deletions.
26 changes: 21 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,15 @@ repos:
files: python/.*\.(py|pyx|pxd)$
types: [file]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v0.782'
rev: 'v0.971'
hooks:
- id: mypy
args: ["--config-file=setup.cfg", "python/cudf/cudf", "python/dask_cudf/dask_cudf", "python/custreamz/custreamz", "python/cudf_kafka/cudf_kafka"]
additional_dependencies: [types-cachetools]
args: ["--config-file=setup.cfg",
"python/cudf/cudf",
"python/custreamz/custreamz",
"python/cudf_kafka/cudf_kafka",
"python/dask_cudf/dask_cudf"]
pass_filenames: false
- repo: https://github.com/PyCQA/pydocstyle
rev: 6.1.1
Expand All @@ -40,9 +45,8 @@ repos:
rev: v11.1.0
hooks:
- id: clang-format
files: \.(cu|cuh|h|hpp|cpp|inl)$
types_or: [file]
args: ['-fallback-style=none', '-style=file', '-i']
types_or: [c, c++, cuda]
args: ["-fallback-style=none", "-style=file", "-i"]
- repo: local
hooks:
- id: no-deprecationwarning
Expand Down Expand Up @@ -88,6 +92,18 @@ repos:
language: system
pass_filenames: false
verbose: true
- id: headers-recipe-check
name: headers-recipe-check
entry: ./ci/checks/headers_test.sh
files: |
(?x)^(
^cpp/include/|
^conda/.*/meta.yaml
)
types_or: [file]
language: system
pass_filenames: false
verbose: false

default_language_version:
python: python3
5 changes: 1 addition & 4 deletions ci/checks/headers_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,9 @@ for DIRNAME in ${DIRNAMES[@]}; do
LIB_RETVAL=$?

if [ "$LIB_RETVAL" != "0" ]; then
echo -e "\n\n>>>> FAILED: lib${LIBNAME} header existence conda/recipes/lib${LIBNAME}/meta.yaml check; begin output\n\n"
echo -e ">>>> FAILED: lib${LIBNAME} has different headers in include/${DIRNAME}/ and conda/recipes/lib${LIBNAME}/meta.yaml. The diff is shown below:"
echo -e "$HEADER_DIFF"
echo -e "\n\n>>>> FAILED: lib${LIBNAME} header existence conda/recipes/lib${LIBNAME}/meta.yaml check; end output\n\n"
RETVAL=1
else
echo -e "\n\n>>>> PASSED: lib${LIBNAME} header existence conda/recipes/lib${LIBNAME}/meta.yaml check\n\n"
fi
done

Expand Down
25 changes: 4 additions & 21 deletions ci/checks/style.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ export RAPIDS_CMAKE_FORMAT_FILE=/tmp/rapids_cmake_ci/cmake-formats-rapids-cmake.
mkdir -p $(dirname ${RAPIDS_CMAKE_FORMAT_FILE})
wget -O ${RAPIDS_CMAKE_FORMAT_FILE} ${FORMAT_FILE_URL}


# Run pre-commit checks
pre-commit run --hook-stage manual --all-files
PRE_COMMIT_RETVAL=$?

# Check for copyright headers in the files modified currently
COPYRIGHT=`python ci/checks/copyright.py --git-modified-only 2>&1`
CR_RETVAL=$?
COPYRIGHT_RETVAL=$?

# Output results if failure otherwise show pass
if [ "$CR_RETVAL" != "0" ]; then
if [ "$COPYRIGHT_RETVAL" != "0" ]; then
echo -e "\n\n>>>> FAILED: copyright check; begin output\n\n"
echo -e "$COPYRIGHT"
echo -e "\n\n>>>> FAILED: copyright check; end output\n\n"
Expand All @@ -37,25 +37,8 @@ else
echo -e "$COPYRIGHT"
fi

# Run clang-format and check for a consistent code format
CLANG_FORMAT=`python cpp/scripts/run-clang-format.py 2>&1`
CLANG_FORMAT_RETVAL=$?

if [ "$CLANG_FORMAT_RETVAL" != "0" ]; then
echo -e "\n\n>>>> FAILED: clang format check; begin output\n\n"
echo -e "$CLANG_FORMAT"
echo -e "\n\n>>>> FAILED: clang format check; end output\n\n"
else
echo -e "\n\n>>>> PASSED: clang format check\n\n"
fi

# Run header meta.yml check and get results/return code
HEADER_META=`ci/checks/headers_test.sh`
HEADER_META_RETVAL=$?
echo -e "$HEADER_META"

RETVALS=(
$CR_RETVAL $PRE_COMMIT_RETVAL $CLANG_FORMAT_RETVAL $HEADER_META_RETVAL
$PRE_COMMIT_RETVAL $COPYRIGHT_RETVAL
)
IFS=$'\n'
RETVAL=`echo "${RETVALS[*]}" | sort -nr | head -n1`
Expand Down
3 changes: 2 additions & 1 deletion conda/environments/cudf_dev_cuda11.5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ dependencies:
- flake8=3.8.3
- black=22.3.0
- isort=5.10.1
- mypy=0.782
- mypy=0.971
- types-cachetools
- doxygen=1.8.20
- pydocstyle=6.1.1
- typing_extensions
Expand Down
4 changes: 2 additions & 2 deletions cpp/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: true
AllowShortBlocksOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: true
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
Expand All @@ -27,7 +27,7 @@ AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterClass: false
Expand Down
11 changes: 10 additions & 1 deletion cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,11 @@ target_compile_options(
"$<BUILD_INTERFACE:$<$<COMPILE_LANGUAGE:CUDA>:${CUDF_CUDA_FLAGS}>>"
)

target_link_libraries(cudftestutil PUBLIC GTest::gmock GTest::gtest Threads::Threads cudf)
target_link_libraries(
cudftestutil
PUBLIC GTest::gmock GTest::gtest Threads::Threads cudf
PRIVATE $<TARGET_NAME_IF_EXISTS:conda_env>
)

target_include_directories(
cudftestutil PUBLIC "$<BUILD_INTERFACE:${CUDF_SOURCE_DIR}>"
Expand Down Expand Up @@ -750,6 +754,11 @@ if(CUDF_BUILD_BENCHMARKS)
add_subdirectory(benchmarks)
endif()

# build pretty-printer load script
if(Thrust_SOURCE_DIR AND rmm_SOURCE_DIR)
configure_file(scripts/load-pretty-printers.in load-pretty-printers @ONLY)
endif()

# ##################################################################################################
# * install targets -------------------------------------------------------------------------------
rapids_cmake_install_lib_dir(lib_dir)
Expand Down
12 changes: 8 additions & 4 deletions cpp/benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ target_compile_options(
)

target_link_libraries(
cudf_datagen PUBLIC GTest::gmock GTest::gtest GTest::gmock_main GTest::gtest_main
benchmark::benchmark nvbench::nvbench Threads::Threads cudf cudftestutil
cudf_datagen
PUBLIC GTest::gmock GTest::gtest GTest::gmock_main GTest::gtest_main benchmark::benchmark
nvbench::nvbench Threads::Threads cudf cudftestutil
PRIVATE $<TARGET_NAME_IF_EXISTS:conda_env>
)

target_include_directories(
Expand All @@ -41,7 +43,7 @@ add_library(
cudf_benchmark_common OBJECT "${CUDF_SOURCE_DIR}/tests/utilities/base_fixture.cpp"
synchronization/synchronization.cpp io/cuio_common.cpp
)
target_link_libraries(cudf_benchmark_common PRIVATE cudf_datagen)
target_link_libraries(cudf_benchmark_common PRIVATE cudf_datagen $<TARGET_NAME_IF_EXISTS:conda_env>)
add_custom_command(
OUTPUT CUDF_BENCHMARKS
COMMAND echo Running benchmarks
Expand All @@ -68,6 +70,7 @@ function(ConfigureBench CMAKE_BENCH_NAME)
)
target_link_libraries(
${CMAKE_BENCH_NAME} PRIVATE cudf_benchmark_common cudf_datagen benchmark::benchmark_main
$<TARGET_NAME_IF_EXISTS:conda_env>
)
add_custom_command(
OUTPUT CUDF_BENCHMARKS
Expand Down Expand Up @@ -96,6 +99,7 @@ function(ConfigureNVBench CMAKE_BENCH_NAME)
)
target_link_libraries(
${CMAKE_BENCH_NAME} PRIVATE cudf_benchmark_common cudf_datagen nvbench::main
$<TARGET_NAME_IF_EXISTS:conda_env>
)
install(
TARGETS ${CMAKE_BENCH_NAME}
Expand Down Expand Up @@ -165,7 +169,7 @@ ConfigureNVBench(SEARCH_NVBENCH search/contains.cpp)
# ##################################################################################################
# * sort benchmark --------------------------------------------------------------------------------
ConfigureBench(SORT_BENCH sort/rank.cpp sort/sort.cpp sort/sort_strings.cpp)
ConfigureNVBench(SORT_NVBENCH sort/sort_structs.cpp)
ConfigureNVBench(SORT_NVBENCH sort/sort_lists.cpp sort/sort_structs.cpp)

# ##################################################################################################
# * quantiles benchmark
Expand Down
49 changes: 49 additions & 0 deletions cpp/benchmarks/sort/sort_lists.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* Copyright (c) 2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#include <benchmarks/common/generate_input.hpp>
#include <benchmarks/fixture/rmm_pool_raii.hpp>

#include <cudf/detail/sorting.hpp>

#include <nvbench/nvbench.cuh>

void nvbench_sort_lists(nvbench::state& state)
{
cudf::rmm_pool_raii pool_raii;

const size_t size_bytes(state.get_int64("size_bytes"));
const cudf::size_type depth{static_cast<cudf::size_type>(state.get_int64("depth"))};
auto const null_frequency{state.get_float64("null_frequency")};

data_profile table_profile;
table_profile.set_distribution_params(cudf::type_id::LIST, distribution_id::UNIFORM, 0, 5);
table_profile.set_list_depth(depth);
table_profile.set_null_probability(null_frequency);
auto const table =
create_random_table({cudf::type_id::LIST}, table_size_bytes{size_bytes}, table_profile);

state.exec(nvbench::exec_tag::sync, [&](nvbench::launch& launch) {
rmm::cuda_stream_view stream_view{launch.get_stream()};
cudf::detail::sorted_order(*table, {}, {}, stream_view, rmm::mr::get_current_device_resource());
});
}

NVBENCH_BENCH(nvbench_sort_lists)
.set_name("sort_list")
.add_int64_power_of_two_axis("size_bytes", {10, 18, 24, 28})
.add_int64_axis("depth", {1, 4})
.add_float64_axis("null_frequency", {0, 0.2});
8 changes: 6 additions & 2 deletions cpp/doxygen/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.

LAYOUT_FILE =
LAYOUT_FILE = DoxygenLayout.xml

# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
# the reference definitions. This must be a list of .bib files. The .bib
Expand Down Expand Up @@ -830,6 +830,10 @@ WARN_LOGFILE =
INPUT = main_page.md \
regex.md \
unicode.md \
developer_guide/BENCHMARKING.md \
developer_guide/DOCUMENTATION.md \
developer_guide/DEVELOPER_GUIDE.md \
developer_guide/TESTING.md \
../include \
../include/cudf_test/column_wrapper.hpp \
../include/cudf_test/column_utilities.hpp \
Expand Down Expand Up @@ -975,7 +979,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.

FILTER_PATTERNS =
FILTER_PATTERNS = *.md=./modify_fences.sh

# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
# INPUT_FILTER) will also be used to filter the input files that are used for
Expand Down
Loading

0 comments on commit 89188cd

Please sign in to comment.