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
0440711e
Commit
0440711e
authored
1 month ago
by
Russel Arbore
Browse files
Options
Downloads
Patches
Plain Diff
progress
parent
5ab36921
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!195
Misc. GPU improvements
Pipeline
#201796
failed
1 month ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hercules_opt/src/editor.rs
+20
-0
20 additions, 0 deletions
hercules_opt/src/editor.rs
juno_samples/edge_detection/src/gpu.sch
+9
-2
9 additions, 2 deletions
juno_samples/edge_detection/src/gpu.sch
with
29 additions
and
2 deletions
hercules_opt/src/editor.rs
+
20
−
0
View file @
0440711e
...
@@ -795,6 +795,26 @@ impl<'a, 'b> FunctionEdit<'a, 'b> {
...
@@ -795,6 +795,26 @@ impl<'a, 'b> FunctionEdit<'a, 'b> {
self
.add_constant
(
constant_to_construct
)
self
.add_constant
(
constant_to_construct
)
}
}
pub
fn
add_pos_inf_constant
(
&
mut
self
,
id
:
TypeID
)
->
ConstantID
{
let
ty
=
self
.get_type
(
id
)
.clone
();
let
constant_to_construct
=
match
ty
{
Type
::
Float32
=>
Constant
::
Float32
(
ordered_float
::
OrderedFloat
(
f32
::
INFINITY
)),
Type
::
Float64
=>
Constant
::
Float64
(
ordered_float
::
OrderedFloat
(
f64
::
INFINITY
)),
_
=>
panic!
(),
};
self
.add_constant
(
constant_to_construct
)
}
pub
fn
add_neg_inf_constant
(
&
mut
self
,
id
:
TypeID
)
->
ConstantID
{
let
ty
=
self
.get_type
(
id
)
.clone
();
let
constant_to_construct
=
match
ty
{
Type
::
Float32
=>
Constant
::
Float32
(
ordered_float
::
OrderedFloat
(
f32
::
NEG_INFINITY
)),
Type
::
Float64
=>
Constant
::
Float64
(
ordered_float
::
OrderedFloat
(
f64
::
NEG_INFINITY
)),
_
=>
panic!
(),
};
self
.add_constant
(
constant_to_construct
)
}
pub
fn
get_constant
(
&
self
,
id
:
ConstantID
)
->
impl
Deref
<
Target
=
Constant
>
+
'_
{
pub
fn
get_constant
(
&
self
,
id
:
ConstantID
)
->
impl
Deref
<
Target
=
Constant
>
+
'_
{
if
id
.idx
()
<
self
.editor.constants
.borrow
()
.len
()
{
if
id
.idx
()
<
self
.editor.constants
.borrow
()
.len
()
{
Either
::
Left
(
Ref
::
map
(
self
.editor.constants
.borrow
(),
|
constants
|
{
Either
::
Left
(
Ref
::
map
(
self
.editor.constants
.borrow
(),
|
constants
|
{
...
...
This diff is collapsed.
Click to expand it.
juno_samples/edge_detection/src/gpu.sch
+
9
−
2
View file @
0440711e
...
@@ -62,10 +62,17 @@ fixpoint {
...
@@ -62,10 +62,17 @@ fixpoint {
simpl!(max_gradient);
simpl!(max_gradient);
fork-dim-merge(max_gradient);
fork-dim-merge(max_gradient);
simpl!(max_gradient);
simpl!(max_gradient);
fork-tile[32, 0, false, true](max_gradient);
fork-tile[1024, 0, false, true](max_gradient);
let out = fork-split(max_gradient);
fork-tile[32, 0, false, true](out._4_max_gradient.fj1);
let out = fork-split(max_gradient);
simpl!(max_gradient);
simpl!(max_gradient);
fork-split(max_gradient);
xdot[true](max_gradient);
clean-monoid-reduces(max_gradient);
xdot[true](max_gradient);
fork-fission-bufferize[out._4_max_gradient.fj0, out._4_max_gradient.fj1](max_gradient);
simpl!(max_gradient);
simpl!(max_gradient);
xdot[true](max_gradient);
no-memset(reject_zero_crossings@res);
no-memset(reject_zero_crossings@res);
fixpoint {
fixpoint {
...
...
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