From 01cae4bbc28967ad1136d8700aec8324e94fb8f4 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Sat, 30 Apr 2022 23:04:23 -0500 Subject: [PATCH 1/2] fix fallback in has_struct_arg_count_bug --- pyopencl/characterize/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pyopencl/characterize/__init__.py b/pyopencl/characterize/__init__.py index 19e4c95b5..9bc90710d 100644 --- a/pyopencl/characterize/__init__.py +++ b/pyopencl/characterize/__init__.py @@ -323,11 +323,11 @@ def get_pocl_version(platform, fallback_value=None): return None import re - ver_match = re.match( - r"^OpenCL [0-9.]+ pocl ([0-9]+)\.([0-9]+)", platform.version) + version = platform.version + ver_match = re.match(r"^OpenCL [0-9.]+ pocl ([0-9]+)\.([0-9]+)", version) + if ver_match is None: - msg = ("pocl version number did not have expected format: '%s'" - % platform.version) + msg = f"pocl version number did not have expected format: '{version}'" if fallback_value is not None: from warnings import warn warn(msg) @@ -378,7 +378,7 @@ def has_struct_arg_count_bug(dev, ctx=None): if dev.platform.name == "Apple" and dev.type & cl.device_type.CPU: return "apple" if dev.platform.name == "Portable Computing Language": - pocl_version = get_pocl_version(dev.platform, fallback_value=(0.14)) + pocl_version = get_pocl_version(dev.platform, fallback_value=(0, 14)) if pocl_version <= (0, 13): return "pocl" elif pocl_version <= (0, 14) and _check_for_pocl_arg_count_bug(dev, ctx): From ae13afff0b81bee76ad4e7583726f717e8e14f3d Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Sun, 1 May 2022 10:27:55 -0500 Subject: [PATCH 2/2] fix ci after changes in ci-support --- .github/workflows/ci.yml | 2 +- .gitlab-ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8984f1057..b0bfffcfd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -176,7 +176,7 @@ jobs: ./configure.py --cl-inc-dir="$TEST_ENV_ROOT/include" --cl-lib-dir="$TEST_ENV_ROOT/lib" git add -f siteconf.py - prepare_downstream_build "$DOWNSTREAM_PROJECT" + prepare_downstream_build "https://github.com/inducer/$DOWNSTREAM_PROJECT.git" sed -i 's/pyopencl/ocl-icd/' .test-conda-env-py3.yml build_py_project_in_conda_env test_py_project diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5d3ef6df6..7d599c120 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -272,7 +272,7 @@ Downstream: ./configure.py --cl-inc-dir="$TEST_ENV_ROOT/include" --cl-lib-dir="$TEST_ENV_ROOT/lib" git add -f siteconf.py - prepare_downstream_build "$DOWNSTREAM_PROJECT" + prepare_downstream_build "https://github.com/inducer/$DOWNSTREAM_PROJECT.git" sed -i 's/pyopencl/ocl-icd/' .test-conda-env-py3.yml build_py_project_in_conda_env test_py_project