-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compiler: Implement graceful lowering of derivatives (aka "unexpansion") #2060
Merged
Merged
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
f799a72
compiler: Prototype unexpansion
FabioLuporini ffc8c21
compiler: Revamp code generation from _C_ctype
FabioLuporini 91eee45
compiler: Support trivial unexpanded-derivatives examples
FabioLuporini 0eddd5d
dsl: Patch cross_derivative evaluation
FabioLuporini 63f41e8
dsl: Introduce Spacing subclass
FabioLuporini a94ab05
compiler: Patch StencilDimension reconstruction
FabioLuporini ce7c96c
compiler: Extend unexpansion machinery
FabioLuporini 4d63f17
compiler: Support StencilDimension in estimate_cost
FabioLuporini 380d262
compiler: Enhance fusion upon lower_index_derivative
FabioLuporini 45b5fa4
compiler: Rework is_cross rule for Cluster fusion
FabioLuporini 8805cd9
compiler: Implement maximal fusion for lowered IndexDerivatives
FabioLuporini 573ba59
compiler: Patch profiling in presence of StencilDimensions
FabioLuporini fda18ef
compiler: Improve IndexDerivative lowering to catch duplicates
FabioLuporini be02291
compiler: Enhance pow_to_mul to work around SymPy misbehavior
FabioLuporini c069dfe
compiler: Rework globals generation for device backends
FabioLuporini 573b4cb
compiler: Rework weights generation for device backends
FabioLuporini eb8616c
compiler: Patch index mode detection with StencilDimensions
FabioLuporini 0044b3b
compiler: Add IndexDerivative.mapper
FabioLuporini fb6c226
compiler: Patch lower_index_derivative
FabioLuporini 9a6679a
tests: Patch draft flaky unexpansion test
FabioLuporini 958c9a0
compiler: Patch lower_index_derivatives
FabioLuporini 3f73098
compiler: Patch globs codegen for deterministic output
FabioLuporini 8d28be1
compiler: Relax Properties manipulation methods
FabioLuporini 3eecf4d
compiler: Change IndexDerivative.mapper
FabioLuporini 9a843ba
compiler: Add IterationSpace.translate
FabioLuporini 52e076a
compiler: Move IndexSum.mapper to IndexDerivative.mapper
FabioLuporini a993d0d
compiler: Patch IndexDerivative.mapper
FabioLuporini 417dac4
compiler: Relax WAR dependencies involving shared Array
FabioLuporini 9c6ac52
compiler: Maximize likelihood of fusing clusters over shm
FabioLuporini 42627b1
compiler: Improve data dependence analysis
FabioLuporini fead97c
compiler: Add Jump mixin class
FabioLuporini 19f6af3
compiler: Patch collect_derivative pass
FabioLuporini 17ab99b
compiler: Add shm-related heuristics to Cluster fusion
FabioLuporini c2044d5
compiler: Add Properties methods
FabioLuporini 60e2e03
compiler: Make IndexDerivatives comparable; fix their CSE
FabioLuporini e5ea4d6
compiler: Draft Guards, akin to Properties
FabioLuporini 9d579b1
compiler: Rework customization of clusters visitors
FabioLuporini fcc2e86
compiler: Fix Cluster properties normalization at init
FabioLuporini 50025f5
compiler: Extend uxreplace to substitute types as well
FabioLuporini 3496221
compiler: Fixup linearization with isolated routines
FabioLuporini fcfa448
misc: Fixup pep8 violations
FabioLuporini c562c30
compiler: Introduce AffineIndexAccessFunction
FabioLuporini 43e700f
compiler: Improve IndexDerivative
FabioLuporini a588b6d
compiler: Enhance dtype retrieval
FabioLuporini 18bc963
compiler: Tidy up Interval.expand()
FabioLuporini 2640df3
compiler: Drop has_free for compatibility with older SymPy versions
FabioLuporini 5113825
examples: Update expected notebook output
FabioLuporini 0297597
compiler: Patch codegen upon pow_to_mul
FabioLuporini 2c5eb4d
misc: Postpone codegen speed improvement
FabioLuporini 403a194
examples: Update expected output
FabioLuporini 62e0fc8
examples: Disable openmp where necessary due to issue 2061
FabioLuporini 0c801bd
compiler: Exploit SubDim.local to support nasty deps in examples
FabioLuporini a97f6e6
ci: Drop support for gcc5, sympy1.7, sympy1.8
FabioLuporini 77eae11
compiler: Add IndexDerivative.total_order
FabioLuporini 9af12f4
arch: Enable openmp with nvc on CPU
FabioLuporini f33fcfc
ci: Add back forgotten gcc-11
FabioLuporini 88fafce
compiler: Tweak lower_index_derivatives
FabioLuporini dde53cc
compiler: IndexDerivative.total_order -> depth
FabioLuporini 2ce2797
misc: Tweak docstring
FabioLuporini 95b482c
compiler: Lift overrides from AffineIndexAccessFunc into IndexAccessFunc
FabioLuporini 0453503
arch: Add amdclang mapping
FabioLuporini File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
compiler: Add IndexDerivative.total_order
- Loading branch information
commit 77eae11114711dcc10c02f58aac248a55493f6d7
There are no files selected for viewing
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why 1+?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self is an IndexDerivative :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IndexDerivative don't have an order? If an
IndexDerivative
is always 1 it's gonna lead to inconsistency with the actual order of the derivative.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you have an IndexDerivative (say self), the total_order will definitely be
1 + X
.1
is for self;X
depends on the arguments. This still looks correct to me , it's also used in two tests (admittedly in a very simple way)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But why is it one it could be any order derivative it's the representation of the stencil expression that corresponds to a derivative with
deriv_order
order not just 1There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes, I see what you mean now, sorry!
I don't even have the deriv_order information at this point anymore. Perhaps I should attach it when IndexDerivative is created inside finite_differences.py. There it's definitely available!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just realized that what I need for the heuristics I have in place in PRO is the concept of depth, not the total_order (I'm not that sophisticated yet...). So I'm renaming it as "depth", which is what the current implementation represents.