From 7b9ec9c5620b6cbe58bbefcb8626637ef527b736 Mon Sep 17 00:00:00 2001 From: "[6~" Date: Mon, 25 Nov 2019 18:08:43 -0600 Subject: [PATCH 1/3] Add weekly Azure pipeline schedule --- azure-pipelines.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b1bcbc9f..731b671b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -64,3 +64,11 @@ jobs: . ./prepare-and-run-flake8.sh pyopencl test displayName: 'Flake8' + +schedules: +- + cron: "0 0 * * 0" + displayName: Weekly build + branches: + include: + - master -- GitLab From 54f57d7e8e89f052ba81f7571b229e2795c7bce9 Mon Sep 17 00:00:00 2001 From: "[6~" Date: Thu, 9 Jan 2020 13:28:08 -0600 Subject: [PATCH 2/3] Ensure that Program._context is available, to permit context-based caching to work (Closes gh-322) --- pyopencl/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyopencl/__init__.py b/pyopencl/__init__.py index 683382d6..19cb0ea2 100644 --- a/pyopencl/__init__.py +++ b/pyopencl/__init__.py @@ -381,6 +381,7 @@ class Program(object): if arg2 is None: # 1-argument form: program self._prg = arg1 + self._context = self._prg.context elif arg3 is None: # 2-argument form: context, source @@ -422,7 +423,6 @@ class Program(object): stacklevel=3) self._prg = _cl._Program(self._context, self._source) - del self._context return self._prg def get_info(self, arg): -- GitLab From f3947644b480d8ddd79273ae3a4acdd519eb227e Mon Sep 17 00:00:00 2001 From: "[6~" Date: Thu, 9 Jan 2020 13:37:04 -0600 Subject: [PATCH 3/3] Fix setting of Program._context when constructed from _Program --- pyopencl/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyopencl/__init__.py b/pyopencl/__init__.py index 19cb0ea2..d44604e7 100644 --- a/pyopencl/__init__.py +++ b/pyopencl/__init__.py @@ -381,7 +381,7 @@ class Program(object): if arg2 is None: # 1-argument form: program self._prg = arg1 - self._context = self._prg.context + self._context = self._prg.get_info(program_info.CONTEXT) elif arg3 is None: # 2-argument form: context, source -- GitLab