Skip to content

Require dpcpp compiler 2024.0 and runtime >=2024.0 #1440

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

Merged
merged 10 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
67 changes: 34 additions & 33 deletions .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ jobs:
echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE${{ runner.os == 'Linux' && '/' || '\\' }}" >> $GITHUB_ENV
- name: Build conda package
run: |
CHANNELS="-c intel -c conda-forge --override-channels"
VERSIONS="--python ${{ matrix.python }}"
# use bootstrap channel to pull NumPy linked with OpenBLAS
CHANNELS="-c dppy/label/bootstrap -c intel -c conda-forge --override-channels"
VERSIONS="--python ${{ matrix.python }} --numpy 1.23"
TEST="--no-test"
conda build \
$TEST \
Expand Down Expand Up @@ -104,7 +105,7 @@ jobs:
- name: Build conda package
env:
OVERRIDE_INTEL_IPO: 1 # IPO requires more resources that GH actions VM provides
run: conda build --no-test --python ${{ matrix.python }} -c intel -c conda-forge --override-channels conda-recipe
run: conda build --no-test --python ${{ matrix.python }} -c intel -c conda-forge --override-channels conda-recipe
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -392,36 +393,6 @@ jobs:
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.whl --version ${{ env.PACKAGE_VERSION }}

cleanup_packages:
name: Clean up anaconda packages
needs: [upload_linux, upload_windows]
runs-on: 'ubuntu-latest'
defaults:
run:
shell: bash -el {0}
steps:
- uses: conda-incubator/setup-miniconda@v2
with:
run-post: false
channel-priority: "disabled"
channels: conda-forge
python-version: '3.11'

- name: Install anaconda-client
run: conda install anaconda-client

- name: Checkout repo
uses: actions/checkout@v2
with:
repository: IntelPython/devops-tools
fetch-depth: 0

- name: Cleanup old packages
run: |
python scripts/cleanup-old-packages.py \
--verbose --force --token ${{ secrets.ANACONDA_TOKEN }} \
--package dppy/${{ env.PACKAGE_NAME }} --label dev

test_examples_linux:
needs: build_linux
runs-on: ${{ matrix.runner }}
Expand Down Expand Up @@ -699,3 +670,33 @@ jobs:
allow-repeats: true
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token-user-login: 'github-actions[bot]'

cleanup_packages:
name: Clean up anaconda packages
needs: [upload_linux, upload_windows]
runs-on: 'ubuntu-latest'
defaults:
run:
shell: bash -el {0}
steps:
- uses: conda-incubator/setup-miniconda@v2
with:
run-post: false
channel-priority: "disabled"
channels: conda-forge
python-version: '3.11'

- name: Install anaconda-client
run: conda install anaconda-client

- name: Checkout repo
uses: actions/checkout@v3
with:
repository: IntelPython/devops-tools
fetch-depth: 0

- name: Cleanup old packages
run: |
python scripts/cleanup-old-packages.py \
--verbose --force --token ${{ secrets.ANACONDA_TOKEN }} \
--package dppy/${{ env.PACKAGE_NAME }} --label dev
11 changes: 10 additions & 1 deletion .github/workflows/generate-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
env:
ONEAPI_ROOT: /opt/intel/oneapi
GTEST_ROOT: /home/runner/work/googletest-1.13.0/install
# Use oneAPI compiler 2023 to work around an issue
USE_2023: 1

steps:
- name: Cancel Previous Runs
Expand All @@ -27,7 +29,14 @@ jobs:
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
sudo apt-get update

- name: Install Intel OneAPI
- name: Install Intel OneAPI 2023
if: env.USE_2023 == '1'
run: |
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp-2023.2.1
sudo apt-get install intel-oneapi-tbb-2021.10.0

- name: Install latest Intel OneAPI
if: env.USE_2023 != '1'
run: |
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp
sudo apt-get install intel-oneapi-tbb
Expand Down
6 changes: 4 additions & 2 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{% set required_compiler_version = "2024.0" %}

package:
name: dpctl
version: {{ GIT_DESCRIBE_TAG }}
Expand All @@ -14,7 +16,7 @@ build:
requirements:
build:
- {{ compiler('cxx') }}
- {{ compiler('dpcpp') }} >=2023.2 # [not osx]
- {{ compiler('dpcpp') }} >={{ required_compiler_version }} # [not osx]
- sysroot_linux-64 >=2.28 # [linux]
host:
- setuptools
Expand All @@ -29,7 +31,7 @@ requirements:
run:
- python
- {{ pin_compatible('numpy', min_pin='x.x', upper_bound='1.26') }}
- dpcpp-cpp-rt >=2023.2
- dpcpp-cpp-rt >={{ required_compiler_version }}
- level-zero # [linux]

test:
Expand Down
10 changes: 8 additions & 2 deletions scripts/gen_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,14 @@ def find_objects():
args.cxx_compiler = "icpx"
args.compiler_root = None
icx_path = subprocess.check_output(["which", "icx"])
bin_dir = os.path.dirname(os.path.dirname(icx_path))
args.bin_llvm = os.path.join(bin_dir.decode("utf-8"), "bin-llvm")
bin_dir = os.path.dirname(icx_path)
compiler_dir = os.path.join(bin_dir.decode("utf-8"), "compiler")
if os.path.exists(compiler_dir):
args.bin_llvm = os.path.join(bin_dir.decode("utf-8"), "compiler")
else:
bin_dir = os.path.dirname(bin_dir)
args.bin_llvm = os.path.join(bin_dir.decode("utf-8"), "bin-llvm")
assert os.path.exists(args.bin_llvm)
else:
args_to_validate = [
"c_compiler",
Expand Down
4 changes: 2 additions & 2 deletions scripts/gen_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ def run(
args.cxx_compiler = "icpx"
args.compiler_root = None
icx_path = subprocess.check_output(["which", "icx"])
bin_dir = os.path.dirname(os.path.dirname(icx_path))
args.bin_llvm = os.path.join(bin_dir.decode("utf-8"), "bin-llvm")
bin_dir = os.path.dirname(icx_path)
args.bin_llvm = os.path.join(bin_dir.decode("utf-8"), "compiler")
else:
args_to_validate = [
"c_compiler",
Expand Down