Skip to content

Commit 9ac887b

Browse files
authored
v23.03.00
v23.03.00
2 parents 2455b55 + 9cc2afe commit 9ac887b

File tree

410 files changed

+4661
-2619
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

410 files changed

+4661
-2619
lines changed

.github/workflows/require-labels.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,10 @@ jobs:
66
label:
77
runs-on: ubuntu-latest
88
steps:
9-
- name: Delay checking labels if PR is just created
10-
if: ${{ github.event.action == 'opened' }}
11-
run: sleep 300s
12-
shell: bash
139
- name: Check Labels
14-
uses: mheap/github-action-required-labels@v2
10+
uses: mheap/github-action-required-labels@v3
1511
with:
1612
mode: exactly
1713
count: 1
18-
labels: "category:new-feature, category:improvement, category:bug-fix, category:task"
14+
labels: "category:new-feature, category:improvement, category:bug-fix, category:task, category:documentation"
15+

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ core
1919
*.bbl
2020
*.blg
2121
*.aux
22-
*.json
2322
*.dylib
2423
legate_python
2524
openblas
@@ -41,3 +40,4 @@ cunumeric/install_info.py
4140
/dist
4241
/_skbuild
4342
/_cmake_test_compile
43+
.ipynb_checkpoints

.pre-commit-config.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
repos:
22
- repo: https://github.com/pre-commit/mirrors-mypy
3-
rev: 'v0.991'
3+
rev: 'v1.0.1'
44
hooks:
55
- id: mypy
66
language: system
77
pass_filenames: false
88
args: ['cunumeric']
99
- repo: https://github.com/PyCQA/isort
10-
rev: 5.11.4
10+
rev: 5.12.0
1111
hooks:
1212
- id: isort
1313
- repo: https://github.com/psf/black
14-
rev: 22.12.0
14+
rev: 23.1.0
1515
hooks:
1616
- id: black
1717
- repo: https://github.com/PyCQA/flake8
@@ -26,10 +26,10 @@ repos:
2626
types_or: []
2727
- repo: local
2828
hooks:
29-
- id: enforce-pytest-main
30-
name: Enforce pytest.main
31-
description: Make sure tests use sys.ext(pytest.main(...))
32-
entry: python scripts/hooks/enforce_pytest_main.py
29+
- id: enforce-boilerplate
30+
name: Enforce boilerplate
31+
description: Make sure tests include required boilerplate
32+
entry: python scripts/hooks/enforce_boilerplate.py
3333
language: python
3434
pass_filenames: false
3535

BUILD.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ limitations under the License.
1515
1616
-->
1717

18-
# Basic build
18+
(building-from-source)=
19+
# Building from source
20+
21+
## Basic build
1922

