Skip to content

Commit 2a493a4

Browse files
Merge branch 'master' into remove-runtime-dependence-on-level-zero
2 parents f0c1715 + 2588eb5 commit 2a493a4

Some content is hidden

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

47 files changed

+1310
-383
lines changed
File renamed without changes.

.github/workflows/conda-package.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
strategy:
2424
matrix:
25-
python: ['3.9', '3.10', '3.11']
25+
python: ['3.9', '3.10', '3.11', '3.12']
2626
steps:
2727
- uses: actions/[email protected]
2828
with:
@@ -53,8 +53,8 @@ jobs:
5353
- name: Build conda package
5454
run: |
5555
# use bootstrap channel to pull NumPy linked with OpenBLAS
56-
CHANNELS="-c dppy/label/bootstrap -c ${{ env.INTEL_CHANNEL }} -c conda-forge --override-channels"
57-
VERSIONS="--python ${{ matrix.python }} --numpy 1.23"
56+
CHANNELS="-c conda-forge --override-channels"
57+
VERSIONS="--python ${{ matrix.python }} --numpy 2.0"
5858
TEST="--no-test"
5959
conda build \
6060
$TEST \
@@ -77,7 +77,7 @@ jobs:
7777

7878
strategy:
7979
matrix:
80-
python: ['3.9', '3.10', '3.11']
80+
python: ['3.9', '3.10', '3.11', '3.12']
8181
env:
8282
conda-bld: C:\Miniconda\conda-bld\win-64\
8383
steps:
@@ -109,7 +109,7 @@ jobs:
109109
- name: Build conda package
110110
env:
111111
OVERRIDE_INTEL_IPO: 1 # IPO requires more resources that GH actions VM provides
112-
run: conda build --no-test --python ${{ matrix.python }} -c dppy/label/bootstrap -c ${{ env.INTEL_CHANNEL }} -c conda-forge --override-channels conda-recipe
112+
run: conda build --no-test --python ${{ matrix.python }} --numpy 2.0 -c conda-forge --override-channels conda-recipe
113113
- name: Upload artifact
114114
uses: actions/[email protected]
115115
with:
@@ -127,7 +127,7 @@ jobs:
127127

128128
strategy:
129129
matrix:
130-
python: ['3.9', '3.10', '3.11']
130+
python: ['3.9', '3.10', '3.11', '3.12']
131131
experimental: [false]
132132
runner: [ubuntu-22.04]
133133
continue-on-error: ${{ matrix.experimental }}
@@ -220,7 +220,7 @@ jobs:
220220
shell: cmd /C CALL {0}
221221
strategy:
222222
matrix:
223-
python: ['3.9', '3.10', '3.11']
223+
python: ['3.9', '3.10', '3.11', '3.12']
224224
experimental: [false]
225225
runner: [windows-2019]
226226
continue-on-error: ${{ matrix.experimental }}
@@ -350,7 +350,7 @@ jobs:
350350
runs-on: ubuntu-22.04
351351
strategy:
352352
matrix:
353-
python: ['3.9', '3.10', '3.11']
353+
python: ['3.9', '3.10', '3.11', '3.12']
354354
steps:
355355
- name: Download conda artifact
356356
uses: actions/download-artifact@v4
@@ -386,7 +386,7 @@ jobs:
386386
runs-on: windows-2019
387387
strategy:
388388
matrix:
389-
python: ['3.9', '3.10', '3.11']
389+
python: ['3.9', '3.10', '3.11', '3.12']
390390
steps:
391391
- name: Download artifact
392392
uses: actions/download-artifact@v4
@@ -426,7 +426,7 @@ jobs:
426426
runs-on: ${{ matrix.runner }}
427427
strategy:
428428
matrix:
429-
python: ['3.10']
429+
python: ['3.11']
430430
experimental: [false]
431431
runner: [ubuntu-22.04]
432432
continue-on-error: ${{ matrix.experimental }}
@@ -490,8 +490,8 @@ jobs:
490490
run: |
491491
CHANNELS="${{ env.CHANNELS }}"
492492
. $CONDA/etc/profile.d/conda.sh
493-
conda create -n ${{ env.EXAMPLES_ENV_NAME }} -y pytest python=${{ matrix.python }} $CHANNELS
494-
conda install -n ${{ env.EXAMPLES_ENV_NAME }} -y cmake">=3.22" $CHANNELS || exit 1
493+
conda create -n ${{ env.EXAMPLES_ENV_NAME }} -y pytest python=${{ matrix.python }} setuptools"<72.2.0" $CHANNELS
494+
conda install -n ${{ env.EXAMPLES_ENV_NAME }} -y cmake $CHANNELS || exit 1
495495
conda install -n ${{ env.EXAMPLES_ENV_NAME }} -y ninja $CHANNELS || exit 1
496496
conda install -n ${{ env.EXAMPLES_ENV_NAME }} -y pybind11 cython scikit-build $CHANNELS || exit 1
497497
conda install -n ${{ env.EXAMPLES_ENV_NAME }} -y mkl-dpcpp mkl-devel-dpcpp dpcpp_cpp_rt $CHANNELS || exit 1

.github/workflows/generate-coverage.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
env:
1717
ONEAPI_ROOT: /opt/intel/oneapi
18-
GTEST_ROOT: /home/runner/work/googletest-1.13.0/install
18+
GTEST_ROOT: /home/runner/work/googletest-1.15.2/install
1919
# Use oneAPI compiler 2023 to work around an issue
2020
USE_2023: 0
2121

@@ -52,16 +52,16 @@ jobs:
5252
- name: Setup Python
5353
uses: actions/setup-python@v5
5454
with:
55-
python-version: '3.11'
55+
python-version: '3.12'
5656
architecture: x64
5757

5858
- name: Cache Gtest
5959
id: cache-gtest
6060
uses: actions/cache@v4
6161
with:
6262
path: |
63-
/home/runner/work/googletest-1.13.0/install
64-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('/home/runner/work/googletest-1.13.0/install/include/gtest/*') }}
63+
/home/runner/work/googletest-1.15.2/install
64+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('/home/runner/work/googletest-1.15.2/install/include/gtest/*') }}
6565
restore-keys: |
6666
${{ runner.os }}-build-${{ env.cache-name }}-
6767
${{ runner.os }}-build-
@@ -72,12 +72,12 @@ jobs:
7272
shell: bash -l {0}
7373
run: |
7474
cd /home/runner/work
75-
wget https://github.com/google/googletest/archive/refs/tags/v1.13.0.tar.gz
76-
tar xf v1.13.0.tar.gz
77-
cd googletest-1.13.0
75+
wget https://github.com/google/googletest/archive/refs/tags/v1.15.2.tar.gz
76+
tar xf v1.15.2.tar.gz
77+
cd googletest-1.15.2
7878
mkdir build
7979
cd build
80-
cmake .. -DCMAKE_INSTALL_PREFIX=/home/runner/work/googletest-1.13.0/install
80+
cmake .. -DCMAKE_INSTALL_PREFIX=/home/runner/work/googletest-1.15.2/install
8181
make && make install
8282
8383
- name: Checkout repo
@@ -92,7 +92,7 @@ jobs:
9292
- name: Install dpctl dependencies
9393
shell: bash -l {0}
9494
run: |
95-
pip install numpy"<1.26.0" cython setuptools pytest pytest-cov scikit-build cmake coverage[toml] versioneer[toml]==0.29
95+
pip install numpy cython setuptools pytest pytest-cov scikit-build cmake coverage[toml] versioneer[toml]==0.29
9696
9797
- name: Build dpctl with coverage
9898
shell: bash -l {0}

.github/workflows/openssf-scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,6 @@ jobs:
6868

6969
# Upload the results to GitHub's code scanning dashboard.
7070
- name: "Upload to code-scanning"
71-
uses: github/codeql-action/upload-sarif@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0
71+
uses: github/codeql-action/upload-sarif@2c779ab0d087cd7fe7b826087247c2c81f27bfa6 # v3.26.5
7272
with:
7373
sarif_file: results.sarif

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
- name: Setup Python
101101
uses: actions/setup-python@v5
102102
with:
103-
python-version: '3.11'
103+
python-version: '3.12'
104104
architecture: x64
105105

106106
- name: Install dpctl dependencies

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ include(FetchContent)
6969

7070
FetchContent_Declare(
7171
pybind11
72-
URL https://github.com/pybind/pybind11/archive/refs/tags/v2.13.1.tar.gz
73-
URL_HASH SHA256=51631e88960a8856f9c497027f55c9f2f9115cafb08c0005439838a05ba17bfc
72+
URL https://github.com/pybind/pybind11/archive/refs/tags/v2.13.5.tar.gz
73+
URL_HASH SHA256=b1e209c42b3a9ed74da3e0b25a4f4cd478d89d5efbb48f04b277df427faf6252
7474
FIND_PACKAGE_ARGS NAMES pybind11
7575
)
7676
FetchContent_MakeAvailable(pybind11)

conda-recipe/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ requirements:
5151
- python
5252
- {{ pin_compatible('dpcpp-cpp-rt', min_pin='x.x', max_pin='x') }}
5353
- {{ pin_compatible('intel-cmplr-lib-rt', min_pin='x.x', max_pin='x') }}
54-
- {{ pin_compatible('numpy', min_pin='x.x', max_pin='x') }}
54+
- numpy
5555

5656
test:
5757
requires:

docs/doc_sources/api_reference/dpctl/tensor.indexing_functions.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ by either integral arrays of indices or boolean mask arrays.
1414
extract
1515
place
1616
put
17+
put_along_axis
1718
take
1819
take_along_axis

dpctl/tensor/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ set(_tensor_impl_sources
129129
${CMAKE_CURRENT_SOURCE_DIR}/libtensor/source/boolean_advanced_indexing.cpp
130130
${CMAKE_CURRENT_SOURCE_DIR}/libtensor/source/eye_ctor.cpp
131131
${CMAKE_CURRENT_SOURCE_DIR}/libtensor/source/full_ctor.cpp
132+
${CMAKE_CURRENT_SOURCE_DIR}/libtensor/source/zeros_ctor.cpp
132133
${CMAKE_CURRENT_SOURCE_DIR}/libtensor/source/triul_ctor.cpp
133134
${CMAKE_CURRENT_SOURCE_DIR}/libtensor/source/where.cpp
134135
${CMAKE_CURRENT_SOURCE_DIR}/libtensor/source/device_support_queries.cpp

dpctl/tensor/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
nonzero,
6666
place,
6767
put,
68+
put_along_axis,
6869
take,
6970
take_along_axis,
7071
)
@@ -385,4 +386,5 @@
385386
"count_nonzero",
386387
"DLDeviceType",
387388
"take_along_axis",
389+
"put_along_axis",
388390
]

dpctl/tensor/_copy_utils.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -938,13 +938,18 @@ def _place_impl(ary, ary_mask, vals, axis=0):
938938
return
939939

940940

941-
def _put_multi_index(ary, inds, p, vals):
941+
def _put_multi_index(ary, inds, p, vals, mode=0):
942942
if not isinstance(ary, dpt.usm_ndarray):
943943
raise TypeError(
944944
f"Expecting type dpctl.tensor.usm_ndarray, got {type(ary)}"
945945
)
946946
ary_nd = ary.ndim
947947
p = normalize_axis_index(operator.index(p), ary_nd)
948+
mode = operator.index(mode)
949+
if mode not in [0, 1]:
950+
raise ValueError(
951+
"Invalid value for mode keyword, only 0 or 1 is supported"
952+
)
948953
if isinstance(vals, dpt.usm_ndarray):
949954
queues_ = [ary.sycl_queue, vals.sycl_queue]
950955
usm_types_ = [ary.usm_type, vals.usm_type]
@@ -1018,7 +1023,7 @@ def _put_multi_index(ary, inds, p, vals):
10181023
ind=inds,
10191024
val=rhs,
10201025
axis_start=p,
1021-
mode=0,
1026+
mode=mode,
10221027
sycl_queue=exec_q,
10231028
depends=dep_ev,
10241029
)

0 commit comments

Comments
 (0)