Skip to content

Commit

Permalink
Merge pull request #116 from rapidsai/branch-22.08
Browse files Browse the repository at this point in the history
[RELEASE] kvikio v22.08
  • Loading branch information
raydouglass authored Aug 18, 2022
2 parents 5cddbab + 4a69471 commit be439b6
Show file tree
Hide file tree
Showing 33 changed files with 613 additions and 391 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# kvikio 22.06.00 (Date TBD)
# kvikio 22.08.00 (Date TBD)

Please see https://github.com/rapidsai/kvikio/releases/tag/v22.06.00a for the latest changes to this development branch.
Please see https://github.com/rapidsai/kvikio/releases/tag/v22.08.00a for the latest changes to this development branch.

# kvikio 22.06.00 (Date TBD)

Please see https://github.com/rapidsai/kvikio/releases/tag/v22.06.00a for the latest changes to this development branch.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ For testing:
## Install

### Conda

Install the stable releease from the `rapidsai` channel like:
```
conda create -n kvikio_env -c rapidsai -c conda-forge kvikio
```

Install the `kvikio` conda package from the `rapidsai-nightly` channel like:
```
conda create -n kvikio_env -c rapidsai-nightly -c conda-forge python=3.8 cudatoolkit=11.5 kvikio
Expand Down
39 changes: 30 additions & 9 deletions ci/gpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,23 +66,44 @@ gpuci_conda_retry mambabuild --croot ${CONDA_BLD_DIR} conda/recipes/libkvikio
gpuci_conda_retry mambabuild --croot ${CONDA_BLD_DIR} conda/recipes/kvikio --python=$PYTHON -c "${CONDA_BLD_DIR}"
gpuci_mamba_retry install -c "${CONDA_BLD_DIR}" libkvikio kvikio

gpuci_logger "Install test dependencies"
gpuci_mamba_retry install -c conda-forge -c rapidsai-nightly cudf

gpuci_logger "Python py.test for kvikio"
cd "${WORKSPACE}/python"
py.test --cache-clear --basetemp="${WORKSPACE}/cudf-cuda-tmp" --junitxml="${WORKSPACE}/junit-kvikio.xml" -v

cd "${WORKSPACE}"
gpuci_logger "Clean previous conda builds"
gpuci_mamba_retry uninstall libkvikio kvikio
rm -rf "${CONDA_BLD_DIR}"

gpuci_logger "Build and run libkvikio-debug"
mkdir "${WORKSPACE}/libkvikio-debug-build"
cd "${WORKSPACE}/libkvikio-debug-build"
cmake ${WORKSPACE}/cpp -DCMAKE_BUILD_TYPE=Debug
make
export CMAKE_EXTRA_ARGS="-DCMAKE_BUILD_TYPE=Debug"
gpuci_conda_retry mambabuild --croot ${CONDA_BLD_DIR} --no-remove-work-dir --keep-old-work conda/recipes/libkvikio
gpuci_mamba_retry install -c "${CONDA_BLD_DIR}" libkvikio

# Check that `libcuda.so` is NOT being linked
LDD_BASIC_IO=`ldd ${WORKSPACE}/libkvikio-debug-build/examples/basic_io`
LDD_BASIC_IO=$(ldd "${CONDA_BLD_DIR}/work/cpp/build/examples/basic_io")
if [[ "$LDD_BASIC_IO" == *"libcuda.so"* ]]; then
echo "[ERROR] examples/basic_io shouln't link to libcuda.so: ${LDD_BASIC_IO}"
return 1
fi

# Run basic_io
${WORKSPACE}/libkvikio-debug-build/examples/basic_io
"${CONDA_BLD_DIR}/work/cpp/build/examples/basic_io"

cd "${WORKSPACE}/python"
gpuci_logger "Python py.test for kvikio"
py.test -n 6 --cache-clear --basetemp="${WORKSPACE}/cudf-cuda-tmp" --junitxml="${WORKSPACE}/junit-kvikio.xml" -v
gpuci_logger "Clean previous conda builds"
gpuci_mamba_retry uninstall libkvikio
rm -rf "${CONDA_BLD_DIR}"

gpuci_logger "Build and run libkvikio-no-cufile"
export CMAKE_EXTRA_ARGS="-DCMAKE_DISABLE_FIND_PACKAGE_cuFile=TRUE"
gpuci_conda_retry mambabuild --croot ${CONDA_BLD_DIR} --no-remove-work-dir --keep-old-work conda/recipes/libkvikio
gpuci_mamba_retry install -c "${CONDA_BLD_DIR}" libkvikio

# Run basic_io
"${CONDA_BLD_DIR}/work/cpp/build/examples/basic_io"

if [ -n "${CODECOV_TOKEN}" ]; then
codecov -t $CODECOV_TOKEN
Expand Down
49 changes: 49 additions & 0 deletions conda/environments/kvikio_dev_cuda11.5.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Copyright (c) 2021-2022, NVIDIA CORPORATION.

name: kvikio_dev
channels:
- rapidsai
- nvidia
- rapidsai-nightly
- conda-forge
dependencies:
- c-compiler
- cxx-compiler
- clang=11.1.0
- clang-tools=11.1.0
- cupy>=9.5.0,<11.0.0a0
- cmake>=3.20.1,!=3.23.0
- cmake-format>=3.20.1,!=3.23.0
- cmake_setuptools>=0.1.3
- scikit-build>=0.13.1
- python>=3.8,<3.10
- numpy
- ninja
- wheel
- setuptools
- pyparsing
- distro
- cython>=0.29,<0.30
- pytest
- sphinx
- sphinxcontrib-websupport
- nbsphinx
- numpydoc
- ipython
- cudatoolkit=11.5
- pip
- dask>=2022.05.2
- distributed>=2022.05.2
- flake8=3.8.3
- black=22.3.0
- isort=5.6.4
- mypy=0.782
- doxygen=1.8.20
- pydocstyle=6.1.1
- pre-commit
- pydata-sphinx-theme
- gcc_linux-64=9.* # [linux64]
- sysroot_linux-64==2.17 # [linux64]
# Un-comment following lines for ARM specific packages.
# - gcc_linux-aarch64=9.* # [aarch64]
# - sysroot_linux-aarch64==2.17 # [aarch64]
1 change: 1 addition & 0 deletions conda/recipes/kvikio/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ requirements:
- scikit-build >=0.13.1
- libkvikio {{ version }}
run:
- python
- cupy
- zarr
- {{ pin_compatible('cudatoolkit', max_pin='x', min_pin='x') }}
Expand Down
2 changes: 1 addition & 1 deletion conda/recipes/libkvikio/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ mkdir cpp/build
pushd cpp/build
cmake .. \
-DCMAKE_INSTALL_PREFIX="${PREFIX}" \

${CMAKE_EXTRA_ARGS}
make
make install
popd
1 change: 1 addition & 0 deletions conda/recipes/libkvikio/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ build:
- SCCACHE_BUCKET=rapids-sccache
- SCCACHE_REGION=us-west-2
- SCCACHE_IDLE_TIMEOUT=32768
- CMAKE_EXTRA_ARGS
run_exports:
- {{ pin_subpackage("libkvikio", max_pin="x.x") }}
ignore_run_exports_from:
Expand Down
14 changes: 12 additions & 2 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ include(rapids-find)

project(
KvikIO
VERSION 22.06.00
VERSION 22.08.00
LANGUAGES CXX
)

Expand Down Expand Up @@ -58,7 +58,7 @@ rapids_find_package(
INSTALL_EXPORT_SET kvikio-exports
)
if(NOT cuFile_FOUND)
message(WARNING "Building KvikIO without cuFile.h")
message(WARNING "Building KvikIO without cuFile")
endif()

# library targets
Expand Down Expand Up @@ -97,6 +97,16 @@ install(TARGETS kvikio EXPORT kvikio-exports)
install(DIRECTORY include/kvikio/ DESTINATION include/kvikio)
install(FILES ${KvikIO_BINARY_DIR}/include/kvikio/version_config.hpp DESTINATION include/kvikio)

include("${rapids-cmake-dir}/export/find_package_file.cmake")
rapids_export_find_package_file(BUILD
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/FindcuFile.cmake"
kvikio-exports
)
rapids_export_find_package_file(INSTALL
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/FindcuFile.cmake"
kvikio-exports
)

set(doc_string
[=[
Provide targets for KvikIO: C++ bindings for cuFile.
Expand Down
16 changes: 9 additions & 7 deletions cpp/cmake/Modules/FindcuFile.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# =============================================================================
# Copyright (c) 2020, NVIDIA CORPORATION.
# Copyright (c) 2020-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
Expand Down Expand Up @@ -54,22 +54,24 @@ pkg_check_modules(PKG_cuFile QUIET cuFile)
set(cuFile_COMPILE_OPTIONS ${PKG_cuFile_CFLAGS_OTHER})
set(cuFile_VERSION ${PKG_cuFile_VERSION})

# Find the location of the CUDA Toolkit
find_package(CUDAToolkit QUIET)
find_path(
cuFile_INCLUDE_DIR
NAMES cufile.h
HINTS ${PKG_cuFile_INCLUDE_DIRS} /usr/local/cuda/include /usr/local/cuda/lib64
HINTS ${PKG_cuFile_INCLUDE_DIRS} ${CUDAToolkit_INCLUDE_DIRS}
)

find_library(
cuFile_LIBRARY
NAMES cufile
HINTS ${PKG_cuFile_LIBRARY_DIRS} /usr/local/cuda/lib64
HINTS ${PKG_cuFile_LIBRARY_DIRS} ${CUDAToolkit_LIBRARY_DIR}
)

find_library(
cuFileRDMA_LIBRARY
NAMES cufile_rdma
HINTS ${PKG_cuFile_LIBRARY_DIRS} /usr/local/cuda/lib64
HINTS ${PKG_cuFile_LIBRARY_DIRS} ${CUDAToolkit_LIBRARY_DIR}
)

include(FindPackageHandleStandardArgs)
Expand All @@ -81,7 +83,7 @@ find_package_handle_standard_args(
)

if(cuFile_INCLUDE_DIR AND NOT TARGET cufile::cuFile_interface)
add_library(cufile::cuFile_interface IMPORTED INTERFACE)
add_library(cufile::cuFile_interface INTERFACE IMPORTED GLOBAL)
target_include_directories(
cufile::cuFile_interface INTERFACE "$<BUILD_INTERFACE:${cuFile_INCLUDE_DIR}>"
)
Expand All @@ -90,7 +92,7 @@ if(cuFile_INCLUDE_DIR AND NOT TARGET cufile::cuFile_interface)
endif()

if(cuFile_FOUND AND NOT TARGET cufile::cuFile)
add_library(cufile::cuFile UNKNOWN IMPORTED)
add_library(cufile::cuFile UNKNOWN IMPORTED GLOBAL)
set_target_properties(
cufile::cuFile
PROPERTIES IMPORTED_LOCATION "${cuFile_LIBRARY}"
Expand All @@ -100,7 +102,7 @@ if(cuFile_FOUND AND NOT TARGET cufile::cuFile)
endif()

if(cuFile_FOUND AND NOT TARGET cufile::cuFileRDMA)
add_library(cufile::cuFileRDMA UNKNOWN IMPORTED)
add_library(cufile::cuFileRDMA UNKNOWN IMPORTED GLOBAL)
set_target_properties(
cufile::cuFileRDMA
PROPERTIES IMPORTED_LOCATION "${cuFileRDMA_LIBRARY}"
Expand Down
2 changes: 1 addition & 1 deletion cpp/cmake/fetch_rapids.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# or implied. See the License for the specific language governing permissions and limitations under
# the License.
# =============================================================================
file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-22.06/RAPIDS.cmake
file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-22.08/RAPIDS.cmake
${CMAKE_BINARY_DIR}/RAPIDS.cmake
)
include(${CMAKE_BINARY_DIR}/RAPIDS.cmake)
6 changes: 3 additions & 3 deletions cpp/doxygen/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "libkvikio"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 22.06.00
PROJECT_NUMBER = 22.08.00

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down Expand Up @@ -1127,7 +1127,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_HEADER =
HTML_HEADER = header.html

# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
# generated HTML page. If the tag is left blank doxygen will generate a standard
Expand Down Expand Up @@ -1162,7 +1162,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_EXTRA_STYLESHEET = rapids.css
HTML_EXTRA_STYLESHEET =

# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the HTML output directory. Note
Expand Down
62 changes: 62 additions & 0 deletions cpp/doxygen/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<!-- HTML header for doxygen 1.8.20-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen $doxygenversion"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="$relpath^jquery.js"></script>
<script type="text/javascript" src="$relpath^dynsections.js"></script>
$treeview
$search
$mathjax
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
$extrastylesheet

<!-- RAPIDS CUSTOM JS & CSS: START, Please add these two lines back after every version upgrade -->
<script defer src="https://docs.rapids.ai/assets/js/custom.js"></script>
<link rel="stylesheet" href="https://docs.rapids.ai/assets/css/custom.css">
<!-- RAPIDS CUSTOM JS & CSS: END -->

</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->

<!--BEGIN TITLEAREA-->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<!--BEGIN PROJECT_LOGO-->
<td id="projectlogo"><img alt="Logo" src="$relpath^$projectlogo"/></td>
<!--END PROJECT_LOGO-->
<!--BEGIN PROJECT_NAME-->
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">$projectname
<!--BEGIN PROJECT_NUMBER-->&#160;<span id="projectnumber">$projectnumber</span><!--END PROJECT_NUMBER-->
</div>
<!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
</td>
<!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME-->
<!--BEGIN PROJECT_BRIEF-->
<td style="padding-left: 0.5em;">
<div id="projectbrief">$projectbrief</div>
</td>
<!--END PROJECT_BRIEF-->
<!--END !PROJECT_NAME-->
<!--BEGIN DISABLE_INDEX-->
<!--BEGIN SEARCHENGINE-->
<td>$searchbox</td>
<!--END SEARCHENGINE-->
<!--END DISABLE_INDEX-->
</tr>
</tbody>
</table>
</div>
<!--END TITLEAREA-->
<!-- end header part -->
Loading

0 comments on commit be439b6

Please sign in to comment.