2023
Users must have a working installation of the
2124
[Legate Core](https://github.com/nv-legate/legate.core)
@@ -30,9 +33,9 @@ Once Legate Core is installed, you can simply invoke `./install.py` from the
3033
cuNumeric top-level directory. The build will automatically pick up the
3134
configuration used when building Legate Core (e.g. the CUDA Toolkit directory).
3235

33-
# Advanced topics
36+
## Advanced topics
3437

35-
## Building through pip & cmake
38+
### Building through pip & cmake
3639

3740
cuNumeric uses the same cmake/scikit-build-based build workflow as Legate Core.
3841
See the
@@ -74,4 +77,4 @@ The Python source tree and CMake build tree are now available with the environme
7477
for running cuNumeric programs. The diagram below illustrates the
7578
complete workflow for building both Legate core and cuNumeric.
7679

77-
<img src="docs/figures/developer-build.png" alt="drawing" width="600"/>
80+
<img src="https://raw.githubusercontent.com/nv-legate/cunumeric/branch-23.03/docs/figures/developer-build.png" alt="drawing" width="600"/>

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ endif()
3737
# - Download and initialize RAPIDS CMake helpers -----------------------------
3838

3939
if(NOT EXISTS ${CMAKE_BINARY_DIR}/RAPIDS.cmake)
40-
file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-22.08/RAPIDS.cmake
40+
file(DOWNLOAD https://raw.githubusercontent.com/rapidsai/rapids-cmake/branch-23.02/RAPIDS.cmake
4141
${CMAKE_BINARY_DIR}/RAPIDS.cmake)
4242
endif()
4343
include(${CMAKE_BINARY_DIR}/RAPIDS.cmake)
@@ -47,7 +47,7 @@ include(rapids-cuda)
4747
include(rapids-export)
4848
include(rapids-find)
4949

50-
set(cunumeric_version 22.12.00)
50+
set(cunumeric_version 23.03.00)
5151

5252
# For now we want the optimization flags to match on both normal make and cmake
5353
# builds so we override the cmake defaults here for release, this changes

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ that aims to provide a distributed and accelerated drop-in replacement for the
2222
[NumPy API](https://numpy.org/doc/stable/reference/) on top of the
2323
[Legion](https://legion.stanford.edu) runtime. Using cuNumeric you do things like run
2424
[the final example of the Python CFD course](https://github.com/barbagroup/CFDPython/blob/master/lessons/15_Step_12.ipynb)
25-
completely unmodified on 2048 A100 GPUs in a [DGX SuperPOD](https://github.com/barbagroup/CFDPython/blob/master/lessons/15_Step_12.ipynb) and achieve good weak scaling.
25+
completely unmodified on 2048 A100 GPUs in a [DGX SuperPOD](https://www.nvidia.com/en-us/data-center/dgx-superpod/) and achieve good weak scaling.
2626

2727
<img src="docs/figures/cfd-demo.png" alt="drawing" width="500"/>
2828

@@ -43,8 +43,12 @@ cuNumeric is available [on conda](https://anaconda.org/legate/cunumeric):
4343
conda install -c nvidia -c conda-forge -c legate cunumeric
4444
```
4545

46-
The conda package is compatible with CUDA >= 11.4 (CUDA driver version >= r470),
47-
and Volta or later GPU architectures.
46+
Only linux-64 packages are available at the moment.
47+
48+
The default package contains GPU support, and is compatible with CUDA >= 11.4
49+
(CUDA driver version >= r470), and Volta or later GPU architectures. There are
50+
also CPU-only packages available, and will be automatically selected by `conda`
51+
when installing on a machine without GPUs.
4852

4953
See [BUILD.md](BUILD.md) for instructions on building cuNumeric from source.
5054

@@ -76,8 +80,9 @@ users can supply the `--nodes` option. For execution with GPUs, users can use th
7680
to familiarize themselves with these resource flags as described in the Legate Core
7781
documentation or simply by passing `--help` to the `legate` driver script.
7882

79-
You can use `test.py` to run the test suite. This script will invoke the `legate`
80-
driver script automatically. Check out `test.py --help` for further options.
83+
You can use `test.py` to run the test suite. Invoke the script directly or through
84+
standard `python`; the script will invoke the `legate` driver script internally.
85+
Check out `test.py --help` for further options.
8186

8287
## Supported and Planned Features
8388

@@ -100,8 +105,8 @@ installing legate.core with a larger `--max-dim`.
100105

101106
## Documentation
102107

103-
A complete list of available features can is provided in the [API
104-
reference](https://nv-legate.github.io/cunumeric/api/index.html).
108+
The cuNumeric documentation can be found
109+
[here](https://nv-legate.github.io/cunumeric).
105110

106111
## Future Directions
107112

cmake/Modules/cuda_arch_helpers.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ function(set_cuda_arch_from_names)
4444
if(CMAKE_CUDA_ARCHITECTURES MATCHES "ampere")
4545
list(APPEND cuda_archs 80)
4646
endif()
47+
if(CMAKE_CUDA_ARCHITECTURES MATCHES "hopper")
48+
list(APPEND cuda_archs 90)
49+
endif()
4750

4851
if(cuda_archs)
4952
list(LENGTH cuda_archs num_archs)
@@ -83,6 +86,7 @@ function(add_cuda_architecture_defines defs)
8386
add_def_if_arch_enabled("70" "VOLTA_ARCH")
8487
add_def_if_arch_enabled("75" "TURING_ARCH")
8588
add_def_if_arch_enabled("80" "AMPERE_ARCH")
89+
add_def_if_arch_enabled("90" "HOPPER_ARCH")
8690

8791
set(${defs} ${_defs} PARENT_SCOPE)
8892
endfunction()

cmake/thirdparty/get_legate_core.cmake

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#=============================================================================
2-
# Copyright 2022 NVIDIA Corporation
2+
# Copyright 2022-2023 NVIDIA Corporation
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -21,6 +21,18 @@ function(find_or_configure_legate_core)
2121
include("${rapids-cmake-dir}/export/detail/parse_version.cmake")
2222
rapids_export_parse_version(${PKG_VERSION} legate_core PKG_VERSION)
2323

24+
include("${rapids-cmake-dir}/cpm/detail/package_details.cmake")
25+
rapids_cpm_package_details(legate_core version git_repo git_branch shallow exclude_from_all)
26+
27+
set(version ${PKG_VERSION})
28+
set(exclude_from_all ${PKG_EXCLUDE_FROM_ALL})
29+
if(PKG_BRANCH)
30+
set(git_branch "${PKG_BRANCH}")
31+
endif()
32+
if(PKG_REPOSITORY)
33+
set(git_repo "${PKG_REPOSITORY}")
34+
endif()
35+
2436
set(FIND_PKG_ARGS
2537
GLOBAL_TARGETS legate::core
2638
BUILD_EXPORT_SET cunumeric-exports
@@ -35,18 +47,24 @@ function(find_or_configure_legate_core)
3547
if(legate_core_DIR OR legate_core_ROOT)
3648
set(_find_mode REQUIRED)
3749
endif()
38-
rapids_find_package(legate_core ${PKG_VERSION} EXACT CONFIG ${_find_mode} ${FIND_PKG_ARGS})
50+
rapids_find_package(legate_core ${version} EXACT CONFIG ${_find_mode} ${FIND_PKG_ARGS})
3951

4052
if(legate_core_FOUND)
41-
message(STATUS "CPM: using local package legate_core@${PKG_VERSION}")
53+
message(STATUS "CPM: using local package legate_core@${version}")
4254
else()
4355
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/cpm_helpers.cmake)
44-
get_cpm_git_args(legate_core_cpm_git_args REPOSITORY ${PKG_REPOSITORY} BRANCH ${PKG_BRANCH})
45-
rapids_cpm_find(legate_core ${PKG_VERSION} ${FIND_PKG_ARGS}
56+
get_cpm_git_args(legate_core_cpm_git_args REPOSITORY ${git_repo} BRANCH ${git_branch})
57+
58+
message(VERBOSE "cunumeric: legate.core version: ${version}")
59+
message(VERBOSE "cunumeric: legate.core git_repo: ${git_repo}")
60+
message(VERBOSE "cunumeric: legate.core git_branch: ${git_branch}")
61+
message(VERBOSE "cunumeric: legate.core exclude_from_all: ${exclude_from_all}")
62+
63+
rapids_cpm_find(legate_core ${version} ${FIND_PKG_ARGS}
4664
CPM_ARGS
4765
${legate_core_cpm_git_args}
4866
FIND_PACKAGE_ARGUMENTS EXACT
49-
EXCLUDE_FROM_ALL ${PKG_EXCLUDE_FROM_ALL}
67+
EXCLUDE_FROM_ALL ${exclude_from_all}
5068
)
5169
endif()
5270

@@ -59,15 +77,26 @@ function(find_or_configure_legate_core)
5977
message(VERBOSE "Legion_BOUNDS_CHECKS=${Legion_BOUNDS_CHECKS}")
6078
endfunction()
6179

62-
if(NOT DEFINED cunumeric_LEGATE_CORE_BRANCH)
63-
set(cunumeric_LEGATE_CORE_BRANCH branch-22.10)
64-
endif()
80+
foreach(_var IN ITEMS "cunumeric_LEGATE_CORE_VERSION"
81+
"cunumeric_LEGATE_CORE_BRANCH"
82+
"cunumeric_LEGATE_CORE_REPOSITORY"
83+
"cunumeric_EXCLUDE_LEGATE_CORE_FROM_ALL")
84+
if(DEFINED ${_var})
85+
# Create a cunumeric_LEGATE_CORE_BRANCH variable in the current scope either from the existing
86+
# current-scope variable, or the cache variable.
87+
set(${_var} "${${_var}}")
88+
# Remove cunumeric_LEGATE_CORE_BRANCH from the CMakeCache.txt. This ensures reconfiguring the same
89+
# build dir without passing `-Dcunumeric_LEGATE_CORE_BRANCH=` reverts to the value in versions.json
90+
# instead of reusing the previous `-Dcunumeric_LEGATE_CORE_BRANCH=` value.
91+
unset(${_var} CACHE)
92+
endif()
93+
endforeach()
6594

66-
if(NOT DEFINED cunumeric_LEGATE_CORE_REPOSITORY)
67-
set(cunumeric_LEGATE_CORE_REPOSITORY https://github.com/nv-legate/legate.core.git)
95+
if(NOT DEFINED cunumeric_LEGATE_CORE_VERSION)
96+
set(cunumeric_LEGATE_CORE_VERSION "${cunumeric_VERSION}")
6897
endif()
6998

70-
find_or_configure_legate_core(VERSION ${cunumeric_VERSION}
99+
find_or_configure_legate_core(VERSION ${cunumeric_LEGATE_CORE_VERSION}
71100
REPOSITORY ${cunumeric_LEGATE_CORE_REPOSITORY}
72101
BRANCH ${cunumeric_LEGATE_CORE_BRANCH}
73102
EXCLUDE_FROM_ALL ${cunumeric_EXCLUDE_LEGATE_CORE_FROM_ALL}

cmake/versions.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"packages" : {
3+
"legate_core" : {
4+
"git_url" : "https://github.com/nv-legate/legate.core.git",
5+
"git_tag" : "37596159b1f8f06439fdc95d6090bbc4315c302c"
6+
}
7+
}
8+
}

conda/conda-build/build.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ if [ -z "$CPU_ONLY" ]; then
1313
# cutensor, relying on the conda cutensor package
1414
CMAKE_ARGS+="
1515
-Dcutensor_DIR=$PREFIX
16-
-DCMAKE_CUDA_ARCHITECTURES:LIST=60-real;70-real;75-real;80-real;86
16+
-DCMAKE_CUDA_ARCHITECTURES:LIST=60-real;70-real;75-real;80-real;90
17+
-DBUILD_MARCH=haswell
1718
"
1819
else
1920
# When we build without cuda, we need to provide the location of curand
@@ -32,7 +33,7 @@ export CUDAHOSTCXX=${CXX}
3233

3334
echo "Build starting on $(date)"
3435

35-
cmake -S . -B build ${CMAKE_ARGS}
36+
cmake -S . -B build ${CMAKE_ARGS} -DCMAKE_BUILD_PARALLEL_LEVEL=$CPU_COUNT
3637
cmake --build build -j$CPU_COUNT
3738
cmake --install build
3839

conda/conda-build/conda_build_config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ gpu_enabled:
33
- false
44

55
python:
6-
- 3.8
7-
- 3.9
6+
- "3.9,!=3.9.7"
87
- 3.10
8+
- 3.11
99

1010
numpy_version:
1111
- ">=1.22"

conda/conda-build/meta.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,7 @@ requirements:
104104
# the nvcc requirement is necessary because it contains crt/host_config.h used by cuda runtime. This is a packaging bug that has been reported.
105105
- cuda-nvcc ={{ cuda_version }}
106106
# libcurand is used both in CPU and GPU builds
107-
# temporarily pin curand until problems are resolved
108-
- libcurand-dev =10.3.0.86
109-
# the following line is only necessary for pinning curand
110-
- libcurand =10.3.0.86
107+
- libcurand-dev
111108
# cudart needed for CPU and GPU builds because of curand
112109
- cuda-cudart-dev ={{ cuda_version }}
113110
- python
@@ -140,7 +137,6 @@ requirements:
140137
{% else %}
141138
- legate-core ={{ core_version }}
142139
- cuda-cudart >={{ cuda_version }}
143-
# - libcutensor >=1.3
144140
- cutensor >=1.3 =*_*
145141
- libcublas
146142
- libcusolver =11.4.1.48-0

cunumeric/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,22 @@
2424
"""
2525
from __future__ import annotations
2626

27+
import os
28+
2729
import numpy as _np
2830

2931
from cunumeric import linalg, random, fft
30-
from cunumeric.array import ndarray
32+
from cunumeric.array import maybe_convert_to_np_ndarray, ndarray
3133
from cunumeric.bits import packbits, unpackbits
3234
from cunumeric.module import *
3335
from cunumeric._ufunc import *
3436
from cunumeric.logic import *
3537
from cunumeric.window import bartlett, blackman, hamming, hanning, kaiser
3638
from cunumeric.coverage import clone_module
3739

38-
clone_module(_np, globals())
40+
clone_module(_np, globals(), maybe_convert_to_np_ndarray)
3941

42+
del maybe_convert_to_np_ndarray
4043
del clone_module
4144
del _np
4245

cunumeric/_sphinxext/comparison_table.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929

3030

3131
class ComparisonTable(CunumericDirective):
32-
3332
has_content = False
3433
required_arguments = 0
3534
optional_arguments = 1

cunumeric/_sphinxext/implemented_index.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,11 @@ def _filter(x: Any) -> bool:
4646

4747

4848
class ImplementedIndex(CunumericDirective):
49-
5049
has_content = False
5150
required_arguments = 0
5251
optional_arguments = 0
5352

5453
def run(self) -> nodes.Node:
55-
5654
refs: list[str] = []
5755
for ns in namespaces:
5856
refs += [

cunumeric/_sphinxext/missing_refs.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353

5454

5555
class MissingRefs(SphinxPostTransform):
56-
5756
default_priority = 5
5857

5958
def run(self, **kwargs: Any) -> None:

cunumeric/_ufunc/ufunc.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ def to_dtypes(chars: str) -> tuple[np.dtype[Any], ...]:
178178

179179

180180
class ufunc:
181-
182181
_types: Dict[Any, str]
183182
_nin: int
184183
_nout: int

0 commit comments

Comments
 (0)