Skip to content

Commit

Permalink
Merge pull request #740 from IntelPython/rename/change_module_name
Browse files Browse the repository at this point in the history
Rename the module and package to numba_dpex.

- The numba_dppy module was renamed to numba_dpex.
- All remaining references to dppy or DPPY were removed.
- Github actions updated to use new path for files.
  • Loading branch information
Diptorup Deb authored Apr 7, 2022
1 parent 8ec0eb9 commit 12cbcf8
Show file tree
Hide file tree
Showing 243 changed files with 6,556 additions and 644 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
numba_dppy/_version.py export-subst
numba_dpex/_version.py export-subst
* text=auto eol=lf
*.{cmd,[cC][mM][dD]} text eol=crlf
*.{bat,[bB][aA][tT]} text eol=crlf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Setup numba-dppy
description: 'Setup conda environment, build numba-dppy and setup devices'
name: Setup numba-dpex
description: 'Setup conda environment, build numba-dpex and setup devices'
inputs:
environment:
description: Environment file
Expand All @@ -16,7 +16,7 @@ runs:
run: conda env update -n base -f ${{ inputs.environment }} --prune
shell: bash

- name: Build numba-dppy
- name: Build numba-dpex
run: |
export PATH=$CONDA/bin-llvm:$PATH
python setup.py develop
Expand Down
32 changes: 14 additions & 18 deletions .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ on:
- release*

env:
PACKAGE_NAME: numba-dppy
MODULE_NAME: numba_dppy
PACKAGE_NAME: numba-dpex
MODULE_NAME: numba_dpex

jobs:
build_linux:
Expand Down Expand Up @@ -100,11 +100,6 @@ jobs:
numba: ["0.55"]
dpctl: ["0.12"]
dpnp: ["0.10"]
include:
- python: "3.8"
numba: "0.54"
dpctl: "0.11"
dpnp: "0.9"

steps:
- name: Download artifact
Expand All @@ -114,24 +109,25 @@ jobs:

- uses: actions/checkout@v3
with:
path: numba-dppy
path: numba-dpex

- name: Setup conda-build
uses: ./numba-dppy/.github/actions/setup-conda-build
uses: ./numba-dpex/.github/actions/setup-conda-build

- name: Create conda channel
run: |
mkdir -p $GITHUB_WORKSPACE/channel/linux-64
mv ${PACKAGE_NAME}-*.tar.bz2 $GITHUB_WORKSPACE/channel/linux-64
conda index $GITHUB_WORKSPACE/channel
# Test channel
conda search $PACKAGE_NAME -c $GITHUB_WORKSPACE/channel --override-channels
conda search $PACKAGE_NAME -c $GITHUB_WORKSPACE/channel --override-channels --info
- name: Install numba-dppy
- name: Install numba-dpex
env:
CHANNELS: -c intel -c defaults -c numba -c numba/label/dev -c dppy/label/dev --override-channels
run: |
CHANNELS="-c $GITHUB_WORKSPACE/channel $CHANNELS"
conda list
conda install $PACKAGE_NAME pytest dpcpp_linux-64 python=${{ matrix.python }} numba=${{ matrix.numba }} dpctl=${{ matrix.dpctl }} dpnp=${{ matrix.dpnp }} $CHANNELS
# Test installed packages
conda list
Expand All @@ -152,7 +148,7 @@ jobs:
strategy:
matrix:
python: ["3.8", "3.9"]
dpctl: ["0.11.4", "0.12"]
dpctl: ["0.12"]
integration_channels: [""]
experimental: [true] # packages are not available on -c intel yet
artifact_name: [""]
Expand All @@ -169,12 +165,12 @@ jobs:
CHANNELS: ${{ matrix.integration_channels }} -c intel -c defaults -c numba -c numba/label/dev -c dppy/label/dev -c conda-forge --override-channels

steps:
- name: Create dir for numba-dppy repo
- name: Create dir for numba-dpex repo
run: |
mkdir -p ${{ github.workspace }}/dppy-repo
mkdir -p ${{ github.workspace }}/dpex-repo
- uses: actions/checkout@v3
with:
path: dppy-repo
path: dpex-repo
fetch-depth: 0
- name: Download artifact
uses: actions/download-artifact@v2
Expand Down Expand Up @@ -206,17 +202,17 @@ jobs:
restore-keys: |
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
- name: Install numba-dppy
- name: Install numba-dpex
run: |
conda install ${{ env.PACKAGE_NAME }} pytest dpcpp_win-64 python=${{ matrix.python }} dpctl=${{ matrix.dpctl }} ${{ matrix.dependencies }} -c $env:GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}
# Test installed packages
conda list
- name: Install opencl_rt
run: conda install opencl_rt -c intel --override-channels
- name: Activate cpu driver
run: ${{ github.workspace }}/dppy-repo/scripts/config_cpu_device.ps1
run: ${{ github.workspace }}/dpex-repo/scripts/config_cpu_device.ps1
- name: Add dpnp skip variable
run: echo "NUMBA_DPPY_TESTING_SKIP_NO_DPNP=1" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
run: echo "NUMBA_DPEX_TESTING_SKIP_NO_DPNP=1" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Run tests
run: |
python -m pytest -q -ra --disable-warnings --pyargs ${{ env.MODULE_NAME }} -vv
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- main
pull_request:
paths:
- 'numba_dppy/**'
- 'numba_dpex/**'
- environment/coverage.yml

