Skip to content

Commit fd26373

Browse files
Merge remote-tracking branch 'origin/master' into gold/2021
2 parents 53db2c7 + 21a6931 commit fd26373

Some content is hidden

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

65 files changed

+301
-76
lines changed

.github/workflows/conda-package.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,13 @@ jobs:
160160
. $CONDA/etc/profile.d/conda.sh
161161
conda activate test_dpctl
162162
export OCL_ICD_FILENAMES=libintelocl.so
163-
export SYCL_ENABLE_HOST_DEVICE=1
164163
python -c "import dpctl; dpctl.lsplatform()"
165164
- name: Run tests
166165
run: |
167166
. $CONDA/etc/profile.d/conda.sh
168167
conda activate test_dpctl
169168
# echo "libintelocl.so" | tee /etc/OpenCL/vendors/intel-cpu.icd
170169
export OCL_ICD_FILENAMES=libintelocl.so
171-
export SYCL_ENABLE_HOST_DEVICE=1
172170
# clinfo -l
173171
python -m pytest -p no:faulthandler --pyargs $MODULE_NAME
174172
@@ -297,14 +295,12 @@ jobs:
297295
shell: cmd /C CALL {0}
298296
run: |
299297
python -c "import sys; print(sys.executable)"
300-
set SYCL_ENABLE_HOST_DEVICE=1
301298
python -c "import dpctl; dpctl.lsplatform()"
302299
python -c "import dpctl; print(dpctl.get_devices(backend='opencl', device_type='gpu'))"
303300
python -c "import dpctl; print(dpctl.get_num_devices(backend='opencl', device_type='gpu'))"
304301
- name: Run tests
305302
shell: cmd /C CALL {0}
306303
run: |
307-
set SYCL_ENABLE_HOST_DEVICE=1
308304
python -c "import sys; print(sys.executable)"
309305
python -m pytest -p no:faulthandler --pyargs ${{ env.MODULE_NAME }}
310306
@@ -435,7 +431,6 @@ jobs:
435431
run: |
436432
source $CONDA/etc/profile.d/conda.sh
437433
export OCL_ICD_FILENAMES=libintelocl.so
438-
export SYCL_ENABLE_HOST_DEVICE=1
439434
conda activate examples
440435
conda list
441436
cd examples/pybind11
@@ -497,7 +492,6 @@ jobs:
497492
cd examples/python
498493
source $CONDA/etc/profile.d/conda.sh
499494
export OCL_ICD_FILENAMES=libintelocl.so
500-
export SYCL_ENABLE_HOST_DEVICE=1
501495
conda activate examples
502496
for script in $(find . \( -not -name "_*" -and -name "*.py" \))
503497
do
@@ -603,7 +597,6 @@ jobs:
603597
conda activate test_dpctl
604598
# echo "libintelocl.so" | tee /etc/OpenCL/vendors/intel-cpu.icd
605599
export OCL_ICD_FILENAMES=libintelocl.so
606-
export SYCL_ENABLE_HOST_DEVICE=1
607600
python -c "import dpctl; dpctl.lsplatform()"
608601
export ARRAY_API_TESTS_MODULE=dpctl.tensor
609602
cd /home/runner/work/array-api-tests

.github/workflows/generate-coverage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
shell: bash -l {0}
8686
run: |
8787
source /opt/intel/oneapi/setvars.sh
88-
SYCL_ENABLE_HOST_DEVICE=1 python scripts/gen_coverage.py
88+
python scripts/gen_coverage.py
8989
9090
- name: Install coverall dependencies
9191
shell: bash -l {0}

