-
Notifications
You must be signed in to change notification settings - Fork 16
Layout changes #237
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
Open
vidsinghal
wants to merge
86
commits into
main
Choose a base branch
from
layout_changes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Layout changes #237
Conversation
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
Looping in @ulysses4ever for reviewing |
This reverts commit 8908dbb. Revert "remove duplicates" This reverts commit 96d52fe. Revert "[LayoutOpt]: Add a greedy heuristic to ameliorate solver time in lieu of runtime performance." This reverts commit 209a90d. Revert "add support for global layout optimization for multiple functions" This reverts commit 540b2b7. Revert "[LayoutOptimization] Test multiple functions. Producer Consumer boundary optimization." This reverts commit 0344417. Revert "remove old comment in test examples" This reverts commit 90a2043. Revert "Add dyn flag to enable layout optimization. Remove dependency from annotations" This reverts commit 92d44b1. Revert "change failing test to pass" This reverts commit a7ab7f6. Revert "edit workflow" This reverts commit 4f17ce3. Revert "layout3TagSearch.hs: restore state" This reverts commit 2366e1e. Revert "forgot to add answer file" This reverts commit 924afa7. Revert "Mark layout test failing since need academic liscense to install cplex solver" This reverts commit f0ff4a6. Revert "move comments to bottom of file" This reverts commit b5eb4c1. Revert "Main pass to optimize layout when user annotates function" This reverts commit c937d0c. Revert "Add pass OptimizeADTLayout" This reverts commit 583a207. Revert "add synthetic bench from marmoset paper to tests" This reverts commit 45f39ad. Revert "Filter blogs unit tests" This reverts commit a90450f. Revert "blog tag search unit tests" This reverts commit 5c811a5. Revert "Additional layout unit tests" This reverts commit 4a8804c. Revert "change failing tests" This reverts commit 6dbf340. Revert "init some layout tests in the test-runner" This reverts commit 985b98b. Revert "AddRAN: missing fields in functionMeta record" This reverts commit 5827f62. Revert "src: HaskellFrontend" This reverts commit 0cb2be2. Revert "change package versions" This reverts commit ba19bc2. Revert "Passes: Access patterns, update GHC version to 9.4.6 in CI" This reverts commit fab882a. Revert "fix L1 test" This reverts commit 32d884b. Revert "fix" This reverts commit bc339a6. Revert "Tests: Fix L1 Typecheck case to fix CI error" This reverts commit 868c772. Revert "Passes: CallGraph" This reverts commit a87fd43. Revert "Passes: Support for Definition Use Chains" This reverts commit 4a51fec. Revert "Passes: Control Flow Graph" This reverts commit e554f1c.
This reverts commit 5b34c91.
This reverts commit 8908dbb.
This reverts commit 96d52fe.
… in lieu of runtime performance." This reverts commit 209a90d.
…ions" This reverts commit 540b2b7.
…er boundary optimization." This reverts commit 0344417.
This reverts commit 90a2043.
… from annotations" This reverts commit 92d44b1.
This reverts commit a7ab7f6.
This reverts commit 4f17ce3.
This reverts commit 2366e1e.
This reverts commit 924afa7.
…all cplex solver" This reverts commit f0ff4a6.
This reverts commit b5eb4c1.
This reverts commit c937d0c.
This reverts commit 583a207.
This reverts commit 45f39ad.
This reverts commit a90450f.
This reverts commit 5c811a5.
This reverts commit 4a8804c.
This reverts commit 6dbf340.
This reverts commit 985b98b.
…r gibbon, greedy and solver
ulysses4ever
reviewed
Jul 3, 2024
Imm (a, b) -> [a, b] | ||
_ -> []) | ||
constrs | ||
-- pythonCodegen :: [Constr] -> PassM String |
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.
Large chunk of this file is comments. Let's remove them? (whenever you have time to get back to this; I hope this PR will be cleaned up and merged...)
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 PR is for the Marmoset paper changes, as published in the ECOOP 2024 paper
TODO for this PR and potentially some future work.
format the code properly and make sure the PR is in a merge-able state and passes all tests.
For the boundary (producer-consumer) optimization. Backtracking the producer of a function whose data constructor is optimized is more complex that the current logic supports and needs a principled approach. This should be tested for varying input source code patterns.
Scalar Fields after Packed fields are not implemented yet in the compiler. For now, I generate a cost constraint that says that putting scalar fields after Recursive fields has a higher layout cost. But that is not the case. We need to support scalar after packed fields, for instance,
data List = Cons List Int | Nil
here the Int is after the recursive fieldList
.We should not rely on static costs for finding the most optimal layout. Instead we should develop a framework that can use profiles to use the correct edge weight and use those while finding the best layout. This is a significant change and improvement.
We should explore choosing the best local layout per function and then using
shim
functions to match layout between different functions. This might lead to better performing programs.Right now the compiler adds a pointer for each field. However, we don't need pointers for every field. This can be inferred from the traversals that traverses the data type. We should add a pass to support this.
We should add a testing framework that tests this optimization for different programs and correct bugs as and when needed.
The programmer should be able to provide a detailed specification of the datatype at the top level. This can be used for optimizing the layout too.