jobs:
Expand All @@ -24,19 +24,19 @@ jobs:
with:
fetch-depth: 0

- name: Setup numba-dppy
uses: ./.github/actions/setup-numba-dppy
- name: Setup numba-dpex
uses: ./.github/actions/setup-numba-dpex
with:
environment: environment/coverage.yml

- name: Test installation
run: |
conda list
python -c "import numba_dppy; print(numba_dppy.__file__)"
python -c "import numba_dpex; print(numba_dpex.__file__)"
- name: Run tests with coverage
run: |
pytest -q -ra --disable-warnings --cov --cov-report term-missing --pyargs numba_dppy -vv
pytest -q -ra --disable-warnings --cov --cov-report term-missing --pyargs numba_dpex -vv
- name: Install coveralls
shell: bash -l {0}
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 @@ -19,4 +19,4 @@ jobs:
uses: jidicula/[email protected]
with:
clang-format-version: '11'
check-path: 'numba_dppy/dpctl_iface'
check-path: 'numba_dpex/dpctl_iface'
4 changes: 2 additions & 2 deletions .github/workflows/gh-pages-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
with:
fetch-depth: 0

- name: Setup numba-dppy
uses: ./.github/actions/setup-numba-dppy
- name: Setup numba-dpex
uses: ./.github/actions/setup-numba-dpex
with:
environment: environment/docs.yml

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
with:
fetch-depth: 0

- name: Setup numba-dppy
uses: ./.github/actions/setup-numba-dppy
- name: Setup numba-dpex
uses: ./.github/actions/setup-numba-dpex
with:
environment: environment/docs.yml

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
- name: Check license
run: |
export PATH=${PATH}:`go env GOPATH`/bin
addlicense -check -l apache -c "Intel Corporation" numba_dppy/**/*.py numba_dppy/*.py setup.py
addlicense -check -l apache -c "Intel Corporation" numba_dpex/**/*.py numba_dpex/*.py setup.py
14 changes: 7 additions & 7 deletions .github/workflows/numba.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
ID: ${{ github.event.inputs.numba_pr }}

steps:
- name: Checkout numba-dppy
- name: Checkout numba-dpex
uses: actions/checkout@v2
with: {path: numba-dppy}
with: {path: numba-dpex}

- name: Checkout numba
uses: actions/checkout@v2
Expand All @@ -39,7 +39,7 @@ jobs:

- name: Configure environment
run: |
cd numba-dppy
cd numba-dpex
conda env update -n base -f environment.yml --prune
conda remove -n base numba --force
Expand All @@ -52,9 +52,9 @@ jobs:
git log -1
python setup.py develop
- name: Install numba-dppy
- name: Install numba-dpex
run: |
cd numba-dppy
cd numba-dpex
git log -1
python setup.py develop
Expand All @@ -66,11 +66,11 @@ jobs:
export OCL_ICD_FILENAMES=libintelocl.so
python -c "import numba; print(numba.__file__)"
python -c "import numba_dppy; print(numba_dppy.__file__)"
python -c "import numba_dpex; print(numba_dpex.__file__)"
- name: Test
run: |
# echo "libintelocl.so" | tee /etc/OpenCL/vendors/intel-cpu.icd
export OCL_ICD_FILENAMES=libintelocl.so
pytest -q -ra --disable-warnings --pyargs numba_dppy -vv
pytest -q -ra --disable-warnings --pyargs numba_dpex -vv
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ __pycache__/
docs/source/developer/autogen*

# Ignore generated cpp files
numba_dppy/dpnp_iface/*.cpp
numba_dppy/dpnp_iface/*.h
numba_dpex/dpnp_iface/*.cpp
numba_dpex/dpnp_iface/*.h

# Ignore coverage results
.coverage
Expand Down
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repos:
hooks:
- id: bandit
pass_filenames: false
args: ["-r", "numba_dppy", "-lll"]
args: ["-r", "numba_dpex", "-lll"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
Expand Down Expand Up @@ -34,3 +34,4 @@ repos:
hooks:
- id: clang-format
args: ["-i"]
exclude: "numba_dpex/dpnp_iface"
8 changes: 4 additions & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
include MANIFEST.in
include README.md setup.py LICENSE

recursive-include numba_dppy *.cl
recursive-include numba_dppy *.spir
recursive-include numba_dpex *.cl
recursive-include numba_dpex *.spir

include versioneer.py
include numba_dppy/_version.py
include numba_dpex/_version.py

recursive-include numba_dppy/examples *
recursive-include numba_dpex/examples *
2 changes: 1 addition & 1 deletion conda-recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ else
fi
if [[ -v WHEELS_OUTPUT_FOLDER ]]; then
$PYTHON setup.py bdist_wheel "${WHEELS_BUILD_ARGS[@]}"
cp dist/numba_dppy*.whl "${WHEELS_OUTPUT_FOLDER[@]}"
cp dist/numba_dpex*.whl "${WHEELS_OUTPUT_FOLDER[@]}"
fi
2 changes: 1 addition & 1 deletion conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package:
name: numba-dppy
name: numba-dpex
version: {{ GIT_DESCRIBE_TAG }}

source:
Expand Down
4 changes: 2 additions & 2 deletions conda-recipe/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -euxo pipefail

pytest -q -ra --disable-warnings --pyargs numba_dppy -vv
pytest -q -ra --disable-warnings --pyargs numba_dpex -vv

if [[ -v ONEAPI_ROOT ]]; then
set +u
Expand All @@ -19,6 +19,6 @@ fi
export NUMBA_DPEX_ACTIVATE_ATOMICS_FP_NATIVE=1

pytest -q -ra --disable-warnings -vv \
--pyargs numba_dppy.tests.kernel_tests.test_atomic_op::test_atomic_fp_native
--pyargs numba_dpex.tests.kernel_tests.test_atomic_op::test_atomic_fp_native

exit 0
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import sphinx_rtd_theme

import numba_dppy
import numba_dpex

# -- Project information -----------------------------------------------------

Expand All @@ -25,7 +25,7 @@
author = "Intel"

# The full version, including alpha/beta/rc tags
release = numba_dppy.__version__
release = numba_dpex.__version__


# -- General configuration ---------------------------------------------------
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions numba_dppy/__init__.py → numba_dpex/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"""
import numba.testing

from numba_dppy.interop import asarray
from numba_dppy.retarget import offload_to_sycl_device
from numba_dpex.interop import asarray
from numba_dpex.retarget import offload_to_sycl_device

from . import config

Expand Down
20 changes: 15 additions & 5 deletions numba_dppy/_version.py → numba_dpex/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ def decorate(f):
return decorate


def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, env=None):
def run_command(
commands, args, cwd=None, verbose=False, hide_stderr=False, env=None
):
"""Call the given command(s)."""
assert isinstance(commands, list)
p = None
Expand Down Expand Up @@ -257,7 +259,9 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):
if sys.platform == "win32":
GITS = ["git.cmd", "git.exe"]

out, rc = run_command(GITS, ["rev-parse", "--git-dir"], cwd=root, hide_stderr=True)
out, rc = run_command(
GITS, ["rev-parse", "--git-dir"], cwd=root, hide_stderr=True
)
if rc != 0:
if verbose:
print("Directory %s not under git control" % root)
Expand Down Expand Up @@ -309,7 +313,9 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):
mo = re.search(r"^(.+)-(\d+)-g([0-9a-f]+)$", git_describe)
if not mo:
# unparseable. Maybe git-describe is misbehaving?
pieces["error"] = "unable to parse git-describe output: '%s'" % describe_out
pieces["error"] = (
"unable to parse git-describe output: '%s'" % describe_out
)
return pieces

# tag
Expand All @@ -334,7 +340,9 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):
else:
# HEX: no tags
pieces["closest-tag"] = None
count_out, rc = run_command(GITS, ["rev-list", "HEAD", "--count"], cwd=root)
count_out, rc = run_command(
GITS, ["rev-list", "HEAD", "--count"], cwd=root
)
pieces["distance"] = int(count_out) # total number of commits

# commit date: see ISO-8601 comment in git_versions_from_keywords()
Expand Down Expand Up @@ -534,7 +542,9 @@ def get_versions():
verbose = cfg.verbose

try:
return git_versions_from_keywords(get_keywords(), cfg.tag_prefix, verbose)
return git_versions_from_keywords(
get_keywords(), cfg.tag_prefix, verbose
)
except NotThisMethod:
pass

Expand Down
2 changes: 1 addition & 1 deletion numba_dppy/codegen.py → numba_dpex/codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from numba.core import utils
from numba.core.codegen import CPUCodegen, CPUCodeLibrary

from numba_dppy import config
from numba_dpex import config

SPIR_TRIPLE = {32: " spir-unknown-unknown", 64: "spir64-unknown-unknown"}

Expand Down
Loading

0 comments on commit 12cbcf8

Please sign in to comment.