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
96595c17
"...resnet50_tensorflow.git" did not exist on "d86584a9510793486f23c2cae288b3e01a1e6074"
Commit
96595c17
authored
Feb 08, 2022
by
Shucai Xiao
Browse files
Merge branch 'develop' of github.com:ROCmSoftwarePlatform/AMDMIGraphX into migraphx_for_ort
parents
3ce7ad8b
a30ec101
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
12 deletions
+12
-12
examples/migraphx/cpp_parse_load_save/README.md
examples/migraphx/cpp_parse_load_save/README.md
+1
-1
examples/migraphx/cpp_parse_load_save/parse_load_save.cpp
examples/migraphx/cpp_parse_load_save/parse_load_save.cpp
+1
-1
examples/vision/python_yolov4/yolov4_inference.ipynb
examples/vision/python_yolov4/yolov4_inference.ipynb
+7
-7
test/api/test_save_load.cpp
test/api/test_save_load.cpp
+1
-1
test/serialize_program.cpp
test/serialize_program.cpp
+1
-1
test/verify/run_verify.cpp
test/verify/run_verify.cpp
+1
-1
No files found.
examples/migraphx/cpp_parse_load_save/README.md
View file @
96595c17
...
...
@@ -15,7 +15,7 @@ p = parse_onnx(input_file, options);
```
## Saving
An instantiated migraphx::program object can then be serialized to MessagePack (.m
sgpack
) format and saved so that it can be loaded for future uses.
An instantiated migraphx::program object can then be serialized to MessagePack (.m
xr
) format and saved so that it can be loaded for future uses.
A program can be saved with either of the following:
```
...
...
examples/migraphx/cpp_parse_load_save/parse_load_save.cpp
View file @
96595c17
...
...
@@ -77,7 +77,7 @@ int main(int argc, char** argv)
std
::
cout
<<
"Saving program..."
<<
std
::
endl
;
std
::
string
output_file
;
output_file
=
save_arg
==
nullptr
?
"out"
:
save_arg
;
output_file
.
append
(
".m
sgpack
"
);
output_file
.
append
(
".m
xr
"
);
migraphx
::
file_options
options
;
options
.
set_file_format
(
"msgpack"
);
...
...
examples/vision/python_yolov4/yolov4_inference.ipynb
View file @
96595c17
...
...
@@ -50,10 +50,10 @@
"metadata": {},
"outputs": [],
"source": [
"if not os.path.exists(\"yolov4_fp16.m
sgpack
\"):\n",
" !/opt/rocm/bin/migraphx-driver compile ./utilities/yolov4.onnx --gpu --enable-offload-copy --fp16ref --binary -o yolov4_fp16.m
sgpack
\n",
"if not os.path.exists(\"yolov4.m
sgpack
\"):\n",
" !/opt/rocm/bin/migraphx-driver compile ./utilities/yolov4.onnx --gpu --enable-offload-copy --binary -o yolov4.m
sgpack
"
"if not os.path.exists(\"yolov4_fp16.m
xr
\"):\n",
" !/opt/rocm/bin/migraphx-driver compile ./utilities/yolov4.onnx --gpu --enable-offload-copy --fp16ref --binary -o yolov4_fp16.m
xr
\n",
"if not os.path.exists(\"yolov4.m
xr
\"):\n",
" !/opt/rocm/bin/migraphx-driver compile ./utilities/yolov4.onnx --gpu --enable-offload-copy --binary -o yolov4.m
xr
"
]
},
{
...
...
@@ -115,8 +115,8 @@
"outputs": [],
"source": [
"# Load serialized model (either single- or half-precision)\n",
"model = migraphx.load(\"yolov4.m
sgpack
\", format=\"msgpack\")\n",
"#model = migraphx.load(\"yolov4_fp16.m
sgpack
\", format=\"msgpack\")\n",
"model = migraphx.load(\"yolov4.m
xr
\", format=\"msgpack\")\n",
"#model = migraphx.load(\"yolov4_fp16.m
xr
\", format=\"msgpack\")\n",
"\n",
"# Get the name of the input parameter and convert image data to an MIGraphX argument\n",
"input_name = next(iter(model.get_parameter_shapes()))\n",
...
...
@@ -192,4 +192,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
\ No newline at end of file
}
test/api/test_save_load.cpp
View file @
96595c17
...
...
@@ -4,7 +4,7 @@
TEST_CASE
(
load_save_default
)
{
std
::
string
filename
=
"migraphx_api_load_save.
dat
"
;
std
::
string
filename
=
"migraphx_api_load_save.
mxr
"
;
auto
p1
=
migraphx
::
parse_onnx
(
"conv_relu_maxpool_test.onnx"
);
auto
s1
=
p1
.
get_output_shapes
();
...
...
test/serialize_program.cpp
View file @
96595c17
...
...
@@ -48,7 +48,7 @@ TEST_CASE(as_json)
TEST_CASE
(
as_file
)
{
std
::
string
filename
=
"migraphx_program.
dat
"
;
std
::
string
filename
=
"migraphx_program.
mxr
"
;
migraphx
::
program
p1
=
create_program
();
migraphx
::
save
(
p1
,
filename
);
migraphx
::
program
p2
=
migraphx
::
load
(
filename
);
...
...
test/verify/run_verify.cpp
View file @
96595c17
...
...
@@ -128,7 +128,7 @@ void run_verify::verify(const std::string& name, const migraphx::program& p) con
std
::
future
<
std
::
pair
<
migraphx
::
program
,
std
::
vector
<
migraphx
::
argument
>>>
;
auto_print
::
set_terminate_handler
(
name
);
if
(
migraphx
::
enabled
(
MIGRAPHX_DUMP_TEST
{}))
migraphx
::
save
(
p
,
name
+
".mx"
);
migraphx
::
save
(
p
,
name
+
".mx
r
"
);
std
::
vector
<
std
::
pair
<
std
::
string
,
result_future
>>
results
;
std
::
vector
<
std
::
string
>
target_names
;
for
(
const
auto
&
tname
:
migraphx
::
get_targets
())
...
...
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