Skip to content

Commit 2455b55

Browse files
authored
v23.01.00
v23.01.00
2 parents 81ad156 + 1817dc7 commit 2455b55

File tree

237 files changed

+7019
-6840
lines changed

Some content is hidden

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

237 files changed

+7019
-6840
lines changed

.github/release.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- category:task
5+
categories:
6+
- title: 🐛 Bug Fixes
7+
labels:
8+
- category:bug-fix
9+
- title: 🚀 New Features
10+
labels:
11+
- category:new-feature
12+
- title: 🛠️ Improvements
13+
labels:
14+
- category:improvement
15+
- title: 📖 Documentation
16+
labels:
17+
- category:documentation

.github/workflows/ci.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
pull_request:
77
branches-ignore:
88
- gh-pages # deployment target branch (this workflow should not exist on that branch anyway)
9+
schedule:
10+
# * is a special character in YAML so you have to quote this string
11+
- cron: '0 */6 * * *'
912
env:
1013
COMMIT: ${{ github.event.pull_request.head.sha || github.sha }}
1114
PROJECT: github-cunumeric-ci
@@ -57,7 +60,7 @@ jobs:
5760
if: always()
5861
- name: Upload Build Log
5962
if: always()
60-
uses: actions/upload-artifact@v2
63+
uses: actions/upload-artifact@v3
6164
with:
6265
name: build-log
6366
path: ./**/${{ env.COMMIT }}-build.log.gpg
@@ -74,9 +77,10 @@ jobs:
7477
- {name: GPU test, options: --use cuda --gpus 1 --debug, log: gpu}
7578
- {name: 2 GPUs test, options: --use cuda --gpus 2 --debug, log: gpus}
7679
- {name: OpenMP test, options: --use openmp --omps 1 --ompthreads 2 --debug, log: omp}
77-
- {name: 2 OpenMPs test, options: --use openmp --omps 2 --ompthreads 2 --debug, log: omps}
80+
- {name: 2 NUMA OpenMPs test, options: --use openmp --omps 2 --ompthreads 2 --numamem 2048 --debug, log: omps}
7881
- {name: Eager execution test, options: --use eager --debug, log: eager}
7982
- {name: mypy, options: mypy, log: mypy}
83+
- {name: documentation, options: docs, log: docs}
8084
name: ${{ matrix.name }}
8185
steps:
8286
- name: Dump GitHub context
@@ -125,7 +129,7 @@ jobs:
125129
cat *artifacts/*/*
126130
- name: Upload Log
127131
if: always()
128-
uses: actions/upload-artifact@v2
132+
uses: actions/upload-artifact@v3
129133
with:
130134
name: test-${{ matrix.log }}-log
131135
path: ./**/${{ env.COMMIT }}-test-${{ matrix.log }}.log.gpg

.pre-commit-config.yaml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
repos:
2+
- repo: https://github.com/pre-commit/mirrors-mypy
3+
rev: 'v0.991'
4+
hooks:
5+
- id: mypy
6+
language: system
7+
pass_filenames: false
8+
args: ['cunumeric']
29
- repo: https://github.com/PyCQA/isort
3-
rev: 5.10.1
10+
rev: 5.11.4
411
hooks:
512
- id: isort
613
- repo: https://github.com/psf/black
7-
rev: 22.8.0
14+
rev: 22.12.0
815
hooks:
916
- id: black
1017
- repo: https://github.com/PyCQA/flake8
11-
rev: 5.0.4
18+
rev: 6.0.0
1219
hooks:
1320
- id: flake8
1421
- repo: https://github.com/pre-commit/mirrors-clang-format
15-
rev: 'v14.0.6' # Use the sha / tag you want to point at
22+
rev: 'v15.0.7' # Use the sha / tag you want to point at
1623
hooks:
1724
- id: clang-format
1825
files: \.(cu|cuh|h|cc|inl)$
@@ -25,5 +32,9 @@ repos:
2532
entry: python scripts/hooks/enforce_pytest_main.py
2633
language: python
2734
pass_filenames: false
35+
36+
ci:
37+
skip: [mypy]
38+
2839
default_language_version:
2940
python: python3

BUILD.md

Lines changed: 25 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -15,89 +15,36 @@ limitations under the License.
1515
1616
-->
1717

18-
# Overview
18+
# Basic build
1919

20-
The build system is designed to enable two different modes of use:
21-
1. Simple `pip install` for users
22-
2. Highly customizable incremental builds for developers
20+
Users must have a working installation of the
21+
[Legate Core](https://github.com/nv-legate/legate.core)
22+
library prior to installing cuNumeric. **Installing cuNumeric by itself will not
23+
automatically install Legate Core.**
2324

24-
We review each of these modes with examples.
25+
As for other dependencies, the Dependencies section on the
26+
[Legate Core build instructions](https://github.com/nv-legate/legate.core/blob/HEAD/BUILD.md)
27+
also covers cuNumeric, so no additional packages are required.
2528

29+
Once Legate Core is installed, you can simply invoke `./install.py` from the
30+
cuNumeric top-level directory. The build will automatically pick up the
31+
configuration used when building Legate Core (e.g. the CUDA Toolkit directory).
2632

27-
# Building for Users
33+
# Advanced topics
2834

29-
## Using install.py
35+
## Building through pip & cmake
3036

31-
For releases <= 22.07, the main method for building cuNumeric was the `install.py` script.
32-
Although the underlying implementation has significantly changed, `install.py` still supports the
33-
same usage and same set of flags. For a full list of flags, users can run:
37+
cuNumeric uses the same cmake/scikit-build-based build workflow as Legate Core.
38+
See the
39+
[Legate Core build instructions](https://github.com/nv-legate/legate.core/blob/HEAD/BUILD.md)
40+
for an overview.
3441

35-
```
36-
$ ./install.py --help
37-
```
38-
39-
## Using Conda
40-
41-
cuNumeric can be installed using Conda by pointing to the required channels (`-c`):
42-
43-
```
44-
conda install -c nvidia -c conda-forge -c legate legate-core
45-
```
46-
47-
## Using pip
48-
49-
cuNumeric is not yet registered in a standard pip repository. However, users can still use the
50-
pip installer to build and install cuNumeric. After downloading or cloning the cunumeric source,
51-
users can run the following in the cunumeric folder:
52-
53-
```
54-
$ pip install .
55-
```
56-
or
57-
```
58-
$ python3 -m pip install .
59-
```
60-
61-
This will install cuNumeric in the standard packages directory for the environment Python.
62-
Note: This is currently not sufficient for running cuNumeric programs. cuNumeric relies
63-
on the `legate` launcher from Legate core, which must be installed separately.
64-
For details on installing Legate, consult the [Legate repository](https://github.com/nv-legate/legate.core).
65-
66-
### Advanced Customization
42+
There are several examples in the `scripts` folder. We walk through the steps in
43+
`build-with-legate-separately-no-install.sh` here.
6744

68-
If users need to customize details of the underlying CMake build, they can pass
69-
CMake flags through the `SKBUILD_CONFIGURE_OPTIONS` environment variable:
45+
We assume a pre-existing Legate Core build. For details on building Legate Core,
46+
consult the [Legate Core repository](https://github.com/nv-legate/legate.core).
7047

71-
```
72-
$ SKBUILD_CONFIGURE_OPTIONS="-D Legion_USE_CUDA:BOOL=ON" \
73-
pip install .
74-
```
75-
An alternative syntax using `setup.py` with `scikit-build` is
76-
```
77-
$ python setup.py install -- -DLegion_USE_CUDA:BOOL=ON
78-
```
79-
80-
# Building for Developers
81-
82-
## Overview
83-
84-
pip uses [scikit-build](https://scikit-build.readthedocs.io/en/latest/)
85-
in `setup.py` to drive the build and installation. A `pip install` will trigger three general actions:
86-
87-
1. CMake build and installation of C++ libraries
88-
2. CMake generation of configuration files and build-dependent Python files
89-
3. pip installation of Python files
90-
91-
The CMake build can be configured independently of `pip`, allowing incremental C++ builds directly through CMake.
92-
This simplifies rebuilding `libcunumeric.so` either via command-line or via IDE.
93-
After building the C++ libraries, the `pip install` can be done in "editable" mode using the `-e` flag.
94-
This configures the Python site packages to import the Python source tree directly.
95-
The Python source can then be edited and used directly for testing without requiring a `pip install`.
96-
97-
## Example
98-
99-
There are several examples in the `scripts` folder. We walk through the steps in the `build-with-legate-separately-no-install.sh` here.
100-
We assume a pre-existing Legate CUDA build. For details on building Legate, consult the [Legate repository](https://github.com/nv-legate/legate.core).
10148
First, the CMake build needs to be configured:
10249

10350
```
@@ -106,6 +53,7 @@ $ cmake -S . -B build -GNinja -D legate_core_ROOT:STRING=path/to/legate/build
10653

10754
We point cuNumeric to the Legate *build* tree, not an installation.
10855
This generates all build-dependent headers and Python files.
56+
10957
Once configured, we can build the C++ libraries:
11058

11159
```
@@ -118,14 +66,12 @@ Once the C++ libraries are available, we can do an editable (development) pip in
11866
```
11967
$ SKBUILD_BUILD_OPTIONS="-D FIND_CUNUMERIC_CPP=ON -D cunumeric_ROOT=$(pwd)/build" \
12068
python3 -m pip install \
121-
--root / --no-deps --no-build-isolation
69+
--root / --no-deps --no-build-isolation
12270
--editable .
12371
```
12472

125-
The Python source tree and CMake build tree are now available with the environment Python
126-
for running cuNumeric programs. The diagram below illustrates the
73+
The Python source tree and CMake build tree are now available with the environment Python
74+
for running cuNumeric programs. The diagram below illustrates the
12775
complete workflow for building both Legate core and cuNumeric.
12876

12977
<img src="docs/figures/developer-build.png" alt="drawing" width="600"/>
130-
131-

CMakeLists.txt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ include(rapids-cuda)
4747
include(rapids-export)
4848
include(rapids-find)
4949

50-
set(cunumeric_version 22.10.00)
50+
set(cunumeric_version 22.12.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
@@ -79,24 +79,23 @@ endif()
7979
if(CMAKE_GENERATOR STREQUAL "Ninja")
8080
function(add_touch_cunumeric_ninja_build_target)
8181
set(_suf )
82-
set(_depends )
8382
if(SKBUILD)
8483
set(_suf "_python")
8584
endif()
85+
add_custom_target("touch_cunumeric${_suf}_ninja_build" ALL
86+
COMMAND ${CMAKE_COMMAND} -E touch_nocreate "${CMAKE_CURRENT_BINARY_DIR}/build.ninja"
87+
COMMENT "touch build.ninja so ninja doesn't re-run CMake on rebuild"
88+
VERBATIM
89+
)
8690
foreach(_dep IN ITEMS cunumeric cunumeric_python
8791
legion_core legion_core_python
8892
Legion LegionRuntime
8993
Realm RealmRuntime
9094
Regent)
9195
if(TARGET ${_dep})
92-
list(APPEND _depends ${_dep})
96+
add_dependencies("touch_cunumeric${_suf}_ninja_build" ${_dep})
9397
endif()
9498
endforeach()
95-
add_custom_target("touch_cunumeric${_suf}_ninja_build" ALL
96-
COMMAND ${CMAKE_COMMAND} -E touch_nocreate "${CMAKE_CURRENT_BINARY_DIR}/build.ninja"
97-
COMMENT "touch build.ninja so ninja doesn't re-run CMake on rebuild"
98-
VERBATIM DEPENDS ${_depends}
99-
)
10099
endfunction()
101100
add_touch_cunumeric_ninja_build_target()
102101
endif()

README.md

Lines changed: 2 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -35,94 +35,18 @@ canonical NumPy implementation.
3535

3636
If you have questions, please contact us at legate(at)nvidia.com.
3737

38-
1. [Installation](#installation)
39-
1. [Dependencies](#dependencies)
40-
1. [Building from Source](#building-from-source)
41-
1. [Usage and Execution](#usage-and-execution)
42-
1. [Supported and Planned Features](#supported-and-planned-features)
43-
1. [Supported Types and Dimensions](#supported-types-and-dimensions)
44-
1. [Documentation](#documentation)
45-
1. [Future Directions](#future-directions)
46-
1. [Contributing](#contributing)
47-
1. [Known Bugs](#known-bugs)
48-
4938
## Installation
5039

5140
cuNumeric is available [on conda](https://anaconda.org/legate/cunumeric):
5241

5342
```
5443
conda install -c nvidia -c conda-forge -c legate cunumeric
5544
```
45+
5646
The conda package is compatible with CUDA >= 11.4 (CUDA driver version >= r470),
5747
and Volta or later GPU architectures.
5848

59-
Docker image build scripts, as well as specialized install scripts for
60-
supported clusters are available on the
61-
[quickstart](https://github.com/nv-legate/quickstart) repo.
62-
63-
Read on for general instructions on building cuNumeric from source.
64-
65-
## Dependencies
66-
67-
Users must have a working installation of the
68-
[Legate Core](https://github.com/nv-legate/legate.core)
69-
library prior to installing cuNumeric.
70-
71-
cuNumeric requires the following:
72-
73-
- Python >= 3.8
74-
- [CUDA](https://developer.nvidia.com/cuda-downloads) >= 10.2
75-
- GNU Make
76-
- C++17 compatible compiler (g++, clang, or nvc++)
77-
- Fortran compiler (for building OpenBLAS; not necessary if you provide a pre-built version of OpenBLAS)
78-
- the Python packages listed in any one of the conda environment files:
79-
- `conda/environment-test-3.8.yml`
80-
- `conda/environment-test-3.9.yml`
81-
- `conda/environment-test-3.10.yml`
82-
83-
See the [corresponding section](https://github.com/nv-legate/legate.core#dependencies)
84-
on the Legate Core instructions for help on installing the required Python packages
85-
using conda.
86-
87-
cuNumeric is tested and guaranteed to be compatible with Volta and later GPU
88-
architectures. You can use cuNumeric with Pascal GPUs as well, but there could
89-
be issues due to lack of independent thread scheduling. Please report any such
90-
issues on GitHub.
91-
92-
## Building from Source
93-
94-
Installation can be done the `install.py` script.
95-
For releases >= 22.10, `pip install` is now available.
96-
The most common installation command is:
97-
98-
```
99-
./install.py --with-core <path-to-legate-core-installation>
100-
```
101-
102-
This will build cuNumeric against the Legate Core installation and then
103-
install cuNumeric into the same location.
104-
105-
If Legate Core has been installed with CUDA support, a working cuTENSOR
106-
installation must also be provided to the installation command with the
107-
`--with-cutensor` option:
108-
```
109-
./install.py --with-core <path-to-legate-core-installation> --with-cutensor <path-to-cutensor-installation>
110-
```
111-
112-
You can also specify an installation of [OpenBLAS](https://www.openblas.net/)
113-
to use for the build. If you already have an installation of OpenBLAS on your
114-
machine, you can inform the installation script using the `--with-openblas`
115-
option:
116-
117-
```
118-
./install.py --with-openblas <path-to-OpenBLAS>
119-
```
120-
121-
Advanced users can also invoke `install.py --help` to see options for
122-
configuring cuNumeric by invoking the `install.py` script directly.
123-
More information on building - including development workflows - can be found
124-
in the [build instructions](BUILD.md)
125-
49+
See [BUILD.md](BUILD.md) for instructions on building cuNumeric from source.
12650

12751
## Usage and Execution
12852

0 commit comments

Comments
 (0)