Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
Hercules
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
llvm
Hercules
Merge requests
!209
Fork fission
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Fork fission
fork-fission
into
main
Overview
0
Commits
11
Pipelines
9
Changes
5
Merged
Xavier Routh
requested to merge
fork-fission
into
main
8 months ago
Overview
0
Commits
11
Pipelines
9
Changes
5
Expand
0
0
Merge request reports
Viewing commit
0d4fb1cf
Prev
Next
Show latest version
5 files
+
51
−
21
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
Search (e.g. *.vue) (Ctrl+P)
0d4fb1cf
fix labels for fork-fission-reduces, + gpu schedule for test
· 0d4fb1cf
Xavier Routh
authored
8 months ago
hercules_opt/src/fork_transforms.rs
+
14
−
4
Options
@@ -310,23 +310,33 @@ pub fn fork_fission<'a>(
reduce_cycles
:
&
HashMap
<
NodeID
,
HashSet
<
NodeID
>>
,
loop_tree
:
&
LoopTree
,
fork_join_map
:
&
HashMap
<
NodeID
,
NodeID
>
,
fork_label
:
LabelID
,
)
->
Vec
<
NodeID
>
{
let
mut
forks
:
Vec
<
_
>
=
loop_tree
let
forks
:
Vec
<
_
>
=
loop_tree
.bottom_up_loops
()
.into_iter
()
.filter
(|(
k
,
_
)|
editor
.func
()
.nodes
[
k
.idx
()]
.is_fork
())
.collect
();
let
mut
created_forks
=
Vec
::
new
();
// This does the reduction fission
for
fork
in
forks
.clone
()
{
for
fork
in
forks
{
let
join
=
fork_join_map
[
&
fork
.0
];
// FIXME: Don't make multiple forks for reduces that are in cycles with each other.
let
reduce_partition
=
default_reduce_partition
(
editor
,
fork
.0
,
join
);
if
!
editor
.func
()
.labels
[
fork
.0
.idx
()]
.contains
(
&
fork_label
)
{
continue
;
}
if
editor
.is_mutable
(
fork
.0
)
{
created_forks
=
fork_reduce_fission_helper
(
editor
,
fork_join_map
,
reduce_partition
,
nodes_in_fork_joins
,
fork
.0
);
if
!
created_forks
.is_empty
()
{
break
;
if
created_forks
.is_empty
()
{
continue
;
}
else
{
return
created_forks
;
}
}
Loading