ufunc removal #891
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Array API Testing | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| test_array_api: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, ubuntu-22.04-arm] | |
| python-version: [3.11, 3.12, 3.13] | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up conda environment | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| environment-file: base/environment.yml | |
| activate-environment: pyk | |
| auto-activate: false | |
| miniforge-version: "latest" | |
| architecture: ${{ contains(matrix.os, 'arm') && 'arm64' || 'x64' }} | |
| conda-remove-defaults: true | |
| - name: Install dependencies | |
| run: | | |
| conda install -c conda-forge numpy mypy cmake pytest pybind11 scikit-build patchelf tqdm && | |
| conda remove --force-remove -y ninja || true | |
| - name: Install pykokkos-base | |
| working-directory: base | |
| run: | | |
| export CMAKE_BUILD_PARALLEL_LEVEL=2 && | |
| python setup.py install -- -DENABLE_LAYOUTS=ON -DENABLE_MEMORY_TRAITS=OFF -DENABLE_VIEW_RANKS=5 | |
| - name: Install pykokkos | |
| run: | | |
| python -m pip install . | |
| - name: Check Array API conformance | |
| run: | | |
| cd /tmp | |
| git clone https://github.com/data-apis/array-api-tests.git | |
| cd array-api-tests | |
| git checkout 2022.09.30 | |
| git submodule update --init | |
| conda install -c conda-forge --file requirements.txt | |
| export ARRAY_API_TESTS_MODULE=pykokkos | |
| # we precompile some of the ufunc implementations | |
| # to circumvent the currently slow performance of | |
| # JIT compile/link, which can otherwise cause issues | |
| # for hypothesis-driven test case generation | |
| # pytest $GITHUB_WORKSPACE/tools/pre_compile_ufuncs.py -s | |
| # only run a subset of the conformance tests to get started | |
| pytest array_api_tests/meta/test_broadcasting.py array_api_tests/meta/test_equality_mapping.py array_api_tests/meta/test_signatures.py array_api_tests/meta/test_special_cases.py array_api_tests/test_constants.py array_api_tests/meta/test_utils.py array_api_tests/test_creation_functions.py::test_ones array_api_tests/test_creation_functions.py::test_ones_like array_api_tests/test_data_type_functions.py::test_result_type array_api_tests/test_array_object.py::test_scalar_casting array_api_tests/test_creation_functions.py::test_zeros array_api_tests/test_creation_functions.py::test_zeros_like array_api_tests/test_creation_functions.py::test_full_like |