Skip to content
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

GALOP #2027

Closed
wants to merge 618 commits into from
Closed

GALOP #2027

Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
618 commits
Select commit Hold shift + click to select a range
599f267
Move coalesce pass to MCMem
Nov 1, 2023
d630bdc
Merge remote-tracking branch 'upstream/master'
Nov 1, 2023
a8ee251
cleanup
BjarkePedersen Nov 1, 2023
7b4813a
Cleanup
BjarkePedersen Nov 1, 2023
fb99bf7
Rename CoalesceAccess to OptimizeMemLayout
BjarkePedersen Nov 1, 2023
8f09ce1
Split pass into 3 stages + rename it to OptimizeMemLayout
BjarkePedersen Nov 1, 2023
475ee7a
Rename optimizeMemLayout => optimizeArrayLayout
Nov 2, 2023
af19dc1
rename OptimizeMemLayout.hs -> OptimizeArrayLayout.hs
Nov 2, 2023
e0db770
Fix lud crash; update context with array
Nov 2, 2023
35461eb
Remove unused argument
Nov 2, 2023
696934d
Use the correct context when fetching the array name
Nov 2, 2023
de2ebfc
Streamline MC & MCMem implementation
Nov 2, 2023
3ea6010
Move ArrayLayout optimizer back to MC pipeline
Nov 2, 2023
ea5ef2a
Revert Makefile changes
Nov 2, 2023
a04ceae
Remove `nest` from MemoryEntry
BjarkePedersen Nov 3, 2023
3916ff9
Remove [BodyType] from key of assignments in Context
BjarkePedersen Nov 3, 2023
4ec6f33
Rewrite permutationTableFromIndexTable
Nov 3, 2023
10c80e6
Make a list of common permutation predicates
Nov 3, 2023
e11e931
Fix parents being lost
BjarkePedersen Nov 3, 2023
b5014c0
Add boi
BjarkePedersen Nov 7, 2023
ddacfd5
Nothing works
BjarkePedersen Nov 7, 2023
f2fd06a
Fix
Nov 7, 2023
6528d0b
My commit is better
BjarkePedersen Nov 7, 2023
404a5f8
Get unique names
BjarkePedersen Nov 7, 2023
7650875
Make indirect indexing inextricable
Nov 7, 2023
e40ec58
Don't manifest inscrutable Index expressions
BjarkePedersen Nov 7, 2023
c372706
Add optimize pass back to passes
BjarkePedersen Nov 7, 2023
3f32266
Cleanup + renaming
BjarkePedersen Nov 7, 2023
2181a2b
Rename DimIdxPat to AccessInfo and remove MemoryEntry
BjarkePedersen Nov 7, 2023
34159ef
Remove MemoryEntry
BjarkePedersen Nov 7, 2023
bd6b5f0
Merge branch 'babysit'
Nov 8, 2023
fff3150
Add more patterns
Nov 8, 2023
17f0bfe
Add test script for transform stage
BjarkePedersen Nov 8, 2023
39cc3e4
Rename AccessInfo to DimAccess
BjarkePedersen Nov 8, 2023
20248ef
Make analysis tests take IR of the program as input
BjarkePedersen Nov 8, 2023
612d1af
Don't pretty print empty list in ArrayName
BjarkePedersen Nov 9, 2023
2bc05a7
Update tests
BjarkePedersen Nov 9, 2023
721b217
Rename memEntry -> dimAccesses
BjarkePedersen Nov 9, 2023
1529b40
Cleanup Layout
BjarkePedersen Nov 9, 2023
2e73777
Unit tests for Layout stage of our pass + fixes
BjarkePedersen Nov 9, 2023
c8179c5
Small fixes
BjarkePedersen Nov 9, 2023
b1e1721
add namesFromIntMap
BjarkePedersen Nov 10, 2023
c4e2d74
Unit tests for Analyze stage of our pass
BjarkePedersen Nov 10, 2023
edc83d6
Cleanup
BjarkePedersen Nov 13, 2023
269b125
Unit tests for analyze stage
BjarkePedersen Nov 13, 2023
d72dabc
Update test case
BjarkePedersen Nov 13, 2023
3d0a079
futhark literate: do not choke on malformed files.
athas Nov 9, 2023
e673e6b
Fix #2017. (#2043)
athas Nov 10, 2023
7a565da
Fix #1960.
athas Nov 10, 2023
9d94a0b
Fix typo
athas Nov 10, 2023
24e764c
futhark prof: support raw profiling report.
athas Nov 10, 2023
357b071
Document new feature.
athas Nov 10, 2023
a6ca039
futhark profile: also produce timeline.
athas Nov 10, 2023
8ffa613
opDependencies: fix Hist case.
athas Nov 11, 2023
0ec080d
opDependencies: fix case for SegOps.
athas Nov 11, 2023
47bede6
futhark profile: also show min and max.
athas Nov 11, 2023
1221126
Disable AMD tests until KU-IT resurrects our machine.
athas Nov 11, 2023
111be3e
No linebreak here.
athas Nov 11, 2023
be853cb
opDependencies: fix for multi-value scatters.
athas Nov 11, 2023
0f49917
Oops, use the right metric here.
athas Nov 11, 2023
fbd33a7
Newer Nix and Hackage.
athas Nov 12, 2023
a7fcaa0
This is 0.25.8.
athas Nov 12, 2023
ec72847
Onwards!
athas Nov 12, 2023
d27d207
Add CHANGELOG.md and README.md to extra-doc-files (#2044)
Bodigrim Nov 12, 2023
1940b12
Fix link to hacking guide.
athas Nov 13, 2023
15f0658
Hoist manifests more aggressively out of multi-versioning inside loops.
athas Nov 13, 2023
1d731f4
Merge branch 'babysit'
Nov 14, 2023
926b03d
Small fix to analyzeSubExpr
BjarkePedersen Nov 14, 2023
9dcc7a6
Rename `bodies` to `parents`
BjarkePedersen Nov 14, 2023
ba92ee3
Revert "Rename memEntry -> dimAccesses"
Nov 14, 2023
5cad935
Revert "add namesFromIntMap"
Nov 14, 2023
069829f
Add variable type to context value
Nov 15, 2023
0dce4c4
Remove garbage file
Nov 15, 2023
13b0ecb
Fix freudian slip
Nov 15, 2023
96dd3bd
add PrimExp analysis boilerplate
BjarkePedersen Nov 15, 2023
150408e
rename
BjarkePedersen Nov 15, 2023
43a22d1
Use funPrimExp in our pass
BjarkePedersen Nov 15, 2023
ff3ab19
Better names
BjarkePedersen Nov 15, 2023
2245db8
Even better names + todos
BjarkePedersen Nov 15, 2023
2443c34
add primExpAnalysis
BjarkePedersen Nov 15, 2023
97b6824
Even better names
BjarkePedersen Nov 15, 2023
0efef5c
tmp
Nov 15, 2023
e15f191
Purge complexity
Nov 15, 2023
fcbfc1c
Fix unit tests
Nov 15, 2023
5e713ab
Minor comments
Nov 16, 2023
0641167
Split out tableMapMaybe functionality
Nov 16, 2023
0dbe298
Ignore DimAccess where last dimension is constant
Nov 16, 2023
951de22
Handle multiple pattern elements
BjarkePedersen Nov 15, 2023
ef5bd00
make PrimExpTable a map to Maybe PrimExp
BjarkePedersen Nov 16, 2023
b0b70bc
Add test for const index elimination
Nov 16, 2023
cf70c89
Make code less scuffed
BjarkePedersen Nov 16, 2023
c2b0529
Add files to cabal
BjarkePedersen Nov 16, 2023
83ac631
Make code even less scuffed
BjarkePedersen Nov 16, 2023
7df6afa
Add "unmoved last dim" predicate
Nov 16, 2023
ce52547
Handle conversion to PrimExp for all SegOps
BjarkePedersen Nov 17, 2023
6fd7c08
Handle loop parameters
BjarkePedersen Nov 17, 2023
f3ce585
Implement PrimExp analysis for MC backend
BjarkePedersen Nov 17, 2023
e70bd9f
Calculate stride and offset from PrimExps
BjarkePedersen Nov 17, 2023
0ce0c8f
Remove pTraces
BjarkePedersen Nov 17, 2023
b2a3091
Reduce complexity independently from stride and offset
BjarkePedersen Nov 20, 2023
84d6bf1
Remove pTraces
BjarkePedersen Nov 20, 2023
e5dc447
Fix non-exhaustive pattern matches
BjarkePedersen Nov 20, 2023
f4ec036
Add `isInvariant` predicate
Nov 20, 2023
154911b
Correctly handle for loop parameters
BjarkePedersen Nov 20, 2023
71f725b
Correctly handle for-loop parameters
BjarkePedersen Nov 20, 2023
85368c1
Don't calculate stride and offset for constants
BjarkePedersen Nov 20, 2023
16ec602
Add slices to context
Nov 20, 2023
dc5f426
Be explicit in the last case
Nov 20, 2023
25e5053
Minor comments & improvements
Nov 20, 2023
f78ad4a
Remove IterationType
BjarkePedersen Nov 20, 2023
dc11150
Fix unit tests
BjarkePedersen Nov 20, 2023
ce3220f
Fix analysis tests
BjarkePedersen Nov 20, 2023
0132ffd
Fixed a test
BjarkePedersen Nov 20, 2023
d162628
Revert "Add slices to context"
Nov 20, 2023
2b05e99
Fix todo
BjarkePedersen Nov 20, 2023
298e495
Rename CtxVal -> VariableInfo
BjarkePedersen Nov 20, 2023
85f03e7
Changed dependencies tuple to `Dependency` record
BjarkePedersen Nov 20, 2023
4ee5bde
Changed dependencies tuple to `Dependency` record
BjarkePedersen Nov 20, 2023
bc70193
Revert "Add slices to context"
Nov 20, 2023
219c4b7
Handle slices
Nov 20, 2023
289c95b
Fix context when adding slices
Nov 20, 2023
12c47d7
Fix....?
Nov 20, 2023
81baffa
Merge branch 'babysit'
Nov 20, 2023
c0364fc
Merge branch 'slices'
Nov 21, 2023
f7a9c5b
Treat all threadIDs the same
Nov 21, 2023
8fb9749
Add unit tests for AnalyzePrimExp
BjarkePedersen Nov 21, 2023
6772cd1
Added MC unit tests for AnalyzePrimExp
BjarkePedersen Nov 21, 2023
e97fc1c
Multiline the oneliner
Nov 21, 2023
4ddf92c
Rename some unit tests
BjarkePedersen Nov 21, 2023
f8b12ee
Move `originalVar` out of `Dependency`
BjarkePedersen Nov 22, 2023
3fa2229
Fix test so we don't want to manifest [thid, thid]
BjarkePedersen Nov 22, 2023
ed6bb92
Small fix
BjarkePedersen Nov 22, 2023
41a6243
Fixed unit tests
BjarkePedersen Nov 22, 2023
9c01a84
Remove `originalDimension` from DimAccess
BjarkePedersen Nov 22, 2023
f62e75f
Fix analysis tests
BjarkePedersen Nov 22, 2023
0bae7de
Move reduced var to be the key of DimAccess
Nov 22, 2023
9f22663
Fix critical bug
Nov 22, 2023
c777ada
Small fixes
BjarkePedersen Nov 22, 2023
e2a989c
Fix access-transitivity function
Nov 22, 2023
b52890d
Enable previous function again:)
Nov 22, 2023
9106778
Fix LayoutTests
Nov 22, 2023
ec832f4
Fix test compilation issue
Nov 22, 2023
4223197
Fixes + cleanup
BjarkePedersen Nov 23, 2023
8ca2e1f
Fix tests
BjarkePedersen Nov 23, 2023
ea47ae7
Fix unit tests
BjarkePedersen Nov 23, 2023
1ceb80c
Add slice testcase
BjarkePedersen Nov 23, 2023
a9d22be
Fix test script so we don't debug simplify and cse
BjarkePedersen Nov 23, 2023
0bf70ba
Fix wrong argument in function
Nov 23, 2023
571a1b1
Fix slices
Nov 23, 2023
f711a37
Handle empty lists in index analyser
Nov 23, 2023
025b51d
Discard offset
Nov 24, 2023
d851f68
Extend stride + offset reduction
Nov 24, 2023
c805d2e
Negate conditional
Nov 24, 2023
d0a620c
Fix originalVar in slices
Nov 24, 2023
b02f812
Use the original arrayName for slices
Nov 24, 2023
d1456a2
Fix handling of slices
BjarkePedersen Nov 24, 2023
bf790a1
Fix typo
Nov 24, 2023
a1cd3b4
Fix slice test
BjarkePedersen Nov 24, 2023
2ba9307
Remove bfast test
BjarkePedersen Nov 24, 2023
9fb7405
Fix `isInscrutable` (if not counter)
BjarkePedersen Nov 24, 2023
fc4beb5
Confirm test cases
BjarkePedersen Nov 24, 2023
042dec1
Confirm test cases
BjarkePedersen Nov 24, 2023
d76d308
Revert "Treat all threadIDs the same"
Nov 24, 2023
d198afe
These operators run thread code.
athas Nov 22, 2023
9a2a87d
Celebrate fix.
athas Nov 22, 2023
f6bfbf8
Add ldexp to float modules. (#2047)
athas Nov 22, 2023
ebd11e0
Also note this.
athas Nov 22, 2023
987650f
Support ldexp in Python backend.
athas Nov 22, 2023
1965cfa
Suspecting asan bug here, so disable.
athas Nov 22, 2023
f2c58d5
Use GHC 9.4 on macOS.
athas Nov 22, 2023
d2249b8
Linebreak after error message.
athas Nov 22, 2023
649a0c9
Loosen bounds for GHC 9.8 compatibility.
athas Nov 22, 2023
5822727
Adaptations for gHC 9.8.
athas Nov 23, 2023
af66b43
We can use GHC2021 now.
athas Nov 23, 2023
172143a
Mark index space transformation functions as inline.
athas Nov 23, 2023
627f203
This is 0.25.9.
athas Nov 23, 2023
4a0af7f
Onwards!
athas Nov 23, 2023
329977d
Fix unhandled leaf expressions
Nov 27, 2023
40a0d4e
Merge remote-tracking branch 'upstream/master'
Nov 28, 2023
c596d1e
Fix IndexExpressionName type
Nov 28, 2023
3c58989
Handle slices when going out-of-scope
Nov 28, 2023
3e566f2
Fixup slice dependency order
Nov 28, 2023
32286fd
Add dummy slice variable to primexp result
Nov 28, 2023
2250aba
Cleanup
BjarkePedersen Nov 29, 2023
f1bf671
Change variable names to snake_case
BjarkePedersen Nov 29, 2023
a54975f
Fix tests
BjarkePedersen Nov 29, 2023
113e5a0
Fix bad merge
Nov 29, 2023
8f74c7d
Fixup style errors
Nov 29, 2023
ff58f63
Remove unused instances
Nov 29, 2023
8c683e6
Remove access transitivity
Nov 29, 2023
90c601a
Use correct english filename convention
Nov 29, 2023
88d7e1e
Fixup naming & general code cleanup
Nov 29, 2023
97db747
Minor cleanup
Nov 29, 2023
c81a7b7
Add same rules for MC backend
Nov 30, 2023
0524bd1
Add doc
Dec 1, 2023
05e5f68
Only check whether last idx is inscrutable
Dec 1, 2023
3ebe04e
Revert "Only check whether last idx is inscrutable"
Dec 1, 2023
9c7fe88
Merge from upstream
Dec 4, 2023
56c330e
Merge from upstream
Dec 11, 2023
c000b39
Fix CLI name
Dec 13, 2023
223e592
"Optimize" => "Optimise"
Dec 14, 2023
ee34205
Fixup tests
Dec 14, 2023
8d32f9d
Update tests
Dec 15, 2023
79df239
snake case
BjarkePedersen Dec 15, 2023
1aacc4c
Optimize traversal in transform
BjarkePedersen Dec 15, 2023
3cd79f7
Fix src code of some tests
BjarkePedersen Dec 16, 2023
92d4409
FIx documentation + rename PermutationTable
BjarkePedersen Dec 19, 2023
b78df62
Rename OptimiseArrayLayout -> GALOP
BjarkePedersen Dec 19, 2023
265e122
Revert "Rename OptimiseArrayLayout -> GALOP"
athas Jan 21, 2024
e94176c
Merge branch 'master' into galop
athas Jan 21, 2024
a44848e
Factor into two pass entry points.
athas Jan 21, 2024
270035f
Fix tests.
athas Jan 21, 2024
038b7d6
Simplify the layout optimisation tests.
athas Jan 21, 2024
ae706a3
Shorten tests further.
athas Jan 21, 2024
93a0154
Avoid type applications.
athas Jan 21, 2024
0bc21a3
Merge branch 'master' into galop
athas Jan 21, 2024
41ea2d1
Get rid of kernel babysitting.
athas Jan 21, 2024
f0187d2
Move to Futhark.Optimise.
athas Jan 21, 2024
2318cd4
Forgot to rename this import.
athas Jan 21, 2024
5be7c89
Clarify comment
Jan 23, 2024
591d026
New tool: futhark script. (#2095)
athas Jan 22, 2024
74fa5a6
Fix #2096.
athas Jan 22, 2024
4430fe9
futhark script: allow precompiled executables.
athas Jan 23, 2024
01fdca0
Better error message.
athas Jan 23, 2024
d9288ac
One line is better.
athas Jan 23, 2024
486a726
This message changed.
athas Jan 23, 2024
930542c
FutharkScript: now with automagic currying.
athas Jan 23, 2024
e0b878a
futhark script: support -L and -D.
athas Jan 23, 2024
3c2bb3e
Fix typo. (#2097)
einar-io Jan 23, 2024
6087ceb
Add useful IsString instances to unit test suite.
athas Jan 23, 2024
ee9b8fa
Only do the autocurrying when it would work.
athas Jan 23, 2024
cfdc77d
More docs.
athas Jan 23, 2024
9038989
Fix #2099.
athas Jan 24, 2024
5885f6c
Fix #2100.
athas Jan 24, 2024
bb3d6c2
Oops, PyOpenCL had been broken.
athas Jan 24, 2024
3881da2
Test PyOpenCL in CI.
athas Jan 24, 2024
3711d10
Restore PyOpenCL backend.
athas Jan 24, 2024
fe37819
This test needs Numpy.
athas Jan 24, 2024
98b0f20
Unsurprisingly also needs PyOpenCL.
athas Jan 24, 2024
04af38a
Use PyOpenCL from pip.
athas Jan 25, 2024
b9cb0a9
futhark repl: do not silently ignore breakpoints.
athas Jan 25, 2024
63abb45
Bump Hackage and Nix.
athas Jan 25, 2024
af5056f
This is 0.25.13.
athas Jan 25, 2024
9186c9b
Onwards!
athas Jan 25, 2024
e9a6526
Remove unnecessary test files.
athas Jan 25, 2024
ab52396
Remove tests_analysis.
athas Jan 25, 2024
c709cef
Less weird style.
athas Jan 25, 2024
adbd2fd
Cut down on the Maybe nesting.
athas Jan 25, 2024
9a477c1
Format fix.
athas Jan 25, 2024
4577b3a
Merge branch 'master' into galop
athas Jan 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion futhark.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,9 @@ library
Futhark.Optimise.Unstream
Futhark.Pass
Futhark.Pass.AD
Futhark.Pass.CoalesceAccess
Futhark.Pass.OptimizeMemLayout
0undefined marked this conversation as resolved.
Show resolved Hide resolved
Futhark.Pass.OptimizeMemLayout.Transform
Futhark.Pass.OptimizeMemLayout.Layout
Futhark.Pass.ExpandAllocations
Futhark.Pass.ExplicitAllocations
Futhark.Pass.ExplicitAllocations.GPU
Expand Down
8 changes: 4 additions & 4 deletions src/Futhark/CLI/Dev.hs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ import Futhark.Optimise.TileLoops
import Futhark.Optimise.Unstream
import Futhark.Pass
import Futhark.Pass.AD
import Futhark.Pass.CoalesceAccess
import Futhark.Pass.ExpandAllocations
import Futhark.Pass.ExplicitAllocations.GPU qualified as GPU
import Futhark.Pass.ExplicitAllocations.MC qualified as MC
Expand All @@ -56,6 +55,7 @@ import Futhark.Pass.FirstOrderTransform
import Futhark.Pass.KernelBabysitting
import Futhark.Pass.LiftAllocations as LiftAllocations
import Futhark.Pass.LowerAllocations as LowerAllocations
import Futhark.Pass.OptimizeMemLayout
import Futhark.Pass.Simplify
import Futhark.Passes
import Futhark.Util.Log
Expand Down Expand Up @@ -391,15 +391,15 @@ coalesceOption short =
passOption (passDescription pass) (UntypedPass perform) short long
where
perform (GPU prog) config =
GPU <$> runPipeline (onePass coalesceAccess) config prog
GPU <$> runPipeline (onePass optimizeMemLayout) config prog
perform (MC prog) config =
MC <$> runPipeline (onePass coalesceAccess) config prog
MC <$> runPipeline (onePass optimizeMemLayout) config prog
perform s _ =
externalErrorS $
"Pass '" ++ passDescription pass ++ "' cannot operate on " ++ representation s

long = [passLongOption pass]
pass = coalesceAccess :: Pass GPU.GPU GPU.GPU
pass = optimizeMemLayout :: Pass GPU.GPU GPU.GPU

sinkOption :: String -> FutharkOption
sinkOption short =
Expand Down