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
48b895c9
"test/vscode:/vscode.git/clone" did not exist on "6b159054882e0385b3578d6499f68d1dad25950a"
Commit
48b895c9
authored
Aug 16, 2019
by
Shucai Xiao
Browse files
fix two bugs related to the bert model
parent
8c6f1130
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
src/onnx/onnx.cpp
src/onnx/onnx.cpp
+10
-0
src/quantization.cpp
src/quantization.cpp
+1
-1
No files found.
src/onnx/onnx.cpp
View file @
48b895c9
...
@@ -490,6 +490,16 @@ struct onnx_parser
...
@@ -490,6 +490,16 @@ struct onnx_parser
{
{
axis
=
parse_value
(
attributes
.
at
(
"axis"
)).
at
<
int
>
();
axis
=
parse_value
(
attributes
.
at
(
"axis"
)).
at
<
int
>
();
}
}
if
(
!
args
[
0
]
->
get_shape
().
standard
())
{
args
[
0
]
=
prog
.
add_instruction
(
op
::
contiguous
{},
args
[
0
]);
}
if
(
!
args
[
1
]
->
get_shape
().
standard
())
{
args
[
1
]
=
prog
.
add_instruction
(
op
::
contiguous
{},
args
[
1
]);
}
op
::
gather
op
{
axis
};
op
::
gather
op
{
axis
};
return
prog
.
add_instruction
(
op
,
std
::
move
(
args
));
return
prog
.
add_instruction
(
op
,
std
::
move
(
args
));
}
}
...
...
src/quantization.cpp
View file @
48b895c9
...
@@ -53,7 +53,7 @@ void quantize(program& prog, const std::vector<std::string>& ins_names)
...
@@ -53,7 +53,7 @@ void quantize(program& prog, const std::vector<std::string>& ins_names)
// if the input is a convert operator, uses its input
// if the input is a convert operator, uses its input
// as its current input
// as its current input
instruction_ref
input_fp16
{};
instruction_ref
input_fp16
{};
if
(
input
->
name
()
==
"convert"
)
if
(
input
->
name
()
==
"convert"
and
input
->
inputs
().
front
()
->
get_shape
().
type
()
==
shape
::
half_type
)
{
{
input_fp16
=
input
->
inputs
().
front
();
input_fp16
=
input
->
inputs
().
front
();
}
}
...
...
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