Skip to content

Commit 172b84f

Browse files
committed
Merge branch 'main' into gold/2021
2 parents 23ebaab + c0a17bc commit 172b84f

File tree

100 files changed

+5871
-2370
lines changed

Some content is hidden

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

100 files changed

+5871
-2370
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
numba_dppy/_version.py export-subst

.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
*.pyc
2+
*.o
3+
*.so
4+
*.dylib
5+
*.pyd
6+
*.pdb
7+
*.egg-info
8+
*.sw[po]
9+
*.out
10+
*.ll
11+
.coverage
12+
.nfs*
13+
tags
14+
MANIFEST
15+
16+
build/
17+
docs/_build/
18+
docs/gh-pages/
19+
dist/
20+
htmlcov/
21+
.idea/
22+
.vscode/
23+
.mypy_cache/
24+
.ipynb_checkpoints/
25+
__pycache__/
26+
27+
docs/source/developer/autogen*

CHANGELOG.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [Unreleased]
8+
9+
## [0.12.0] - 2020-12-17
10+
### Added
11+
- numba-dppy is a standalone package now. Added setup.py and conda recipe.
12+
- Offload diagnostics.
13+
- Controllable fallback.
14+
- Add flags to generate debug symbols.
15+
- Implementation of `np.linalg.eig`, `np.ndarray.sum`, `np.ndarray.max`, `np.ndarray.min`, `np.ndarray.mean`.
16+
- Two new re-write passes to convert NumPy calls into a pseudo `numba_dppy` call site to allow target-specific
17+
overload of NumPy functions. The rewrite passes is a temporary fix till Numba gains support for target-specific overlaods.
18+
- Updated to dpCtl 0.5.* and dpNP 0.4.*
19+
20+
### Changed
21+
- The `dpnp` interface now uses Numba's `@overload` functionality as opposed to the previous `@lower_builtin` method.
22+
- Rename `DPPL` to `DPPY`.
23+
- Cleaned test code.
24+
- `DPPLTestCase` replaced with `unittest.TestCase`.
25+
- All tests and examples use `with device_context`.
26+
- Config environment variables starts with `NUMBA_DPPY_`
27+
(i.e. NUMBA_DPPY_SAVE_IR_FILES and NUMBA_DPPY_SPIRV_VAL)
28+
- Remove nested folder `dppl` in `tests`.
29+
- No dependency on `cffi`.
30+
31+
### Removed
32+
- The old backup file.
33+
34+
## NUMBA Version 0.48.0 + DPPY Version 0.3.0 (June 29, 2020)
35+
36+
This release includes:
37+
- Caching of dppy.kernels which will improve performance.
38+
- Addition of support for Intel Advisor which will help in profiling applications.

DEBUGGING.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
## Debugging with GDB
2+
3+
Setting the debug environment variable `NUMBA_DPPY_DEBUG` (e.g. `export NUMBA_DPPY_DEBUG=True`) enables
4+
the emission of debug info to the llvm and spirv IR.
5+
To disable debugging set this variable to None: (e.g. `export NUMBA_DPPY_DEBUG= `).
6+
Currently, the following debug info is available:
7+
- Source location (filename and line number) is available.
8+
- Setting break points by the line number.
9+
- Stepping over break points.
10+
11+
### Requirements
12+
13+
Intel® Distribution for GDB installed to the system.
14+
Documentation for this debugger can be found in the
15+
[Intel® Distribution for GDB documentation](https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/distribution-for-gdb.html).
16+
17+
### Example debug usage
18+
19+
```bash
20+
$ export NUMBA_DPPY_DEBUG=True
21+
$ gdb-oneapi -q python
22+
(gdb) break numba_dppy/examples/sum.py:14 # Assumes the kernel is in file sum.py, at line 14
23+
(gdb) run sum.py
24+
```
25+
26+
### Limitations
27+
28+
Currently, Numba-dppy provides only initial support of debugging GPU kernels.
29+
The following functionality is **not supported** :
30+
- Printing kernel local variables (e.g. ```info locals```).
31+
- Stepping over several off-loaded functions.

HowTo.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ are listed below with the help of sample code snippets. In this release we have
77
the implementation of the OAK approach described in MS138 in section 4.3.2. The
88
new decorator is described below.
99

10-
To access the features driver module have to be imported from numba_dppy.dppl_driver
10+
To access the features driver module have to be imported from numba_dppy.dppy_driver
1111

1212
New Decorator
1313
=============
@@ -61,7 +61,7 @@ Primitive types are passed by value to the kernel, currently supported are int,
6161
Math Kernels
6262
============
6363

64-
This release has support for math kernels. See numba_dppy/tests/dppl/test_math_functions.py
64+
This release has support for math kernels. See numba_dppy/tests/dppy/test_math_functions.py
6565
for more details.
6666

6767

@@ -170,6 +170,6 @@ Testing
170170

171171
All examples can be found in numba_dppy/examples/
172172

173-
All tests can be found in numba_dppy/tests/dppl and can be triggered by the following command:
173+
All tests can be found in numba_dppy/tests/dppy and can be triggered by the following command:
174174

175175
``python -m numba.runtests numba_dppy.tests``

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ include README.md setup.py LICENSE
33

44
recursive-include numba_dppy *.cl
55

6+
include versioneer.py
7+
include numba_dppy/_version.py

README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ https://intelpython.github.io/dpnp/
2020
## Dependencies
2121

2222
* numba >=0.51 (IntelPython/numba)
23-
* dpCtl >=0.3.8
24-
* dpNP >=0.3 (optional)
23+
* dpCtl 0.5.*
24+
* dpNP 0.4.* (optional)
2525
* llvm-spirv (SPIRV generation from LLVM IR)
2626
* llvmdev (LLVM IR generation)
2727
* spirv-tools
28+
* scipy (for testing)
2829

2930
## dpPy
3031

@@ -43,7 +44,7 @@ See folder `numba_dppy/tests`.
4344

4445
Run tests:
4546
```bash
46-
python -m numba.runtests numba_dppy.tests
47+
python -m unittest numba_dppy.tests
4748
```
4849

4950
## Examples
@@ -57,9 +58,17 @@ python numba_dppy/examples/sum.py
5758

5859
## How Tos
5960

60-
Refer the HowTo.rst guide for an overview of the programming semantics,
61+
Refer the [HowTo.rst](HowTo.rst) guide for an overview of the programming semantics,
6162
examples, supported functionalities, and known issues.
6263

64+
## Debugging
65+
66+
Please follow instructions in the [DEBUGGING.md](DEBUGGING.md)
67+
6368
## Reporting issues
6469

6570
Please use https://github.com/IntelPython/numba-dppy/issues to report issues and bugs.
71+
72+
## Features
73+
74+
Read this guide for additional features [INDEX.md](docs/INDEX.md)

conda-recipe/meta.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,21 @@ requirements:
1717
- python
1818
- setuptools
1919
- cython
20-
- llvm-spirv
2120
- numba
22-
- dpctl
23-
- dpnp
21+
- dpctl 0.5.*
22+
- dpnp 0.4.* # [linux]
2423
run:
2524
- python
2625
- numba >=0.51
27-
- dpctl
26+
- dpctl 0.5.*
2827
- spirv-tools
2928
- llvm-spirv
30-
- dpnp
29+
- llvmdev
30+
- dpnp 0.4.* # [linux]
31+
32+
test:
33+
requires:
34+
- scipy # [linux]
3135

3236
about:
3337
home: https://github.com/IntelPython/numba-dppy

conda-recipe/run_test.bat

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
REM For activating OpenCL CPU
2+
call "%ONEAPI_ROOT%\compiler\latest\env\vars.bat"
3+
4+
@echo on
5+
16
python -m numba.runtests -b -v -m -- numba_dppy.tests
27
IF %ERRORLEVEL% NEQ 0 exit /B 1
38

conda-recipe/run_test.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#!/bin/bash
22

3-
set -ex
3+
set -e
4+
5+
# For activating OpenCL CPU
6+
source ${ONEAPI_ROOT}/compiler/latest/env/vars.sh
7+
source ${ONEAPI_ROOT}/tbb/latest/env/vars.sh
8+
9+
set -x
410

511
python -m numba.runtests -b -v -m -- numba_dppy.tests
612

0 commit comments

Comments
 (0)