From d69b0e24095eea943e38fd7dcb1a106b43e506b5 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sat, 10 Nov 2018 20:15:54 -0600 Subject: [PATCH 1/2] Bank conflict avoidance: Use tuples for shape --- loopy/target/pyopencl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loopy/target/pyopencl.py b/loopy/target/pyopencl.py index 73e8e0092..2fc3bc1ed 100644 --- a/loopy/target/pyopencl.py +++ b/loopy/target/pyopencl.py @@ -125,7 +125,7 @@ def adjust_local_temp_var_storage(kernel, device): new_storage_shape = storage_shape - new_temp_vars[temp_var.name] = temp_var.copy(storage_shape=new_storage_shape) + new_temp_vars[temp_var.name] = temp_var.copy(storage_shape=tuple(new_storage_shape)) return kernel.copy(temporary_variables=new_temp_vars) -- GitLab From ba58da9ded42bccb28b1a30048ae74fd3916abe3 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sat, 10 Nov 2018 20:33:26 -0600 Subject: [PATCH 2/2] Placate flake8 --- loopy/target/pyopencl.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/loopy/target/pyopencl.py b/loopy/target/pyopencl.py index 2fc3bc1ed..34faf0a03 100644 --- a/loopy/target/pyopencl.py +++ b/loopy/target/pyopencl.py @@ -125,7 +125,8 @@ def adjust_local_temp_var_storage(kernel, device): new_storage_shape = storage_shape - new_temp_vars[temp_var.name] = temp_var.copy(storage_shape=tuple(new_storage_shape)) + new_temp_vars[temp_var.name] = temp_var.copy( + storage_shape=tuple(new_storage_shape)) return kernel.copy(temporary_variables=new_temp_vars) -- GitLab