Skip to content
Snippets Groups Projects
Commit 27383643 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

Remove large parts of loopy vectorization checker

It is not (yet!) suitable for our needs.
parent 3049d1fd
No related branches found
No related tags found
No related merge requests found
From d75091179a72f10c110276720355dbf82ed33ef3 Mon Sep 17 00:00:00 2001 From 87331320981ca8f7419f32b48609e6dc465bbfff Mon Sep 17 00:00:00 2001
From: Dominic Kempf <dominic.kempf@iwr.uni-heidelberg.de> From: Dominic Kempf <dominic.kempf@iwr.uni-heidelberg.de>
Date: Fri, 9 Dec 2016 14:57:44 +0100 Date: Tue, 20 Dec 2016 11:25:11 +0100
Subject: [PATCH] Current loopy patch Subject: [PATCH] Current patch
--- ---
loopy/check.py | 10 +++++----- loopy/check.py | 10 +++++-----
loopy/codegen/instruction.py | 6 +++--- loopy/codegen/instruction.py | 43 ++++++++++++++++++++++---------------------
2 files changed, 8 insertions(+), 8 deletions(-) 2 files changed, 27 insertions(+), 26 deletions(-)
diff --git a/loopy/check.py b/loopy/check.py diff --git a/loopy/check.py b/loopy/check.py
index 7562eac..ac03be0 100644 index 7562eac..ac03be0 100644
...@@ -37,10 +37,54 @@ index 7562eac..ac03be0 100644 ...@@ -37,10 +37,54 @@ index 7562eac..ac03be0 100644
kernel.target.pre_codegen_check(kernel) kernel.target.pre_codegen_check(kernel)
check_that_shapes_and_strides_are_arguments(kernel) check_that_shapes_and_strides_are_arguments(kernel)
diff --git a/loopy/codegen/instruction.py b/loopy/codegen/instruction.py diff --git a/loopy/codegen/instruction.py b/loopy/codegen/instruction.py
index c490abb..ec68921 100644 index c490abb..138fd6f 100644
--- a/loopy/codegen/instruction.py --- a/loopy/codegen/instruction.py
+++ b/loopy/codegen/instruction.py +++ b/loopy/codegen/instruction.py
@@ -219,9 +219,9 @@ def generate_call_code(codegen_state, insn): @@ -105,24 +105,25 @@ def generate_assignment_instruction_code(codegen_state, insn):
# {{{ vectorization handling
- if codegen_state.vectorization_info:
- if insn.atomicity:
- raise Unvectorizable("atomic operation")
-
- vinfo = codegen_state.vectorization_info
- vcheck = VectorizabilityChecker(
- kernel, vinfo.iname, vinfo.length)
- lhs_is_vector = vcheck(insn.assignee)
- rhs_is_vector = vcheck(insn.expression)
-
- if not lhs_is_vector and rhs_is_vector:
- raise Unvectorizable(
- "LHS is scalar, RHS is vector, cannot assign")
-
- is_vector = lhs_is_vector
-
- del lhs_is_vector
- del rhs_is_vector
+# if codegen_state.vectorization_info:
+# if insn.atomicity:
+# raise Unvectorizable("atomic operation")
+#
+# vinfo = codegen_state.vectorization_info
+# vcheck = VectorizabilityChecker(
+# kernel, vinfo.iname, vinfo.length)
+# lhs_is_vector = vcheck(insn.assignee)
+# rhs_is_vector = vcheck(insn.expression)
+#
+# if not lhs_is_vector and rhs_is_vector:
+# raise Unvectorizable(
+# "LHS is scalar, RHS is vector, cannot assign")
+#
+# is_vector = lhs_is_vector
+#
+# del lhs_is_vector
+# del rhs_is_vector
+ is_vector = False
# }}}
@@ -219,9 +220,9 @@ def generate_call_code(codegen_state, insn):
# {{{ vectorization handling # {{{ vectorization handling
......
...@@ -249,7 +249,7 @@ def generate_accumulation_instruction(visitor, accterm, measure, subdomain_id): ...@@ -249,7 +249,7 @@ def generate_accumulation_instruction(visitor, accterm, measure, subdomain_id):
# TODO: At the moment this only works if we do not vectorize # TODO: At the moment this only works if we do not vectorize
# (over gradients) because loopy tries to acces a vectorclass # (over gradients) because loopy tries to acces a vectorclass
# variable. # variable.
if get_option('fastdg') and not index: if get_option('fastdg'):
ft = get_global_context_value("form_type") ft = get_global_context_value("form_type")
if ft=='residual': if ft=='residual':
accum = accum + ".data()" accum = accum + ".data()"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment