-
Notifications
You must be signed in to change notification settings - Fork 323
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
Auto Parallelism #2000
Auto Parallelism #2000
Conversation
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.
Code is good. Some minor readability comments.
I've verified that this doesn't seem to impact any of the compilation and caching work.
RELEASES.md
Outdated
@@ -1,5 +1,11 @@ | |||
# Enso Next | |||
|
|||
## Interpreter/Runtime | |||
|
|||
- Added support for automatic parallelization of computations |
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.
- Added support for automatic parallelization of computations | |
- Added experimental support for automatic parallelization of computations |
@@ -56,6 +56,7 @@ object Main { | |||
private val UPLOAD_OPTION = "upload" | |||
private val HIDE_PROGRESS = "hide-progress" | |||
private val AUTH_TOKEN = "auth-token" | |||
private val AUTO_PARALLELISM_OPTION = "with-auto-parallelism" |
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.
Alignment.
moduleIr.bindings.find { | ||
case method: IR.Module.Scope.Definition.Method.Explicit => | ||
method.methodReference.methodName.name == this.method.name && method.methodReference.typePointer | ||
.getMetadata(MethodDefinitions) | ||
.contains(Resolution(ResolvedModule(module))) | ||
case _ => false | ||
}.get |
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.
This should be unsafeGetIr
and you probably want a safe version returning Option[Definition]
.
* followed by a series of pinnedd lines. | ||
* @param parallelizable the parallelizable lines |
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.
* followed by a series of pinnedd lines. | |
* @param parallelizable the parallelizable lines | |
* followed by a series of pinned lines. | |
* | |
* @param parallelizable the parallelizable lines |
* Computes the transitive closure of the dependency info. | ||
* @param segment the segment containing only immediate dependency info. |
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.
* Computes the transitive closure of the dependency info. | |
* @param segment the segment containing only immediate dependency info. | |
* Computes the transitive closure of the dependency info. | |
* | |
* @param segment the segment containing only immediate dependency info. |
* parallelizable line to a block. | ||
* @param segment the segment for which assignment should be done. |
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.
* parallelizable line to a block. | |
* @param segment the segment for which assignment should be done. | |
* parallelizable line to a block. | |
* | |
* @param segment the segment for which assignment should be done. |
// Going backwards through the lines (i.e. post-order of the dependency | ||
// graph), assign each not-yet-assigned parallelized line to a new thread. | ||
// Also move all its dependencies to the new thread (or promote to current | ||
// thread, see #moveTo. |
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.
// thread, see #moveTo. | |
// thread), see #moveTo. |
* Splits a block into sub-blocks based on the parallelism status. | ||
* @param exprs the exprs to split, together with their status. |
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.
* Splits a block into sub-blocks based on the parallelism status. | |
* @param exprs the exprs to split, together with their status. | |
* Splits a block into sub-blocks based on the parallelism status. | |
* | |
* @param exprs the exprs to split, together with their status. |
Pull Request Description
Introduces a rudimentary version of auto parallelism
Important Notes
Checklist
Please include the following checklist in your PR: