Skip to content

Python array API conformity workflow added #881

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

Closed
wants to merge 102 commits into from
Closed
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
6b1c8a7
Python array API conformity workflow added
ndgrigorian Aug 12, 2022
d1ffb5f
Fixed whitespace
ndgrigorian Aug 16, 2022
407b394
Merge branch 'IntelPython:master' into array-api-conformity
ndgrigorian Aug 22, 2022
ae4c5b3
Python array API conformity workflow added
ndgrigorian Aug 12, 2022
60f43f5
dpctl.tensor.asarray must check numpy array data-type
oleksandr-pavlyk Aug 15, 2022
c1b7625
Altered the logic of finding the most recent tag to download from
oleksandr-pavlyk Aug 15, 2022
e112521
Added a test to check validation for supported dtype
oleksandr-pavlyk Aug 15, 2022
cf5eb68
Fixed test to pass on Iris Xe
oleksandr-pavlyk Aug 15, 2022
87a82cd
Removing stray print
oleksandr-pavlyk Aug 15, 2022
d887e46
Correcting exception text
oleksandr-pavlyk Aug 15, 2022
78c3854
Wrap SyclQueue constructor in try/catch
oleksandr-pavlyk Aug 15, 2022
352dfa6
dpctl.tensor.from_numpy should not try creating USM ndarray for 64-bi…
oleksandr-pavlyk Aug 15, 2022
eae1dda
Replaced constructor with dtype 'd' with call to ones to dynamically …
oleksandr-pavlyk Aug 15, 2022
4953e10
Update array-api-conformity.yml
ndgrigorian Aug 15, 2022
5b6ccbf
Merge branch 'IntelPython:master' into array-api-conformity-test
ndgrigorian Aug 22, 2022
8410996
Merge pull request #4 from ndgrigorian/array-api-conformity-test
ndgrigorian Aug 23, 2022
70484cb
Delete array-api-conformity.yml
ndgrigorian Aug 23, 2022
f36a0ee
Merge branch 'IntelPython:master' into array-api-conformity
ndgrigorian Aug 31, 2022
2bb2e08
Merge branch 'IntelPython:master' into array-api-conformity
ndgrigorian Sep 6, 2022
aee3f59
Array API tests reworked
ndgrigorian Sep 6, 2022
7045e03
Changed array API back to dpctl.tensor
ndgrigorian Sep 6, 2022
d72f6a9
Changed where .report.json is saved
ndgrigorian Sep 6, 2022
8a2989b
Changed tested package to dpctl.tensor
ndgrigorian Sep 6, 2022
9d465d2
Merge pull request #7 from ndgrigorian/array-api-conformity-test
ndgrigorian Sep 6, 2022
de94428
Adjustments to account for changed include location in main trunk of …
oleksandr-pavlyk Jul 22, 2022
a624cc6
Make sure to catch SYCL exception around event::wait calls
oleksandr-pavlyk Jul 21, 2022
7b0d4a5
Do not submit kernels if HW does not support double precision
oleksandr-pavlyk Jul 21, 2022
7826c18
Be explicit about allocation queue in tests
oleksandr-pavlyk Jul 21, 2022
b589882
Using quotes for dpctl/CMakeLists.txt per Anton's feedback
oleksandr-pavlyk Jul 21, 2022
fe0ad88
Fixed stray use of deprecated SYCL-2020 quantifier in dpctl_c_api tests
oleksandr-pavlyk Jul 22, 2022
4096ee0
Changed test from copying doubles to copying int64 to run on Iris Xe
oleksandr-pavlyk Jul 22, 2022
d0e951e
Added testing logic to skip test cases resulting in JIT-ting kernel f…
oleksandr-pavlyk Jul 22, 2022
26ba94f
Getter functions for usm_ndarray are marked const per gh-852
oleksandr-pavlyk Jul 22, 2022
cc0d7e0
Fixed typos in docstrings found by Doxygen
oleksandr-pavlyk Jul 24, 2022
17cabc0
Fix issues tripping documentation build
oleksandr-pavlyk Jul 25, 2022
e2b69e6
expanded changelog
oleksandr-pavlyk Jul 25, 2022
939aff3
Added license text to IntelDPCPPConfig.cmake to align it with what's …
oleksandr-pavlyk Jul 25, 2022
f847cb4
Adding dpctl.tensor.concat feature and tests.
npolina4 Jul 26, 2022
6a08410
Use numpy.promote_types to allow concatenation of different dtypes
oleksandr-pavlyk Jul 27, 2022
7d1a012
expanded changelog
npolina4 Jul 27, 2022
e321aa5
Fixed filter-selector-string output by lspltform and print_device_info
oleksandr-pavlyk Jul 26, 2022
b49a854
Improved exceptions msg
oleksandr-pavlyk Jul 28, 2022
940edd9
Closes gh-870
oleksandr-pavlyk Jul 28, 2022
ca34263
Adds tests for gh-870
oleksandr-pavlyk Jul 28, 2022
b93353e
Noted the change in CHANGELOG.md
oleksandr-pavlyk Jul 28, 2022
cb67e6e
Adds dpctl.tensor.concat test for gh-870
npolina4 Jul 28, 2022
0f24836
Added dpctl.tensor.stack feature and tests
npolina4 Jul 28, 2022
06875de
Renames an internal function
npolina4 Jul 28, 2022
642d808
Noted the change in CHANGELOG.md
npolina4 Jul 28, 2022
bb7fc11
Updated changelog in preparation for release of 0.13.0
oleksandr-pavlyk Jul 28, 2022
0a8acdd
Added test to check that assigned of different types of the same size…
oleksandr-pavlyk Aug 2, 2022
cd0e139
typenum_to_src_id now recognized shadowed types, i.e. intc on Windows
oleksandr-pavlyk Aug 2, 2022
d8ec62f
Fixed compiler warning
oleksandr-pavlyk Aug 2, 2022
f623f58
Fixed arange(3.) to not produce float64 array on HW with fp64 support
oleksandr-pavlyk Jul 28, 2022
b12f492
asarray on numpy arrays should take device capabilities into account …
oleksandr-pavlyk Aug 1, 2022
eea2a74
Added array-API dpctl.tensor.linspace
oleksandr-pavlyk Aug 4, 2022
bc5055c
Added changelog entry fo #875
oleksandr-pavlyk Aug 6, 2022
a84b84a
pybind11 v2.9.2 -> v2.10.0
ndgrigorian Aug 2, 2022
1bb7e50
Simplified impl of tensor::usm_ndarray and memory::usm_memory classes
oleksandr-pavlyk Aug 6, 2022
c00aece
Fix build break with open-source intel/llvm DPC++
oleksandr-pavlyk Aug 6, 2022
9a3a2d0
Added max_work_item_sizes1d, 2d, 3d properties
oleksandr-pavlyk Aug 7, 2022
7cda330
Added tests for new device properties
oleksandr-pavlyk Aug 7, 2022
1e3ecee
Added tests for deprecated property:
oleksandr-pavlyk Aug 7, 2022
2bc9581
linspace_affine should not use double precision type in kernels is HW…
oleksandr-pavlyk Aug 8, 2022
87d972b
test_linspace should not try double precision if HW does not support it
oleksandr-pavlyk Aug 8, 2022
1266bdb
Fix for copy of double precision NumPy array to device w/o HW support…
oleksandr-pavlyk Aug 8, 2022
d790190
Tests should not use double precision arrays where it is not essentia…
oleksandr-pavlyk Aug 8, 2022
f251720
Added example of C extension using DPCTLSyclInterface
oleksandr-pavlyk Aug 10, 2022
e7aa951
Use [[deprecated]] attributed supported in both gcc/g++ and icx/icpx
oleksandr-pavlyk Aug 10, 2022
8effee6
Replaced print with use of warnings.warn
oleksandr-pavlyk Aug 10, 2022
28a1f8d
Add building of native Python extension written in C to test_linux_ex…
oleksandr-pavlyk Aug 10, 2022
b93d2a6
Removed use of deprecated methods
oleksandr-pavlyk Aug 10, 2022
d8bdc67
Removed deprecated symbols, set library_dirs for setuptools builds
oleksandr-pavlyk Aug 10, 2022
79c05d7
dpctl.tensor.asarray must check numpy array data-type
oleksandr-pavlyk Aug 15, 2022
3af53d4
Altered the logic of finding the most recent tag to download from
oleksandr-pavlyk Aug 15, 2022
39257cc
Added a test to check validation for supported dtype
oleksandr-pavlyk Aug 15, 2022
458ceca
Fixed test to pass on Iris Xe
oleksandr-pavlyk Aug 15, 2022
59e94eb
Removing stray print
oleksandr-pavlyk Aug 15, 2022
5bb39db
Correcting exception text
oleksandr-pavlyk Aug 15, 2022
3495905
Wrap SyclQueue constructor in try/catch
oleksandr-pavlyk Aug 15, 2022
0108c0c
dpctl.tensor.from_numpy should not try creating USM ndarray for 64-bi…
oleksandr-pavlyk Aug 15, 2022
4ddb093
Replaced constructor with dtype 'd' with call to ones to dynamically …
oleksandr-pavlyk Aug 15, 2022
5acaa50
Adjust script setting hint dir variable to work with sycl bundles usi…
oleksandr-pavlyk Aug 17, 2022
2733483
static_cast to void pointer from char pointer in calls to memcpy to a…
oleksandr-pavlyk Aug 18, 2022
db2bc18
Use consistent order of channels during build and test phases
oleksandr-pavlyk Aug 27, 2022
58ff336
Import error_already_set into namespace
oleksandr-pavlyk Aug 28, 2022
87fafe6
Improved exception message when SyclDevice could not created from inv…
oleksandr-pavlyk Aug 26, 2022
96aa0fc
Use [[deprecated("msg")]] annotation only for C++ builds
oleksandr-pavlyk Sep 3, 2022
b15b22f
[[deprecated]] is part of C23 standard, it is supported in gcc versio…
oleksandr-pavlyk Sep 4, 2022
b3c1d88
Added 3 new device attributes per gh-886
oleksandr-pavlyk Aug 26, 2022
0c0e60e
Expanded checks for attributes of SyclDevice to include all properties
oleksandr-pavlyk Aug 28, 2022
b314803
Added 3 more SyclDevice properties
oleksandr-pavlyk Aug 28, 2022
c3ae01e
Added all but one kernel_device_specific properties
oleksandr-pavlyk Aug 29, 2022
ba2ab2e
Private mem size may be 0 on CPU devices
oleksandr-pavlyk Aug 29, 2022
1b85089
Exported kernel device-specific properties
oleksandr-pavlyk Aug 29, 2022
e1e28be
Improved docstring for DPCTLSyclKernelBundleRef
oleksandr-pavlyk Aug 30, 2022
eae46d2
Added tests for kernel_device_specific properties
oleksandr-pavlyk Aug 30, 2022
ff1cc3d
Added property dpctl.program.SyclKernel.num_args
oleksandr-pavlyk Aug 30, 2022
4db6d20
Fixed test for sycl_kernel, added test for exercising equal testing f…
oleksandr-pavlyk Aug 30, 2022
9f8c708
Adrressed PR review feedback
oleksandr-pavlyk Sep 4, 2022
facea80
Array API tests reworked
ndgrigorian Sep 6, 2022
a052a4e
Merge branch 'array-api-conformity' of https://github.com/ndgrigorian…
ndgrigorian Sep 8, 2022
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
131 changes: 131 additions & 0 deletions .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -476,3 +476,134 @@ jobs:
echo "Executing ${script}"
python ${script} || exit 1
done

array-api-conformity:
needs: test_linux
runs-on: ${{ matrix.runner }}

strategy:
matrix:
python: ['3.10']
experimental: [false]
runner: [ubuntu-latest]
continue-on-error: ${{ matrix.experimental }}
env:
CHANNELS: -c intel -c defaults --override-channels
steps:
- name: Cache array API tests
id: cache-array-api-tests
uses: actions/cache@v3
env:
ARRAY_CACHE: 3
with:
path: |
/home/runner/work/array-api-tests/
key: ${{ runner.os }}-array-api-${{ env.cache-name }}-{{ env.ARRAY_CACHE }}-${{ hashFiles('/home/runner/work/array-api-tests/requirements.txt') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Clone array API tests repo
if: steps.cache-array-api-tests.outputs.cache-hit != 'true'
shell: bash -l {0}
run: |
cd /home/runner/work
git clone --recurse-submodules https://github.com/data-apis/array-api-tests array-api-tests
cd array-api-tests
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
- name: Add conda to system path
run: echo $CONDA/bin >> $GITHUB_PATH
- name: Install conda-build
# Needed to be able to run conda index
run: conda install conda-build
- name: Create conda channel
run: |
mkdir -p $GITHUB_WORKSPACE/channel/linux-64
conda index $GITHUB_WORKSPACE/channel || exit 1
mv ${PACKAGE_NAME}-*.tar.bz2 $GITHUB_WORKSPACE/channel/linux-64 || exit 1
conda index $GITHUB_WORKSPACE/channel || exit 1
# Test channel
conda search $PACKAGE_NAME -c $GITHUB_WORKSPACE/channel --override-channels --info --json > $GITHUB_WORKSPACE/ver.json
cat ver.json
- name: Collect dependencies
run: |
CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}"
export PACKAGE_VERSION=$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}")
conda create -n test_dpctl $PACKAGE_NAME=${PACKAGE_VERSION} python=${{ matrix.python }} $CHANNELS --only-deps --dry-run > lockfile
cat lockfile
- name: Set pkgs_dirs
run: |
echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc
- name: Cache conda packages
uses: actions/cache@v3
env:
CACHE_NUMBER: 3 # Increase to reset cache
with:
path: ~/.conda/pkgs
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-${{hashFiles('lockfile') }}
restore-keys: |
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
- name: Install dpctl
run: |
CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}"
export PACKAGE_VERSION=$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}")
conda create -n test_dpctl $PACKAGE_NAME=${PACKAGE_VERSION} pytest python=${{ matrix.python }} $CHANNELS
# Test installed packages
conda list
- name: Install array API test dependencies
shell: bash -l {0}
run: |
. $CONDA/etc/profile.d/conda.sh
conda activate test_dpctl
cd /home/runner/work/array-api-tests
pip install -r requirements.txt
- name: Install jq
shell: bash -l {0}
run: |
sudo apt-get install jq
- name: Run array API conformance tests
id: run-array-api-tests
shell: bash -l {0}
run: |
FILE=/home/runner/work/.report.json
. $CONDA/etc/profile.d/conda.sh
conda activate test_dpctl
# echo "libintelocl.so" | tee /etc/OpenCL/vendors/intel-cpu.icd
export OCL_ICD_FILENAMES=libintelocl.so
export SYCL_ENABLE_HOST_DEVICE=1
python -c "import dpctl; dpctl.lsplatform()"
export ARRAY_API_TESTS_MODULE=dpctl.tensor
cd /home/runner/work/array-api-tests
pytest --ci --json-report --json-report-file=$FILE array_api_tests/ || true
- name: Set Github environment variables
shell: bash -l {0}
run: |
FILE=/home/runner/work/.report.json
if test -f "$FILE"; then
PASSED_TESTS=$(jq '.summary | .passed // 0' $FILE)
FAILED_TESTS=$(jq '.summary | .failed // 0' $FILE)
SKIPPED_TESTS=$(jq '.summary | .skipped // 0' $FILE)
MESSAGE="Array API standard conformance tests ran successfully.
Passed: $PASSED_TESTS
Failed: $FAILED_TESTS
Skipped: $SKIPPED_TESTS"
echo "MESSAGE<<EOF" >> $GITHUB_ENV
echo "$MESSAGE" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
else
MESSAGE=$'Array API standard conformance tests failed to run.'
echo "MESSAGE=$MESSAGE" >> $GITHUB_ENV
fi
- name: Post result to PR
uses: mshick/add-pr-comment@v1
with:
message: |
${{ env.MESSAGE }}
allow-repeats: true
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token-user-login: 'github-actions[bot]'