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
7f9e01d0
Commit
7f9e01d0
authored
Jun 05, 2019
by
Shucai Xiao
Browse files
fix cpu and gpu execution mismatch.
parent
11a0f1a9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/targets/gpu/device/convert.cpp
src/targets/gpu/device/convert.cpp
+1
-1
No files found.
src/targets/gpu/device/convert.cpp
View file @
7f9e01d0
...
@@ -23,7 +23,7 @@ void convert(hipStream_t stream,
...
@@ -23,7 +23,7 @@ void convert(hipStream_t stream,
float
res
=
input_ptr
[
i
]
*
scale
+
shift
;
float
res
=
input_ptr
[
i
]
*
scale
+
shift
;
int
factor
=
(
res
>
0
)
?
1
:
-
1
;
int
factor
=
(
res
>
0
)
?
1
:
-
1
;
output_ptr
[
i
]
=
output_ptr
[
i
]
=
st
d
::
min
<
int8_t
>
(
std
::
max
<
float
>
(
-
128
,
res
+
factor
*
0.5
),
127
);
st
atic_cast
<
int8_t
>
(
std
::
min
<
float
>
(
std
::
max
<
float
>
(
-
128
.0
f
,
res
+
factor
*
0.5
),
127
.0
f
)
);
});
});
}
}
else
else
...
...
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