Loopy sprint read write output args in slate#2033
Merged
Merged
Conversation
… PyOP2 here 714b68579b784a869d789e2c639348e1753727f9, so we have adapt the slatewrapper to have its output read and write as well.
Contributor
Author
|
There is still something missing, will need to add the output arg to the variables of the Slate CallInstructions too. |
wence-
reviewed
Apr 21, 2021
| idx = make_indices(len(shape)) | ||
| indexed_gem_expr = gem.Indexed(gem_expr, idx) | ||
| args = ([loopy.GlobalArg("output", shape=shape, dtype=scalar_type)] | ||
| args = ([loopy.GlobalArg("output", shape=shape, dtype=scalar_type, is_output=True, is_input=True)] |
Contributor
There was a problem hiding this comment.
Should TSFC be setting these inout parameters on its globalargs too?
Contributor
Author
There was a problem hiding this comment.
I would think so yes, but want so see if there is a test actually failing because it's not there. The test would fail with a KeyError in the Kernel matching.
… PyOP2 here 714b68579b784a869d789e2c639348e1753727f9, so we have adapt the slatewrapper to have its output read and write as well. And also the call to the kernel containing the Slate instructions.
sv2518
added a commit
that referenced
this pull request
May 10, 2021
commit c53cc67 Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Mon May 10 11:59:53 2021 +0200 Lint. commit 8a46d6c Merge: 2f7da5f aa1647a Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Mon May 10 11:52:18 2021 +0200 Merge branch 'master' into loopy-sprint commit 2f7da5f Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Mon May 10 11:10:40 2021 +0200 Lint. commit 524121b Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Tue Apr 27 11:42:58 2021 +0200 Fix my bug in extrusion utils. commit 259c3a2 Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Tue Apr 27 10:26:30 2021 +0200 Fix assumption on the layer in extrusion kernel. Only make additional assumption if there is more than one layer height. commit db0a907 Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Mon Apr 26 22:58:15 2021 +0200 Add import. commit 0a87fbc Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Mon Apr 26 22:57:41 2021 +0200 ? Fix remaining failing extrusion tests. Why are all the related tests now failing on assertion with a value that is double of what it is supposed to be? e.g. tests/extrusion/test_kernel_intrhs.py commit d1b25c9 Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Mon Apr 26 22:51:22 2021 +0200 Add additional assumptions on the layer arg. Fixes tests/extrusion/test_layer_height_mesh_volume.py::test_extrude_radial_mesh_volume commit b413015 Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Mon Apr 26 13:42:05 2021 +0200 JENKINS run with uptodate loopy branch. commit a47c31a Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Mon Apr 26 11:58:11 2021 +0200 Adapt to migation of match_caller_callee... commit 2e02549 Merge: ef4254b 5e05a66 Author: Sophia Vdw <54070354+sv2518@users.noreply.github.com> Date: Fri Apr 23 16:40:12 2021 +0200 Merge pull request #2040 from firedrakeproject/correct-access-mods-for-expression-kernels Specify is_input and is_output for loopy.GlobalArg objects commit ef4254b Author: Reuben Nixon-Hill <ReubenHill@users.noreply.github.com> Date: Fri Apr 23 15:34:05 2021 +0100 lint commit cebdf52 Author: Lawrence Mitchell <lawrence@wence.uk> Date: Fri Apr 23 15:32:45 2021 +0100 Correct access descriptors for augmented pointwise assignment commit 5e05a66 Author: Connor Ward <c.ward20@imperial.ac.uk> Date: Fri Apr 23 15:14:43 2021 +0100 Add op2.MAX and op2.MIN to is_input and is_output commit c3c18bd Author: Connor Ward <c.ward20@imperial.ac.uk> Date: Fri Apr 23 15:06:32 2021 +0100 Specify is_input and is_output for loopy.GlobalArg objects commit 2f11e7b Author: Kaushik Kulkarni <kaushikcfd@gmail.com> Date: Fri Apr 23 07:30:40 2021 -0500 add lang_version=(2018, 2) commit aa98a01 Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Fri Apr 23 12:54:58 2021 +0200 New fix for adaption to 714b68579b784a869d789e2c639348e1753727f9 in PyOP2 commit db038c7 Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Fri Apr 23 12:54:15 2021 +0200 Revert: ? This should adapt to 714b68579b784a869d789e2c639348e1753727f9... commit 750a2f7 Author: Reuben Nixon-Hill <ReubenHill@users.noreply.github.com> Date: Fri Apr 23 10:48:54 2021 +0100 Lint commit 39123b2 Author: Reuben Nixon-Hill <ReubenHill@users.noreply.github.com> Date: Fri Apr 23 10:15:02 2021 +0100 remove out of date import commit 44750f0 Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Thu Apr 22 21:48:23 2021 +0200 ? This should adapt to 714b68579b784a869d789e2c639348e1753727f9 in PyOP2, where the matrix arg gets read and written in the kernel. The regression test regression/test_p1pc.py is now compiling but failing with the wrong answer. commit 04afdc2 Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Thu Apr 22 21:43:13 2021 +0200 Adapt to tsfc changes. commit e89adf1 Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Thu Apr 22 14:21:55 2021 +0200 Slate kernel builder: Make the layer argument a scalar. commit f88493c Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Thu Apr 22 14:21:27 2021 +0200 Slate kernel builder: Subscript the layer argument. commit bb059c8 Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Thu Apr 22 08:27:30 2021 +0200 Match Slate wrapper with slate and tsfc kernels. commit 1f0d8bf Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Thu Apr 22 08:24:09 2021 +0200 Fix global arg generation for cellsizes and cellorientations. I think it would be better to safe a bit more information on the bag so that I don't need to access the orienations/size over slate_expression.ufl_domain(). commit c4346b1 Merge: 8775b9a af2f959 Author: Sophia Vdw <54070354+sv2518@users.noreply.github.com> Date: Wed Apr 21 17:53:25 2021 +0200 Merge pull request #2033 from firedrakeproject/loopy-sprint-RWargsInSlate Loopy sprint read write output args in slate commit af2f959 Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Wed Apr 21 14:03:13 2021 +0200 Output args of TSFC kernels are read and write. We adapted to that in PyOP2 here 714b68579b784a869d789e2c639348e1753727f9, so we have adapt the slatewrapper to have its output read and write as well. And also the call to the kernel containing the Slate instructions. commit 1166fd8 Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Wed Apr 21 12:08:16 2021 +0200 Argh. commit 0da7b99 Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Wed Apr 21 12:00:51 2021 +0200 Output args of TSFC kernels are read and write. We adapted to that in PyOP2 here 714b68579b784a869d789e2c639348e1753727f9, so we have adapt the slatewrapper to have its output read and write as well. commit c94d83c Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Wed Apr 21 11:57:24 2021 +0200 Output args of TSFC kernels are read and write. commit 8775b9a Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Tue Apr 20 22:16:02 2021 +0200 Fix passing the name of the extrusion kernels into a PyOP2 Kernel. commit f20481e Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Tue Apr 20 21:44:20 2021 +0200 Fix passing the name of the expression kernel into a PyOP2 Kernel. commit 26745c1 Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Tue Apr 20 10:45:30 2021 +0200 Slate Kernel Builder: fetch name from kernel callables table (rather than entrypoints) because we use make_function for Kernel generation in TSFC. commit cb3fbbf Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Tue Apr 20 09:43:19 2021 +0200 Compiler: Drop the workaround. We don't need to make the Slate wrapper a string Kernel anymore since we can inline multiple kernels into each other now. commit f7a5a67 Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Tue Apr 20 08:14:08 2021 +0200 Fix cell size arg in Slate wrapper kernel. commit d90ef48 Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Mon Apr 19 23:01:40 2021 +0200 Slate utils: Remove make_program, which became unneccessary because all Kernels are a Program now. commit 491cc00 Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Mon Apr 19 23:00:06 2021 +0200 KernelBuilder: access kernel information of the Slate loopy kernel to generate a CallInstruction. commit 52de378 Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Mon Apr 19 22:51:58 2021 +0200 Slate KernelBuilder: infer which args are needed for the Slate wrapper kernel over the information from the Slate wrapper bag. commit d81f3e4 Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Mon Apr 19 22:49:18 2021 +0200 Slac: Let the compiler be in control of the wrapper kernel naming. commit 1fca6c5 Author: Lawrence Mitchell <lawrence@wence.uk> Date: Mon Apr 19 16:31:03 2021 +0100 Adapt to pyop2/loopy changes commit 0733140 Author: Lawrence Mitchell <lawrence@wence.uk> Date: Mon Apr 19 16:12:27 2021 +0100 Adapt to TSFC api change commit ab57862 Author: Reuben Nixon-Hill <ReubenHill@users.noreply.github.com> Date: Mon Apr 19 15:27:38 2021 +0100 Replace lp.register_callable_kernel with lp.merge knl = lp.register_callable_kernel(knl, callee) is now knl = lp.merge([knl, callee]) . Reason given for loopy breaking back-compat: earlier they had a notion of a special "root_kernel" which only permitted one level of nesting loopy kernel calls and that was too restrictive. commit 1a54a0f Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Mon Apr 19 16:05:59 2021 +0200 JENKINS. commit 2ebefd3 Author: Sophia Vorderwuelbecke <sv2518@ic.ac.uk> Date: Mon Apr 19 15:49:19 2021 +0200 JENKINS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adapting to 714b68579b784a869d789e2c639348e1753727f9.