From 00f24b820f93971131930fe3e6792976033d4279 Mon Sep 17 00:00:00 2001 From: Yichao Yu Date: Sat, 17 May 2014 08:32:07 -0400 Subject: [PATCH] handle new(?) crashes in pocl-0.9... --- test/test_wrapper.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/test/test_wrapper.py b/test/test_wrapper.py index 9dd9de44..d0095d65 100644 --- a/test/test_wrapper.py +++ b/test/test_wrapper.py @@ -1,4 +1,4 @@ -from __future__ import division +from __future__ import division, print_function __copyright__ = "Copyright (C) 2009 Andreas Kloeckner" @@ -48,6 +48,8 @@ def test_get_info(ctx_factory): pocl_quirks = [ (cl.Buffer, cl.mem_info.OFFSET), + (cl.Program, cl.program_info.BINARIES), + (cl.Program, cl.program_info.BINARY_SIZES), ] if ctx._get_cl_version() >= (1, 2) and cl.get_cl_header_version() >= (1, 2): pocl_quirks.extend([ @@ -69,6 +71,9 @@ def test_get_info(ctx_factory): (("The pocl project", "Portable Computing Language", "OpenCL 1.2 pocl 0.9-pre"), pocl_quirks), + (("The pocl project", "Portable Computing Language", + "OpenCL 1.2 pocl 0.9"), + pocl_quirks), (("Apple", "Apple", "OpenCL 1.2 (Apr 25 2013 18:32:06)"), [ @@ -584,6 +589,13 @@ def test_context_dep_memoize(ctx_factory): def test_can_build_binary(ctx_factory): ctx = ctx_factory() device, = ctx.devices + platform = device.platform + + if (platform.vendor == "The pocl project" and + platform.name == "Portable Computing Language"): + # Segfault on pocl 0.9 + from pytest import skip + skip("pocl doesn't like getting PROGRAM_BINARIES") program = cl.Program(ctx, """ __kernel void simple(__global float *in, __global float *out) -- GitLab