Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
4070da8a
"vscode:/vscode.git/clone" did not exist on "808b06557078626556ac855e196cbd788a9a9857"
Commit
4070da8a
authored
Jun 19, 2023
by
Artur Wojcik
Browse files
lowering
parent
8ec47c44
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
src/targets/ref/lowering.cpp
src/targets/ref/lowering.cpp
+8
-10
No files found.
src/targets/ref/lowering.cpp
View file @
4070da8a
...
@@ -88,13 +88,13 @@ struct ref_lrn
...
@@ -88,13 +88,13 @@ struct ref_lrn
{
{
argument
result
{
output_shape
};
argument
result
{
output_shape
};
visit_all
(
result
,
args
[
0
])([
&
](
auto
output
,
auto
input
)
{
visit_all
(
result
,
args
[
0
])([
&
](
auto
output
,
auto
input
)
{
int
n_batch
=
output_shape
.
lens
()[
0
];
auto
n_batch
=
output_shape
.
lens
()[
0
];
int
channels
=
output_shape
.
lens
()[
1
];
auto
channels
=
output_shape
.
lens
()[
1
];
int
height
=
output_shape
.
lens
()[
2
];
auto
height
=
output_shape
.
lens
()[
2
];
int
width
=
output_shape
.
lens
()[
3
];
auto
width
=
output_shape
.
lens
()[
3
];
float
alphaoverarea
=
op
.
alpha
/
float
(
op
.
size
);
auto
alphaoverarea
=
op
.
alpha
/
float
(
op
.
size
);
int
radius_lower
=
(
op
.
size
-
1
)
/
2
;
auto
radius_lower
=
(
op
.
size
-
1
)
/
2
;
int
radius_upper
=
op
.
size
/
2
+
1
;
auto
radius_upper
=
op
.
size
/
2
+
1
;
par_dfor
(
n_batch
,
height
,
width
)([
&
](
int
b
,
int
h
,
int
w
)
{
par_dfor
(
n_batch
,
height
,
width
)([
&
](
int
b
,
int
h
,
int
w
)
{
float
scale
=
0
;
float
scale
=
0
;
...
@@ -185,9 +185,7 @@ struct ref_im2col
...
@@ -185,9 +185,7 @@ struct ref_im2col
kernel_w
)([
&
](
std
::
size_t
c
,
std
::
size_t
koffset
,
std
::
size_t
loffset
)
{
kernel_w
)([
&
](
std
::
size_t
c
,
std
::
size_t
koffset
,
std
::
size_t
loffset
)
{
auto
idx
=
iinput
+
long
(
koffset
)
-
kdiv2_h
;
auto
idx
=
iinput
+
long
(
koffset
)
-
kdiv2_h
;
auto
jdx
=
jinput
+
long
(
loffset
)
-
kdiv2_w
;
auto
jdx
=
jinput
+
long
(
loffset
)
-
kdiv2_w
;
col
(
ldx
,
p
)
=
((
idx
>=
0
)
&&
(
idx
<
height
)
&&
(
jdx
>=
0
)
&&
(
jdx
<
width
))
col
(
ldx
,
p
)
=
((
idx
<
height
)
&&
(
jdx
<
width
))
?
input
(
0
,
c
,
idx
,
jdx
)
:
0
;
?
input
(
0
,
c
,
idx
,
jdx
)
:
0
;
p
++
;
p
++
;
});
});
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment