From a211027fbfe70fc1df5d703f206eee5fa8446e96 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Wed, 18 Jan 2017 00:31:27 -0600 Subject: [PATCH 1/5] Adapt doctest output to new version of numpy --- doc/howto.rst | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/howto.rst b/doc/howto.rst index 5ea67f7d..92b3243b 100644 --- a/doc/howto.rst +++ b/doc/howto.rst @@ -65,10 +65,10 @@ the device: >>> ary_host["field2"].fill(1000) >>> ary_host[13]["field2"] = 12 >>> print(ary_host) - [(217, 1000.0) (217, 1000.0) (217, 1000.0) (217, 1000.0) (217, 1000.0) - (217, 1000.0) (217, 1000.0) (217, 1000.0) (217, 1000.0) (217, 1000.0) - (217, 1000.0) (217, 1000.0) (217, 1000.0) (217, 12.0) (217, 1000.0) - (217, 1000.0) (217, 1000.0) (217, 1000.0) (217, 1000.0) (217, 1000.0)] + [(217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.) + (217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.) + (217, 1000.) (217, 1000.) (217, 1000.) (217, 12.) (217, 1000.) + (217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.)] >>> ary = cl.array.to_device(queue, ary_host) @@ -85,10 +85,10 @@ We can then operate on the array with our own kernels: >>> evt = prg.set_to_1(queue, ary.shape, None, ary.data) >>> print(ary) - [(1, 1000.0) (1, 1000.0) (1, 1000.0) (1, 1000.0) (1, 1000.0) (1, 1000.0) - (1, 1000.0) (1, 1000.0) (1, 1000.0) (1, 1000.0) (1, 1000.0) (1, 1000.0) - (1, 1000.0) (1, 12.0) (1, 1000.0) (1, 1000.0) (1, 1000.0) (1, 1000.0) - (1, 1000.0) (1, 1000.0)] + [(1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) + (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) + (1, 1000.) (1, 12.) (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) + (1, 1000.) (1, 1000.)] as well as with PyOpenCL's built-in operations: @@ -99,7 +99,7 @@ as well as with PyOpenCL's built-in operations: ... preamble=my_struct_c_decl) >>> evt = elwise(ary) >>> print(ary) - [(2, 1000.0) (2, 1000.0) (2, 1000.0) (2, 1000.0) (2, 1000.0) (2, 1000.0) - (2, 1000.0) (2, 1000.0) (2, 1000.0) (2, 1000.0) (2, 1000.0) (2, 1000.0) - (2, 1000.0) (2, 12.0) (2, 1000.0) (2, 1000.0) (2, 1000.0) (2, 1000.0) - (2, 1000.0) (2, 1000.0)] + [(2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) + (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) + (2, 1000.) (2, 12.) (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) + (2, 1000.) (2, 1000.)] -- GitLab From 4f4b27916d7db9424438183bf2e255031be5513b Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Wed, 18 Jan 2017 00:46:28 -0600 Subject: [PATCH 2/5] Fix another block of the howto doctest --- doc/howto.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/howto.rst b/doc/howto.rst index 92b3243b..0b6cb4c3 100644 --- a/doc/howto.rst +++ b/doc/howto.rst @@ -65,10 +65,10 @@ the device: >>> ary_host["field2"].fill(1000) >>> ary_host[13]["field2"] = 12 >>> print(ary_host) - [(217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.) - (217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.) - (217, 1000.) (217, 1000.) (217, 1000.) (217, 12.) (217, 1000.) - (217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.)] + [(217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.) + (217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.) + (217, 1000.) (217, 1000.) (217, 1000.) (217, 12.) (217, 1000.) + (217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.) (217, 1000.)] >>> ary = cl.array.to_device(queue, ary_host) -- GitLab From 4a811149ea5a40c418904b8039b8f020ad39b320 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Wed, 18 Jan 2017 00:57:08 -0600 Subject: [PATCH 3/5] Fix another block of the howto doctest --- doc/howto.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/howto.rst b/doc/howto.rst index 0b6cb4c3..a22bfa5a 100644 --- a/doc/howto.rst +++ b/doc/howto.rst @@ -85,10 +85,10 @@ We can then operate on the array with our own kernels: >>> evt = prg.set_to_1(queue, ary.shape, None, ary.data) >>> print(ary) - [(1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) - (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) - (1, 1000.) (1, 12.) (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) - (1, 1000.) (1, 1000.)] + [(1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) + (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) + (1, 1000.) (1, 12.) (1, 1000.) (1, 1000.) (1, 1000.) (1, 1000.) + (1, 1000.) (1, 1000.)] as well as with PyOpenCL's built-in operations: -- GitLab From 0f5d6b2b0ae5c1a1eb2299d5b758552b68221da6 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Wed, 18 Jan 2017 01:16:38 -0600 Subject: [PATCH 4/5] Fix another block of the howto doctest --- doc/howto.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/howto.rst b/doc/howto.rst index a22bfa5a..92244c43 100644 --- a/doc/howto.rst +++ b/doc/howto.rst @@ -99,7 +99,7 @@ as well as with PyOpenCL's built-in operations: ... preamble=my_struct_c_decl) >>> evt = elwise(ary) >>> print(ary) - [(2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) - (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) - (2, 1000.) (2, 12.) (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) - (2, 1000.) (2, 1000.)] + [(2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) + (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) + (2, 1000.) (2, 12.) (2, 1000.) (2, 1000.) (2, 1000.) (2, 1000.) + (2, 1000.) (2, 1000.)] -- GitLab From c8e9b7b47cc1b7caf402d88d931ff8e05aca6037 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Wed, 18 Jan 2017 01:44:37 -0600 Subject: [PATCH 5/5] Skip doctests on PyPy --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 48db9850..6e300eca 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,6 +25,7 @@ Python 3.5 Intel CPU: - intel-cl-cpu except: - tags + Python 3.5 AMD CPU: script: - export PY_EXE=python3.5 @@ -37,6 +38,7 @@ Python 3.5 AMD CPU: - amd-cl-cpu except: - tags + Python 2.6 AMD CPU: script: - export PY_EXE=python2.6 @@ -134,6 +136,7 @@ PyPy POCL: - export PY_EXE=pypy - export PYOPENCL_TEST=portable - export EXTRA_INSTALL="numpy mako" + - export NO_DOCTESTS=1 - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project.sh - ". ./build-and-test-py-project.sh" tags: -- GitLab