.github/workflows/os-llvm-sycl-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,4 @@ jobs:
119119
sycl-ls
120120
CC=clang CXX=clang++ python setup.py develop -G Ninja
121121
python -c "import dpctl; dpctl.lsplatform()" || exit 1
122-
SYCL_ENABLE_HOST_DEVICE=1 python -m pytest -v dpctl/tests
122+
python -m pytest -v dpctl/tests

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/PyCQA/bandit
5-
rev: '1.7.0'
5+
rev: '1.7.4'
66
hooks:
77
- id: bandit
88
pass_filenames: false
99
args: ["-r", "dpctl", "-lll"]
1010
- repo: https://github.com/pre-commit/pre-commit-hooks
11-
rev: v4.0.1
11+
rev: v4.3.0
1212
hooks:
1313
- id: end-of-file-fixer
1414
- id: trailing-whitespace
1515
- repo: https://github.com/psf/black
16-
rev: 22.3.0
16+
rev: 22.10.0
1717
hooks:
1818
- id: black
1919
exclude: "versioneer.py|dpctl/_version.py"
@@ -28,12 +28,12 @@ repos:
2828
- id: isort
2929
name: isort (pyi)
3030
types: [pyi]
31-
- repo: https://gitlab.com/pycqa/flake8
32-
rev: 4.0.1
31+
- repo: https://github.com/pycqa/flake8
32+
rev: 5.0.4
3333
hooks:
3434
- id: flake8
3535
- repo: https://github.com/pocc/pre-commit-hooks
36-
rev: v1.1.1
36+
rev: v1.3.5
3737
hooks:
3838
- id: clang-format
3939
args: ["-i"]

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [dev]
7+
## [0.14.0] - 11/18/2022
88

99
### Added
1010

@@ -33,6 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3333
* Added debugging messaging in case when `DPCTLDynamicLib::getSymbol` encounters errors [#956](https://github.com/IntelPython/dpctl/pull/956).
3434
* Updated code base according to changes in DPC++ compiler [#952](https://github.com/IntelPython/dpctl/pull/952), [#957](https://github.com/IntelPython/dpctl/pull/957), [#958](https://github.com/IntelPython/dpctl/pull/958).
3535
* Changed `dpctl` to use pybind11 2.10.1 [#967](https://github.com/IntelPython/dpctl/pull/967).
36+
* Extended `dpctl.tensor.full` to accept 0d and higher dimensional arrays for fill-value parameter [#982](https://github.com/IntelPython/dpctl/pull/982) and [#995](https://github.com/IntelPython/dpctl/pull/995).
3637

3738
### Fixed
3839
* Improved SyclDevice constructor error message [#893](https://github.com/IntelPython/dpctl/pull/893).

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright [2020] [Intel Corp.]
189+
Copyright [2020-2022] [Intel Corp.]
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

docs/conf.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Data Parallel Control (dpctl)
22
#
3-
# Copyright 2020-2021 Intel Corporation
3+
# Copyright 2020-2022 Intel Corporation
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

docs/extlinks_gen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Data Parallel Control (dpctl)
22
#
3-
# Copyright 2020-2021 Intel Corporation
3+
# Copyright 2020-2022 Intel Corporation
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

docs/generate_rst.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Data Parallel Control (dpctl)
22
#
3-
# Copyright 2020-2021 Intel Corporation
3+
# Copyright 2020-2022 Intel Corporation
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

dpctl/tensor/_ctors.py

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ def full(
715715
dtype=None,
716716
order="C",
717717
device=None,
718-
usm_type="device",
718+
usm_type=None,
719719
sycl_queue=None,
720720
):
721721
"""
@@ -749,8 +749,30 @@ def full(
749749
"Unrecognized order keyword value, expecting 'F' or 'C'."
750750
)
751751
order = order[0].upper()
752-
dpctl.utils.validate_usm_type(usm_type, allow_none=False)
752+
dpctl.utils.validate_usm_type(usm_type, allow_none=True)
753+
754+
if isinstance(fill_value, (dpt.usm_ndarray, np.ndarray, tuple, list)):
755+
if (
756+
isinstance(fill_value, dpt.usm_ndarray)
757+
and sycl_queue is None
758+
and device is None
759+
):
760+
sycl_queue = fill_value.sycl_queue
761+
else:
762+
sycl_queue = normalize_queue_device(
763+
sycl_queue=sycl_queue, device=device
764+
)
765+
X = dpt.asarray(
766+
fill_value,
767+
dtype=dtype,
768+
order=order,
769+
usm_type=usm_type,
770+
sycl_queue=sycl_queue,
771+
)
772+
return dpt.copy(dpt.broadcast_to(X, sh), order=order)
773+
753774
sycl_queue = normalize_queue_device(sycl_queue=sycl_queue, device=device)
775+
usm_type = usm_type if usm_type is not None else "device"
754776
dtype = _get_dtype(dtype, sycl_queue, ref_type=type(fill_value))
755777
res = dpt.usm_ndarray(
756778
sh,

0 commit comments

Comments
 (0)