forked from rapidsai/cudf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'branch-24.08' of github.com:rapidsai/cudf into pylibcud…
…f-io-writers
- Loading branch information
Showing
63 changed files
with
1,273 additions
and
549 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2024, NVIDIA CORPORATION. | ||
|
||
set -eou pipefail | ||
|
||
# We will only fail these tests if the PR touches code in pylibcudf | ||
# or cudf_polars itself. | ||
# Note, the three dots mean we are doing diff between the merge-base | ||
# of upstream and HEAD. So this is asking, "does _this branch_ touch | ||
# files in cudf_polars/pylibcudf", rather than "are there changes | ||
# between upstream and this branch which touch cudf_polars/pylibcudf" | ||
# TODO: is the target branch exposed anywhere in an environment variable? | ||
if [ -n "$(git diff --name-only origin/branch-24.08...HEAD -- python/cudf_polars/ python/cudf/cudf/_lib/pylibcudf/)" ]; | ||
then | ||
HAS_CHANGES=1 | ||
else | ||
HAS_CHANGES=0 | ||
fi | ||
|
||
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" | ||
RAPIDS_PY_WHEEL_NAME="cudf_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./dist | ||
|
||
RESULTS_DIR=${RAPIDS_TESTS_DIR:-"$(mktemp -d)"} | ||
RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${RESULTS_DIR}/test-results"}/ | ||
mkdir -p "${RAPIDS_TESTS_DIR}" | ||
|
||
rapids-logger "Install cudf wheel" | ||
# echo to expand wildcard before adding `[extra]` requires for pip | ||
python -m pip install $(echo ./dist/cudf*.whl)[test] | ||
|
||
rapids-logger "Install polars (allow pre-release versions)" | ||
python -m pip install 'polars>=1.0.0a0' | ||
|
||
rapids-logger "Install cudf_polars" | ||
python -m pip install --no-deps python/cudf_polars | ||
|
||
rapids-logger "Run cudf_polars tests" | ||
|
||
function set_exitcode() | ||
{ | ||
EXITCODE=$? | ||
} | ||
EXITCODE=0 | ||
trap set_exitcode ERR | ||
set +e | ||
|
||
python -m pytest \ | ||
--cache-clear \ | ||
--cov cudf_polars \ | ||
--cov-fail-under=100 \ | ||
--cov-config=python/cudf_polars/pyproject.toml \ | ||
--junitxml="${RAPIDS_TESTS_DIR}/junit-cudf_polars.xml" \ | ||
python/cudf_polars/tests | ||
|
||
trap ERR | ||
set -e | ||
|
||
if [ ${EXITCODE} != 0 ]; then | ||
rapids-logger "Testing FAILED: exitcode ${EXITCODE}" | ||
else | ||
rapids-logger "Testing PASSED" | ||
fi | ||
|
||
if [ ${HAS_CHANGES} == 1 ]; then | ||
exit ${EXITCODE} | ||
else | ||
exit 0 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* Copyright (c) 2024, 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. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <rmm/cuda_stream_view.hpp> | ||
|
||
namespace cudf::detail { | ||
|
||
enum class host_memory_kind : uint8_t { PINNED, PAGEABLE }; | ||
|
||
/** | ||
* @brief Asynchronously copies data between the host and device. | ||
* | ||
* Implementation may use different strategies depending on the size and type of host data. | ||
* | ||
* @param dst Destination memory address | ||
* @param src Source memory address | ||
* @param size Number of bytes to copy | ||
* @param kind Type of host memory | ||
* @param stream CUDA stream used for the copy | ||
*/ | ||
void cuda_memcpy_async( | ||
void* dst, void const* src, size_t size, host_memory_kind kind, rmm::cuda_stream_view stream); | ||
|
||
/** | ||
* @brief Synchronously copies data between the host and device. | ||
* | ||
* Implementation may use different strategies depending on the size and type of host data. | ||
* | ||
* @param dst Destination memory address | ||
* @param src Source memory address | ||
* @param size Number of bytes to copy | ||
* @param kind Type of host memory | ||
* @param stream CUDA stream used for the copy | ||
*/ | ||
void cuda_memcpy( | ||
void* dst, void const* src, size_t size, host_memory_kind kind, rmm::cuda_stream_view stream); | ||
|
||
} // namespace cudf::detail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.