Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Windows compilation #1298

Draft
wants to merge 29 commits into
base: branch-23.08
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
bf5d799
add dlfcn-win32, disable dl.lib, cuda-nvcc, cuda-python
karthikeyann Jul 4, 2023
db73b0e
logical operator using ciso646
karthikeyann Jul 4, 2023
cb7e999
fixes for macros RMM_EXPECTS, RMM_FAIL_OOM
karthikeyann Jul 4, 2023
c8e15b9
fix missing lambda capture
karthikeyann Jul 4, 2023
b9a18f4
fix macro within gtest macro
karthikeyann Jul 4, 2023
8d04f09
fix mkdtemp, setenv, unsetenv
karthikeyann Jul 4, 2023
1dce2bd
fix CTAD constructor bug
karthikeyann Jul 4, 2023
179dbe7
disable int8_t due to <random> unsupported
karthikeyann Jul 4, 2023
8bae4e2
fix for UL, long not 64bit
karthikeyann Jul 4, 2023
ba7342d
fix auto* to auto
karthikeyann Jul 4, 2023
3e0890f
hack move-only type issue with std::set, std::move
karthikeyann Jul 4, 2023
07823b8
fix dlopen dll
karthikeyann Jul 5, 2023
3bf40a4
add missing ifdef _WIN32
karthikeyann Jul 5, 2023
479c03a
add if(WIN32) for pthread
karthikeyann Jul 5, 2023
21294aa
workaround msvc vaargs in macro compatibility
karthikeyann Jul 5, 2023
f97dc96
clang-format style fixes
karthikeyann Jul 5, 2023
6b1bb46
unblock style check (TODO windows conda yml)
karthikeyann Jul 5, 2023
71435c1
cmake-format style fix
karthikeyann Jul 5, 2023
c856005
v23.10
raydouglass Jul 20, 2023
0d95674
Merge branch 'branch-23.08' into branch-23.10-merge-23.08
vyasr Jul 25, 2023
8efecbc
Merge pull request #1309 from vyasr/branch-23.10-merge-23.08
ajschmidt8 Jul 25, 2023
ce45193
Merge branch 'branch-23.08' into branch-23.10-merge-23.08
vyasr Jul 26, 2023
5cbb248
Merge pull request #1312 from vyasr/branch-23.10-merge-23.08
raydouglass Jul 26, 2023
c4618eb
Use fetch_rapids.cmake. (#1319)
bdice Aug 1, 2023
2376e08
Update to Cython 3.0.0 (#1313)
vyasr Aug 4, 2023
cd37245
Treat warnings as errors in Python documentation (#1316)
vyasr Aug 7, 2023
934b8d9
Merge pull request #1323 from rapidsai/branch-23.08
GPUtester Aug 9, 2023
663e659
Fix missing jQuery error in docs (#1321)
AyodeAwe Aug 10, 2023
7b47ad1
Merge branch 'branch-23.10' of github.com:rapidsai/rmm into windows_c…
karthikeyann Aug 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ concurrency:
jobs:
cpp-build:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.10
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -37,7 +37,7 @@ jobs:
python-build:
needs: [cpp-build]
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@branch-23.10
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -46,7 +46,7 @@ jobs:
upload-conda:
needs: [cpp-build, python-build]
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/conda-upload-packages.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/conda-upload-packages.yaml@branch-23.10
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -56,7 +56,7 @@ jobs:
if: github.ref_type == 'branch'
needs: python-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.10
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -68,7 +68,7 @@ jobs:
run_script: "ci/build_docs.sh"
wheel-build:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-build.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-build.yaml@branch-23.10
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -78,7 +78,7 @@ jobs:
wheel-publish:
needs: wheel-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-publish.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-publish.yaml@branch-23.10
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,40 +21,40 @@ jobs:
- wheel-build
- wheel-tests
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/pr-builder.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/pr-builder.yaml@branch-23.10
checks:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/checks.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/checks.yaml@branch-23.10
with:
enable_check_generated_files: false
conda-cpp-build:
needs: checks
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-build.yaml@branch-23.10
with:
build_type: pull-request
conda-cpp-tests:
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-tests.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-tests.yaml@branch-23.10
with:
build_type: pull-request
conda-python-build:
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-build.yaml@branch-23.10
with:
build_type: pull-request
conda-python-tests:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@branch-23.10
with:
build_type: pull-request
docs-build:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/custom-job.yaml@branch-23.10
with:
build_type: pull-request
node_type: "gpu-v100-latest-1"
Expand All @@ -64,14 +64,14 @@ jobs:
wheel-build:
needs: checks
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-build.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-build.yaml@branch-23.10
with:
build_type: pull-request
script: ci/build_wheel.sh
wheel-tests:
needs: wheel-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-test.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-test.yaml@branch-23.10
with:
build_type: pull-request
script: ci/test_wheel.sh
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ on:
jobs:
cpp-tests:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-tests.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/conda-cpp-tests.yaml@branch-23.10
with:
build_type: nightly
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
python-tests:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/conda-python-tests.yaml@branch-23.10
with:
build_type: nightly
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
wheel-tests:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-test.yaml@branch-23.08
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-test.yaml@branch-23.10
with:
build_type: nightly
branch: ${{ inputs.branch }}
Expand Down
17 changes: 10 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@

cmake_minimum_required(VERSION 3.26.4 FATAL_ERROR)

if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/RMM_RAPIDS.cmake)
file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-23.08/RAPIDS.cmake
${CMAKE_CURRENT_BINARY_DIR}/RMM_RAPIDS.cmake)
endif()
include(${CMAKE_CURRENT_BINARY_DIR}/RMM_RAPIDS.cmake)
include(fetch_rapids.cmake)

include(rapids-cmake)
include(rapids-cpm)
Expand All @@ -27,7 +23,7 @@ include(rapids-find)

project(
RMM
VERSION 23.08.00
VERSION 23.10.00
LANGUAGES CXX)

# Write the version header
Expand Down Expand Up @@ -62,6 +58,12 @@ include(cmake/thirdparty/get_fmt.cmake)
include(cmake/thirdparty/get_spdlog.cmake)
include(cmake/thirdparty/get_thrust.cmake)

# include dlfcn.h wrapper
if(WIN32)
find_package(dlfcn-win32 REQUIRED)
set(CMAKE_DL_LIBS dlfcn-win32::dl)
endif()

# library targets
add_library(rmm INTERFACE)
add_library(rmm::rmm ALIAS rmm)
Expand All @@ -80,7 +82,8 @@ endif()
target_link_libraries(rmm INTERFACE rmm::Thrust)
target_link_libraries(rmm INTERFACE fmt::fmt-header-only)
target_link_libraries(rmm INTERFACE spdlog::spdlog_header_only)
target_link_libraries(rmm INTERFACE dl)
# target_link_libraries(rmm INTERFACE dl)
target_link_libraries(rmm INTERFACE ${CMAKE_DL_LIBS})
target_compile_features(rmm INTERFACE cxx_std_17 $<BUILD_INTERFACE:cuda_std_17>)

if((BUILD_TESTS OR BUILD_BENCHMARKS) AND CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
Expand Down
7 changes: 6 additions & 1 deletion benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ if(PER_THREAD_DEFAULT_STREAM)
message(STATUS "RMM: Building benchmarks with per-thread default stream")
endif()

set(CMAKE_PTHREAD_LIB pthread)
if(WIN32)
set(CMAKE_PTHREAD_LIB pthreadVC3)
endif()

# compiler function

# This function takes in a benchmark name and benchmark source and handles setting all of the
Expand All @@ -34,7 +39,7 @@ function(ConfigureBench BENCH_NAME)
RUNTIME_OUTPUT_DIRECTORY "$<BUILD_INTERFACE:${RMM_BINARY_DIR}/gbenchmarks>"
CUDA_ARCHITECTURES "${CMAKE_CUDA_ARCHITECTURES}"
INSTALL_RPATH "\$ORIGIN/../../../lib")
target_link_libraries(${BENCH_NAME} benchmark::benchmark pthread rmm)
target_link_libraries(${BENCH_NAME} benchmark::benchmark ${CMAKE_PTHREAD_LIB} rmm)
target_compile_definitions(${BENCH_NAME}
PUBLIC "SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_${RMM_LOGGING_LEVEL}")

Expand Down
10 changes: 5 additions & 5 deletions ci/build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ rapids-mamba-retry install \
--channel "${PYTHON_CHANNEL}" \
rmm librmm

export RAPIDS_VERSION_NUMBER="23.08"
export RAPIDS_VERSION_NUMBER="23.10"
export RAPIDS_DOCS_DIR="$(mktemp -d)"

rapids-logger "Build CPP docs"
Expand All @@ -37,11 +37,11 @@ popd

rapids-logger "Build Python docs"
pushd python/docs
sphinx-build -b dirhtml . _html
sphinx-build -b text . _text
make dirhtml
make text
mkdir -p "${RAPIDS_DOCS_DIR}/rmm/"{html,txt}
mv _html/* "${RAPIDS_DOCS_DIR}/rmm/html"
mv _text/* "${RAPIDS_DOCS_DIR}/rmm/txt"
mv _build/dirhtml/* "${RAPIDS_DOCS_DIR}/rmm/html"
mv _build/text/* "${RAPIDS_DOCS_DIR}/rmm/txt"
popd

rapids-upload-docs
2 changes: 1 addition & 1 deletion ci/check_style.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ rapids-dependency-file-generator \
rapids-mamba-retry env create --force -f env.yaml -n checks
conda activate checks

FORMAT_FILE_URL=https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-23.08/cmake-format-rapids-cmake.json
FORMAT_FILE_URL=https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-23.10/cmake-format-rapids-cmake.json
export RAPIDS_CMAKE_FORMAT_FILE=/tmp/rapids_cmake_ci/cmake-formats-rapids-cmake.json
mkdir -p $(dirname ${RAPIDS_CMAKE_FORMAT_FILE})
wget -O ${RAPIDS_CMAKE_FORMAT_FILE} ${FORMAT_FILE_URL}
Expand Down
5 changes: 3 additions & 2 deletions ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@ function sed_runner() {

# cpp update
sed_runner 's/'" VERSION .*"'/'" VERSION ${NEXT_FULL_TAG}"'/g' CMakeLists.txt
sed_runner 's/'"branch-.*\/RAPIDS.cmake"'/'"branch-${NEXT_SHORT_TAG}\/RAPIDS.cmake"'/g' CMakeLists.txt

# Python update
sed_runner 's/'"rmm_version .*)"'/'"rmm_version ${NEXT_FULL_TAG})"'/g' python/CMakeLists.txt
sed_runner 's/'"branch-.*\/RAPIDS.cmake"'/'"branch-${NEXT_SHORT_TAG}\/RAPIDS.cmake"'/g' python/CMakeLists.txt
sed_runner "s/__version__ = .*/__version__ = \"${NEXT_FULL_TAG}\"/g" python/rmm/__init__.py
sed_runner "s/^version = .*/version = \"${NEXT_FULL_TAG}\"/g" python/pyproject.toml

# rapids-cmake version
sed_runner 's/'"branch-.*\/RAPIDS.cmake"'/'"branch-${NEXT_SHORT_TAG}\/RAPIDS.cmake"'/g' fetch_rapids.cmake

# cmake-format rapids-cmake definitions
sed_runner 's/'"branch-.*\/cmake-format-rapids-cmake.json"'/'"branch-${NEXT_SHORT_TAG}\/cmake-format-rapids-cmake.json"'/g' ci/check_style.sh

Expand Down
12 changes: 11 additions & 1 deletion conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,29 @@ dependencies:
- cuda-python>=11.7.1,<12.0a0
- cuda-version=11.8
- cudatoolkit
- cython>=0.29,<0.30
- cython>=3.0.0
- doxygen=1.8.20
- fmt>=9.1.0,<10
- gcovr>=5.0
- graphviz
- identify>=2.5.20
- ipython
- make
- nbsphinx
- ninja
- numba>=0.57
- numpy>=1.21
- numpydoc
- nvcc_linux-64=11.8
- pre-commit
- pytest
- pytest-cov
- python>=3.9,<3.11
- scikit-build>=0.13.1
- spdlog>=1.11.0,<1.12
- sphinx
- sphinx-copybutton
- sphinx-markdown-tables
- sphinx_rtd_theme
- tomli
name: all_cuda-118_arch-x86_64
12 changes: 11 additions & 1 deletion conda/environments/all_cuda-120_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,28 @@ dependencies:
- cuda-nvcc
- cuda-python>=12.0,<13.0a0
- cuda-version=12.0
- cython>=0.29,<0.30
- cython>=3.0.0
- doxygen=1.8.20
- fmt>=9.1.0,<10
- gcovr>=5.0
- graphviz
- identify>=2.5.20
- ipython
- make
- nbsphinx
- ninja
- numba>=0.57
- numpy>=1.21
- numpydoc
- pre-commit
- pytest
- pytest-cov
- python>=3.9,<3.11
- scikit-build>=0.13.1
- spdlog>=1.11.0,<1.12
- sphinx
- sphinx-copybutton
- sphinx-markdown-tables
- sphinx_rtd_theme
- tomli
name: all_cuda-120_arch-x86_64
2 changes: 1 addition & 1 deletion conda/recipes/rmm/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ requirements:
- cuda-cudart-dev
- cuda-python ==12.0.0
{% endif %}
- cython >=0.29,<0.30
- cython >=3.0.0
- librmm ={{ version }}
- python
- scikit-build >=0.13.1
Expand Down
4 changes: 3 additions & 1 deletion dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ files:
- checks
- cudatoolkit
- develop
- docs
- run
- test_python
test_python:
Expand Down Expand Up @@ -62,7 +63,7 @@ dependencies:
- output_types: [conda, requirements, pyproject]
packages:
- &cmake_ver cmake>=3.26.4
- cython>=0.29,<0.30
- cython>=3.0.0
- ninja
- scikit-build>=0.13.1
- tomli
Expand Down Expand Up @@ -155,6 +156,7 @@ dependencies:
- doxygen=1.8.20
- graphviz
- ipython
- make
- nbsphinx
- numpydoc
- sphinx
Expand Down
2 changes: 1 addition & 1 deletion doxygen/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "RMM"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 23.08
PROJECT_NUMBER = 23.10

# 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
18 changes: 18 additions & 0 deletions fetch_rapids.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# =============================================================================
# Copyright (c) 2023, 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.
# =============================================================================
if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/RMM_RAPIDS.cmake)
file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-23.10/RAPIDS.cmake
${CMAKE_CURRENT_BINARY_DIR}/RMM_RAPIDS.cmake)
endif()
include(${CMAKE_CURRENT_BINARY_DIR}/RMM_RAPIDS.cmake)
1 change: 1 addition & 0 deletions include/rmm/cuda_stream_view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <cuda_runtime_api.h>

#include <atomic>
#include <ciso646>
#include <cstddef>
#include <cstdint>

Expand Down
Loading