Skip to content

Commit

Permalink
Add wheel builds to rmm (#1148)
Browse files Browse the repository at this point in the history
This PR enables building wheels in RMM.

Authors:
  - Vyas Ramasubramani (https://github.com/vyasr)
  - Sevag H (https://github.com/sevagh)
  - Paul Taylor (https://github.com/trxcllnt)

Approvers:
  - Bradley Dice (https://github.com/bdice)
  - Sevag H (https://github.com/sevagh)

URL: #1148
  • Loading branch information
vyasr authored Nov 15, 2022
1 parent bf4cdb7 commit 4da70d5
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 17 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: RMM wheels

on:
workflow_call:
inputs:
versioneer-override:
type: string
default: ''
build-tag:
type: string
default: ''
branch:
required: true
type: string
date:
required: true
type: string
sha:
required: true
type: string
build-type:
type: string
default: nightly

concurrency:
# Hardcode rmm rather than using github.repository to support calling this
# from other workflows that build multiple wheels.
group: "rmm-${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
rmm-wheels:
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-manylinux.yml@main
with:
repo: rapidsai/rmm

build-type: ${{ inputs.build-type }}
branch: ${{ inputs.branch }}
sha: ${{ inputs.sha }}
date: ${{ inputs.date }}

package-dir: python
package-name: rmm

python-package-versioneer-override: ${{ inputs.versioneer-override }}
python-package-build-tag: ${{ inputs.build-tag }}

skbuild-configure-options: "-DRMM_BUILD_WHEELS=ON"

test-extras: test
test-unittest: "python -m pytest -v ./python/rmm/tests"
secrets: inherit
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,6 @@ ENV/

# RMM log files
rmm_log.txt

# cibuildwheel
/wheelhouse
15 changes: 11 additions & 4 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ project(

option(FIND_RMM_CPP "Search for existing RMM C++ installations before defaulting to local files"
OFF)
option(RMM_BUILD_WHEELS "Whether this build is generating a Python wheel." OFF)

# If the user requested it we attempt to find RMM.
if(FIND_RMM_CPP)
Expand All @@ -40,12 +41,18 @@ else()
endif()

if(NOT rmm_FOUND)
# TODO: This will not be necessary once we upgrade to CMake 3.22, which will pull in the required
# languages for the C++ project even if this project does not require those languges.
enable_language(CUDA)
set(BUILD_TESTS OFF)
set(BUILD_BENCHMARKS OFF)
add_subdirectory(../ rmm-cpp)

set(_exclude_from_all "")
if(RMM_BUILD_WHEELS)
# Statically link dependencies if building wheels
set(CUDA_STATIC_RUNTIME ON)
# Don't install the rmm C++ targets into wheels
set(_exclude_from_all EXCLUDE_FROM_ALL)
endif()

add_subdirectory(../ rmm-cpp ${_exclude_from_all})
endif()

include(rapids-cython)
Expand Down
1 change: 1 addition & 0 deletions python/LICENSE
9 changes: 0 additions & 9 deletions python/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,3 @@ skip=
build
dist
__init__.py


[options]
packages = find:
install_requires =
cuda-python>=11.5,<11.7.1
numpy>=1.19
numba>=0.49
python_requires = >=3.8
14 changes: 10 additions & 4 deletions python/setup.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# Copyright (c) 2019-2022, NVIDIA CORPORATION.

import os

from setuptools import find_packages
from skbuild import setup

import versioneer

setup(
name="rmm",
version=versioneer.get_version(),
name="rmm" + os.getenv("RAPIDS_PY_WHEEL_CUDA_SUFFIX", default=""),
version=os.getenv(
"RAPIDS_PY_WHEEL_VERSIONEER_OVERRIDE", default=versioneer.get_version()
),
description="rmm - RAPIDS Memory Manager",
url="https://github.com/rapidsai/rmm",
author="NVIDIA Corporation",
Expand All @@ -22,8 +26,10 @@
"Programming Language :: Python :: 3.9",
],
# Include the separately-compiled shared library
extras_require={"test": ["pytest", "pytest-xdist"]},
extras_require={"test": ["pytest"]},
packages=find_packages(include=["rmm", "rmm.*"]),
include_package_data=True,
python_requires=">=3.8",
package_data={
# Note: A dict comprehension with an explicit copy is necessary (rather
# than something simpler like a dict.fromkeys) because otherwise every
Expand All @@ -35,7 +41,7 @@
},
cmdclass=versioneer.get_cmdclass(),
install_requires=[
"cuda-python>=11.5,<11.7.1",
"cuda-python>=11.7.1,<12.0",
"numpy>=1.19",
"numba>=0.49",
],
Expand Down

0 comments on commit 4da70d5

Please sign in to comment.