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
Commits
dfff5eec
Commit
dfff5eec
authored
4 weeks ago
by
Russel Arbore
Browse files
Options
Downloads
Patches
Plain Diff
srad cpu schedule
parent
99b1d294
No related branches found
No related tags found
1 merge request
!202
Round 1 of rodinia schedule optimization
Pipeline
#201902
failed
4 weeks ago
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
juno_samples/rodinia/srad/build.rs
+2
-0
2 additions, 0 deletions
juno_samples/rodinia/srad/build.rs
juno_samples/rodinia/srad/src/cpu.sch
+35
-0
35 additions, 0 deletions
juno_samples/rodinia/srad/src/cpu.sch
juno_samples/rodinia/srad/src/srad.jn
+7
-6
7 additions, 6 deletions
juno_samples/rodinia/srad/src/srad.jn
with
44 additions
and
6 deletions
juno_samples/rodinia/srad/build.rs
+
2
−
0
View file @
dfff5eec
...
...
@@ -13,6 +13,8 @@ fn main() {
JunoCompiler
::
new
()
.file_in_src
(
"srad.jn"
)
.unwrap
()
.schedule_in_src
(
"cpu.sch"
)
.unwrap
()
.build
()
.unwrap
();
}
This diff is collapsed.
Click to expand it.
juno_samples/rodinia/srad/src/cpu.sch
0 → 100644
+
35
−
0
View file @
dfff5eec
macro simpl!(X) {
ccp(X);
simplify-cfg(X);
lift-dc-math(X);
gvn(X);
phi-elim(X);
dce(X);
infer-schedules(X);
}
phi-elim(*);
let loop1 = outline(srad@loop1);
let loop2 = outline(srad@loop2);
let loop3 = outline(srad@loop3);
simpl!(*);
const-inline(*);
crc(*);
slf(*);
write-predication(*);
simpl!(*);
predication(*);
simpl!(*);
predication(*);
simpl!(*);
fixpoint {
forkify(*);
fork-guard-elim(*);
fork-coalesce(*);
}
simpl!(*);
fork-split(*);
unforkify(*);
gcm(*);
This diff is collapsed.
Click to expand it.
juno_samples/rodinia/srad/src/srad.jn
+
7
−
6
View file @
dfff5eec
...
...
@@ -38,7 +38,7 @@ fn srad<nrows, ncols: usize>(
// These loops should really be interchanged, but they aren't in the
// Rodinia source (though they are in the HPVM source)
for
i
in
0
..
nrows
{
@
loop1
for
i
in
0
..
nrows
{
for
j
in
0
..
ncols
{
let
tmp
=
image
[
j
,
i
];
sum
+=
tmp
;
...
...
@@ -57,7 +57,7 @@ fn srad<nrows, ncols: usize>(
let
c
:
f32
[
ncols
,
nrows
];
for
j
in
0
..
ncols
{
@
loop2
for
j
in
0
..
ncols
{
for
i
in
0
..
nrows
{
let
Jc
=
image
[
j
,
i
];
dN
[
j
,
i
]
=
image
[
j
,
iN
[
i
]
as
u64
]
-
Jc
;
...
...
@@ -75,14 +75,15 @@ fn srad<nrows, ncols: usize>(
let
qsqr
=
num
/
(
den
*
den
);
let
den
=
(
qsqr
-
q0sqr
)
/
(
q0sqr
*
(
1
+
q0sqr
));
c
[
j
,
i
]
=
1.0
/
(
1.0
+
den
);
let
val
=
1.0
/
(
1.0
+
den
);
if
c
[
j
,
i
]
<
0
{
c
[
j
,
i
]
=
0
;
}
else
if
c
[
j
,
i
]
>
1
{
c
[
j
,
i
]
=
1
;
}
if
val
<
0
{
c
[
j
,
i
]
=
0
;
}
else
if
val
>
1
{
c
[
j
,
i
]
=
1
;
}
else
{
c
[
j
,
i
]
=
val
;
}
}
}
for
j
in
0
..
ncols
{
@
loop3
for
j
in
0
..
ncols
{
for
i
in
0
..
nrows
{
let
cN
=
c
[
j
,
i
];
let
cS
=
c
[
j
,
iS
[
i
]
as
u64
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment