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

Merge 0.23 into gold/2021 #1457

Merged
merged 49 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
32d8eb7
Fix coveralls sources
ZzEeKkAa Apr 30, 2024
ebc5ed4
Merge pull request #1446 from IntelPython/fix/coveralls-sources
ZzEeKkAa Apr 30, 2024
2ce0702
Remove artifacts from conda/wheel packages residing in root level
AndresGuzman-Ballen May 1, 2024
5b8ec33
Address linting issues
AndresGuzman-Ballen May 1, 2024
34c8d63
Also remove __pycache__
AndresGuzman-Ballen May 1, 2024
d5f1680
Clean up unused code in parfors
ZzEeKkAa May 2, 2024
c1b8a59
Merge pull request #1448 from IntelPython/cleanup/parfors
ZzEeKkAa May 2, 2024
32fa39f
Merge branch 'main' into SAT-6809
AndresGuzman-Ballen May 3, 2024
50cd1c5
Merge pull request #1447 from IntelPython/SAT-6809
AndresGuzman-Ballen May 3, 2024
048b1f1
Improve pyproject.toml
ZzEeKkAa May 2, 2024
431dff7
Merge pull request #1449 from IntelPython/feature/improve_pyproject_toml
May 3, 2024
e42a8da
Remove MANIFEST.in
ZzEeKkAa May 6, 2024
84acdea
Merge pull request #1450 from IntelPython/fix/manifest
ZzEeKkAa May 6, 2024
655aa8b
Changes to gdb unit tests to enable them on Intel Max GPU
May 6, 2024
40a51c7
Updates test case verifying codegen for intenum literal args.
May 6, 2024
ab45e5d
The SPV_INTEL_variable_lenght_array SPIRV ext. is needed on PVC.
May 6, 2024
ab500b6
Merge pull request #1451 from IntelPython/fix/changes-required-on-dgpu
May 7, 2024
c1aed6f
update wheel tag with pep600
ekomarova May 7, 2024
9a5bebd
Use glibc version from conda package for tagging wheel
ZzEeKkAa May 7, 2024
e36c979
Merge pull request #1452 from IntelPython/ekomarova/update_wheel_tag
ZzEeKkAa May 7, 2024
65c1d3b
Fixed ref-counting of Python object temporaries in unboxing code
oleksandr-pavlyk May 9, 2024
96e95f6
Added casts to address compilation warnings
oleksandr-pavlyk May 9, 2024
5dcf8af
Use obj as usm array parent and clean up arrayobj individually
ZzEeKkAa May 9, 2024
574daab
Merge pull request #1454 from IntelPython/correct-refcount-handling-f…
May 10, 2024
0364e76
Use nrt api to allocate meminfo object
ZzEeKkAa May 14, 2024
c9a5237
Merge pull request #1458 from IntelPython/fix/memory_allocation
ZzEeKkAa May 14, 2024
afce69b
Bump github/codeql-action from 3.25.3 to 3.25.5
dependabot[bot] May 15, 2024
404adf1
Merge pull request #1459 from IntelPython/dependabot/github_actions/g…
May 15, 2024
2f906a2
Pin numba to 0.59
ZzEeKkAa May 15, 2024
3201b49
Use windows-2019 for build
ZzEeKkAa May 20, 2024
862195c
Merge pull request #1462 from IntelPython/pin/numba_version
ZzEeKkAa May 20, 2024
7b807e2
Bump ossf/scorecard-action from 2.3.1 to 2.3.3
dependabot[bot] May 20, 2024
060aeb1
Merge pull request #1455 from IntelPython/dependabot/github_actions/o…
May 20, 2024
39d388a
Bump jidicula/clang-format-action from 4.11.0 to 4.12.0
dependabot[bot] May 20, 2024
56ab896
Merge pull request #1461 from IntelPython/dependabot/github_actions/j…
May 20, 2024
a378864
Remove SPIRV version restriction
ZzEeKkAa May 15, 2024
f09c42e
Merge pull request #1460 from IntelPython/fix/remove_spirv_version_re…
ekomarova May 23, 2024
d5ccff5
Set correct package name in README.md
ekomarova May 23, 2024
b9436c1
Merge pull request #1463 from IntelPython/sat-6766
ZzEeKkAa May 23, 2024
9874e89
Fix gdb tests skip logic
ZzEeKkAa May 23, 2024
22f28f4
Move dpnp monkey patching to patch file
ZzEeKkAa May 23, 2024
b5dba9c
Write compiled version during setup
ZzEeKkAa May 23, 2024
f703390
Merge pull request #1464 from IntelPython/fix/dpnp_mp
May 24, 2024
4779057
Bump jidicula/clang-format-action from 4.12.0 to 4.13.0
dependabot[bot] May 27, 2024
ab10b5f
Merge pull request #1465 from IntelPython/dependabot/github_actions/j…
May 28, 2024
f91798a
Bump github/codeql-action from 3.25.5 to 3.25.6
dependabot[bot] May 28, 2024
0d1f5d4
Merge pull request #1466 from IntelPython/dependabot/github_actions/g…
May 28, 2024
82621be
Updated Changelog with all changes going into 0.23
May 28, 2024
46e90f6
Merge pull request #1467 from IntelPython/changelog/0.23
May 28, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
fail-fast: false
matrix:
python: ['3.9', '3.10', '3.11']
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest, windows-2019]

runs-on: ${{ matrix.os }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
# Ignoring test due to opencl driver optimization bug
- name: Run tests with coverage
run: |
pytest -q --cov --cov-report xml --pyargs numba_dpex \
pytest -q --cov=./ --cov-report xml --pyargs numba_dpex \
-k 'not test_1d_strided_dpnp_array_in_kernel[2]'

- name: Coveralls
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cpp_style_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
steps:
- uses: actions/checkout@v4
- name: Run clang-format style check for C/C++ programs.
uses: jidicula/clang-format-action@v4.11.0
uses: jidicula/clang-format-action@v4.13.0

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 0: third-party GitHubAction not pinned by hash
Remediation tip: update your workflow using https://app.stepsecurity.io
Click Remediation section below for further remediation help
with:
clang-format-version: '14'
check-path: 'numba_dpex/dpctl_iface'
4 changes: 2 additions & 2 deletions .github/workflows/openssf-scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 # v2.3.3
with:
results_file: results.sarif
results_format: sarif
Expand Down Expand Up @@ -71,6 +71,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
if: ${{ github.event_name == 'push' }}
uses: github/codeql-action/upload-sarif@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3
uses: github/codeql-action/upload-sarif@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6
with:
sarif_file: results.sarif
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ _skbuild

docs/source/developer/autogen*

# Ignore versioneer generated files
numba_dpex/_version.py

# Ignore generated cpp files
numba_dpex/dpnp_iface/*.cpp
numba_dpex/dpnp_iface/*.h
Expand Down
20 changes: 17 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,21 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.23.0] - 2024-04-XX
## [0.23.0] - 2024-05-28

### Fixed
* Array alignment problem for stack arrays allocated for kernel arguments. (#1357)
* Issue #892, #906 caused by incorrect code generation for indexing (#1377)
* Fix `KernelHasReturnValueError` inside `KernelDispatcher`. (#1394)
* Generation of `KernelHasReturnValueError` error inside `KernelDispatcher`. (#1394)
* Issue #1390: broken support for slicing into `dpctl.tensor.usm_ndarray` in kernels (#1425)
* Support for Wheels package on Windows (#1430)
* Incorrect mangled name for kernel function arguments (#1443)
* Remove artifacts from conda/wheel packages residing in root level (#1450)
* GDB tests to work properly on Intel Max GPU (#1451)
* Improper wheels installation on unsupported platforms (#1452)
* Ref-counting of Python object temporaries in unboxing code (#1454)
* Segfault caused by using `malloc` to allocate `NRT_MemInfo`. Replaced with Numba's NRT `alloc` (#1458)
* Incorrect package name in README.md (#1463)

### Added
* A new overloaded `dimensions` attribute for all index-space id classes (#1359)
Expand All @@ -24,18 +32,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* A `sycl::local_accessor`-like API (`kernel_api.LocalAccessor`) for numba-dpex kernel (#1331)
* Specialization support for `device_func` decorator (#1398)
* Support for all `kernel_api` functions inside the `numba_dpex.kernel` decorator. (#1400)
* Support for dpnp 0.15 (#1434, #1464)
* Improvements to pyproject.toml configs to build numba-dpex from source. (#1449)
* Load the `SPV_INTEL_variable_length_array` SPIR-V extension to supporting arrays in private address-space on Intel Max GPU. (#1451)

### Changed
* Default inline threshold value set to `2` from `None`. (#1385)
* Port parfor kernel templates to `kernel_api` (#1416), (#1424)
* Use `SPIRVKernelDispatcher` for parfor kernel dispatch (#1435, #1448)
* All examples use the latest dpctl API (#1431)
* Minimum required dpctl version is now 0.16.1
* Minimum required numba version is now 0.59.0
* Minimum required numba version is now 0.59.0 (#1462)

### Removed
* OpenCL-like kernel API functions (#1420)
* `func` decorator (replaced by `device_func`) (#1400)
* `numba_dpex.experimental.kernel` and `numba_dpex.experimental.device_func` (#1400)


## [0.22.0] - 2024-02-19

### Fixed
Expand Down
6 changes: 0 additions & 6 deletions MANIFEST.in

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@



Data-parallel Extension for Numba* (numba-dpex) is an open-source standalone
Data Parallel Extension for Numba* (numba-dpex) is an open-source standalone
extension for the [Numba](http://numba.pydata.org) Python JIT compiler.
Numba-dpex provides a [SYCL*](https://sycl.tech/)-like API for kernel
programming Python. SYCL* is an open standard developed by the [Unified
Expand Down
8 changes: 7 additions & 1 deletion conda-recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@ for /f %%f in ('dir /b /S .\dist') do (

:: wheel file was renamed
for /f %%f in ('dir /b /S .\dist') do (
%PYTHON% -m pip install %%f
%PYTHON% -m pip install %%f ^
--no-build-isolation ^
--no-deps ^
--only-binary :all: ^
--no-index ^
--prefix %PREFIX% ^
-vv
if %ERRORLEVEL% neq 0 exit 1
)

Expand Down
14 changes: 12 additions & 2 deletions conda-recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ echo "--gcc-toolchain=${BUILD_PREFIX} --sysroot=${BUILD_PREFIX}/${HOST}/sysroot
ICPXCFG="$(pwd)/icpx_for_conda.cfg"
ICXCFG="$(pwd)/icpx_for_conda.cfg"

read -r GLIBC_MAJOR GLIBC_MINOR <<<"$(conda list '^sysroot_linux-64$' \
| tail -n 1 | awk '{print $2}' | grep -oP '\d+' | head -n 2 | tr '\n' ' ')"

export ICXCFG
export ICPXCFG

Expand All @@ -26,8 +29,15 @@ export PATH=$CONDA_PREFIX/bin-llvm:$PATH
# -wnx flags mean: --wheel --no-isolation --skip-dependency-check
${PYTHON} -m build -w -n -x
${PYTHON} -m wheel tags --remove --build "$GIT_DESCRIBE_NUMBER" \
--platform-tag manylinux2014_x86_64 dist/numba_dpex*.whl
${PYTHON} -m pip install dist/numba_dpex*.whl
--platform-tag "manylinux_${GLIBC_MAJOR}_${GLIBC_MINOR}_x86_64" \
dist/numba_dpex*.whl
${PYTHON} -m pip install dist/numba_dpex*.whl \
--no-build-isolation \
--no-deps \
--only-binary :all: \
--no-index \
--prefix "${PREFIX}" \
-vv

# Copy wheel package
if [[ -v WHEELS_OUTPUT_FOLDER ]]; then
Expand Down
48 changes: 26 additions & 22 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
{% set excluded_compiler_version2 = "2024.0.2" %}
{% set excluded_compiler_version3 = "2024.0.3" %}

{% set pyproject = load_file_data('pyproject.toml') %}
{% set py_build_deps = pyproject.get('build-system', {}).get('requires', []) %}

package:
name: numba-dpex
version: {{ GIT_DESCRIBE_TAG }}
Expand All @@ -21,38 +24,39 @@ requirements:
- {{ compiler('cxx') }}
- {{ compiler('dpcpp') }} >={{ required_compiler_version }},!={{ excluded_compiler_version1 }},!={{ excluded_compiler_version2 }},!={{ excluded_compiler_version3 }} # [win]
- {{ compiler('dpcpp') }} >={{ required_compiler_version }},!={{ excluded_compiler_version1 }},!={{ excluded_compiler_version2 }} # [linux]
# specific version of sysroot required by dpcpp, but 2024.0.0 package
# does not have it in meta data
- sysroot_linux-64 >=2.28 # [linux]
# Minimal supported version of sysroot (which is version of glibc) to
# have compatibility with wider range of linux distributions.
# 2.28 is the minimal supported version by dpcpp
- sysroot_linux-64 =2.28 # [linux]
host:
- python
- pip >=24.0
- dpcpp-cpp-rt >={{ required_compiler_version }},!={{ excluded_compiler_version1 }},!={{ excluded_compiler_version2 }},!={{ excluded_compiler_version3 }} # [win]
- dpcpp-cpp-rt >={{ required_compiler_version }},!={{ excluded_compiler_version1 }},!={{ excluded_compiler_version2 }} # [linux]
- python
# ensure we are using latest version of setuptools, since we don't need
# editable environments for release.
- setuptools >=69
- scikit-build >=0.17
- ninja >=1.11.1 # [not win]
- cmake >=3.29
- numba >=0.59
- llvmlite >=0.42.0
- dpctl >=0.16.1
- dpnp >=0.14
- numpy >=1.24
# TODO: temporary fix, because IGC is broken for output produced by llvm-spirv 2024.1 on windows
- dpcpp-llvm-spirv >={{ required_compiler_version }} # [not win]
- dpcpp-llvm-spirv >={{ required_compiler_version }},<2024.1 # [win]
- wheel >=0.43
- pip >=24.0
- python-build >=1.1
- versioneer==0.29
{% for dep in py_build_deps %}
{% if dep.startswith('ninja') %}
- {{ dep.split(';')[0] }} # [not win]
{% elif dep.startswith('cmake') %}
- {{ dep }}
{% elif dep.startswith('build>=') %}
- {{ 'python-' ~ dep }}
{% else %}
- {{ dep|replace('_','-') }}
{% endif %}
{% endfor %}
# versioneer dependency
- tomli # [py<311]
# While we don't need it for build, but install it here, so we can
# pin_compatible at run section.
- dpcpp-llvm-spirv >={{ required_compiler_version }}
run:
- {{ pin_compatible('dpcpp-cpp-rt', min_pin='x.x', max_pin='x') }}
- {{ pin_compatible('intel-cmplr-lib-rt', min_pin='x.x', max_pin='x') }}
# TODO: pick up min version from dep
- {{ pin_compatible('dpcpp-llvm-spirv', min_pin='x.x', max_pin='x') }}
# TODO: temporary fix, because IGC is broken for output produced by llvm-spirv 2024.1 on windows
- {{ pin_compatible('dpcpp-llvm-spirv', min_pin='x.x', max_pin='x') }} # [not win]
- {{ pin_compatible('dpcpp-llvm-spirv', min_pin='x.x', max_pin='x', upper_bound='2024.1') }} # [win]
- {{ pin_compatible('dpnp', min_pin='x.x.x', max_pin='x.x') }}
- {{ pin_compatible('dpctl', min_pin='x.x.x', max_pin='x.x') }}
- {{ pin_compatible('numba', min_pin='x.x.x', max_pin='x.x') }}
Expand Down
4 changes: 2 additions & 2 deletions numba_dpex/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from numba import __version__ as numba_version

from .kernel_api_impl.spirv import target as spirv_kernel_target
from .numba_patches import patch_is_ufunc
from .numba_patches import patch_ufuncs
from .register_kernel_api_overloads import init_kernel_api_spirv_overloads


Expand Down Expand Up @@ -70,7 +70,7 @@ def parse_sem_version(version_string: str) -> Tuple[int, int, int]:
dpctl_sem_version = parse_sem_version(dpctl.__version__)

# Monkey patches
patch_is_ufunc.patch()
patch_ufuncs.patch()

from numba import prange # noqa E402

Expand Down
Loading
Loading