Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-codegen
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Christian Heinigk
dune-codegen
Commits
988b59f1
Commit
988b59f1
authored
8 years ago
by
Dominic Kempf
Browse files
Options
Downloads
Patches
Plain Diff
Use latest loopy and modify patch
parent
aa238252
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
patches/loopy/Current.patch
+6
-67
6 additions, 67 deletions
patches/loopy/Current.patch
python/loopy
+1
-1
1 addition, 1 deletion
python/loopy
with
7 additions
and
68 deletions
patches/loopy/Current.patch
+
6
−
67
View file @
988b59f1
diff --git a/loopy/check.py b/loopy/check.py
diff --git a/loopy/check.py b/loopy/check.py
index
1
2f
2366..1898c2
7 100644
index 2f
48211..1446d0
7 100644
--- a/loopy/check.py
--- a/loopy/check.py
+++ b/loopy/check.py
+++ b/loopy/check.py
@@ -26
2
,10 +26
2
,10 @@
class _AccessCheckMapper(WalkMapper):
@@ -2
8
6,10 +2
8
6,10 @@
class _AccessCheckMapper(WalkMapper):
shape_domain = shape_domain.intersect(slab)
shape_domain = shape_domain.intersect(slab)
...
@@ -10,71 +10,10 @@ index 12f2366..1898c27 100644
...
@@ -10,71 +10,10 @@ index 12f2366..1898c27 100644
- raise LoopyError("'%s' in instruction '%s' "
- raise LoopyError("'%s' in instruction '%s' "
- "accesses out-of-bounds array element"
- "accesses out-of-bounds array element"
- % (expr, self.insn_id))
- % (expr, self.insn_id))
+# if not access_range.is_subset(shape_domain):
+#
if not access_range.is_subset(shape_domain):
+# raise LoopyError("'%s' in instruction '%s' "
+#
raise LoopyError("'%s' in instruction '%s' "
+# "accesses out-of-bounds array element"
+#
"accesses out-of-bounds array element"
+# % (expr, self.insn_id))
+#
% (expr, self.insn_id))
def check_bounds(kernel):
def check_bounds(kernel):
diff --git a/loopy/kernel/data.py b/loopy/kernel/data.py
index a884fb0..1349be3 100644
--- a/loopy/kernel/data.py
+++ b/loopy/kernel/data.py
@@ -1376,7 +1376,10 @@
class CallInstruction(MultiAssignmentBase):
for a in self.assignees)
def with_transformed_expressions(self, f, *args):
- return self.copy(
+ if len(self.assignees) == 0:
+ return self.copy(assignees=[], expression=f(self.expression, *args))
+ else:
+ return self.copy(
assignees=f(self.assignees, *args),
expression=f(self.expression, *args))
diff --git a/loopy/preprocess.py b/loopy/preprocess.py
index 9738777..cc2f140 100644
--- a/loopy/preprocess.py
+++ b/loopy/preprocess.py
@@ -871,13 +871,23 @@
def realize_reduction(kernel, insn_id_filter=None, unknown_types_ok=True):
kwargs.pop("temp_var_type", None)
kwargs.pop("temp_var_types", None)
- replacement_insns = [
+ if isinstance(insn, lp.Assignment):
+ replacement_insns = [
lp.Assignment(
id=insn_id_gen(insn.id),
assignee=assignee,
expression=new_expr,
**kwargs)
for assignee, new_expr in zip(insn.assignees, new_expressions)]
+
+ if isinstance(insn, lp.CallInstruction):
+ assert len(new_expressions) == 1
+ replacement_insns = [
+ lp.CallInstruction(
+ id=insn_id_gen(insn.id),
+ assignees=insn.assignees,
+ expression=new_expressions[0],
+ **kwargs)]
insn_id_replacements[insn.id] = [
rinsn.id for rinsn in replacement_insns]
diff --git a/loopy/target/c/__init__.py b/loopy/target/c/__init__.py
index e7c8aba..7580038 100644
--- a/loopy/target/c/__init__.py
+++ b/loopy/target/c/__init__.py
@@ -553,6 +553,11 @@
class CASTBuilder(ASTBuilderBase):
result = "%s(%s)" % (mangle_result.target_name, ", ".join(str_parameters))
+ # In case of no assignees, we are done
+ if len(mangle_result.result_dtypes) == 0:
+ from cgen import Line
+ return Line(result + ';')
+
result = ecm.wrap_in_typecast(
mangle_result.result_dtypes[0],
assignee_var_descriptors[0].dtype,
This diff is collapsed.
Click to expand it.
loopy
@
dfecf6a7
Compare
4b6e9645
...
dfecf6a7
Subproject commit
4b6e96459ee01ed88a94ef704f17a439a0d4df2e
Subproject commit
dfecf6a789b1bb6a605908dedb2f5177ec94d5d2
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment