From 1e66b4df1f2217d307f6d5f6f7849bfca54a1432 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sun, 8 Jan 2017 06:09:52 -0600 Subject: [PATCH] Employ multicore-parallelism transform in P2PFromCSR --- sumpy/p2p.py | 7 ++++++- sumpy/version.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sumpy/p2p.py b/sumpy/p2p.py index 7234180f..3071a3b8 100644 --- a/sumpy/p2p.py +++ b/sumpy/p2p.py @@ -306,7 +306,12 @@ class P2PFromCSR(P2PBase): def get_optimized_kernel(self): # FIXME knl = self.get_kernel() - #knl = lp.split_iname(knl, "itgt_box", 16, outer_tag="g.0") + import pyopencl as cl + dev = self.context.devices[0] + if dev.type & cl.device_type.CPU: + knl = lp.split_iname(knl, "itgt_box", 4, outer_tag="g.0") + else: + knl = lp.split_iname(knl, "itgt_box", 4, outer_tag="g.0") return knl def __call__(self, queue, **kwargs): diff --git a/sumpy/version.py b/sumpy/version.py index 360986ff..be874f65 100644 --- a/sumpy/version.py +++ b/sumpy/version.py @@ -25,4 +25,4 @@ VERSION = (2016, 1) VERSION_STATUS = "beta1" VERSION_TEXT = ".".join(str(x) for x in VERSION) + VERSION_STATUS -KERNEL_VERSION = 12 +KERNEL_VERSION = 13 -- GitLab