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
ModelZoo
Resnet50_onnxruntime_migraphx
Commits
e7035bdf
Commit
e7035bdf
authored
Jan 07, 2025
by
liucong
Browse files
提交migraphx C++代码推理
parent
79cf04ca
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
Src/Classifier.cpp
Src/Classifier.cpp
+5
-6
No files found.
Src/Classifier.cpp
View file @
e7035bdf
...
...
@@ -37,12 +37,11 @@ ErrorCode Classifier::Initialize(InitializationParameterOfClassifier initializat
std
::
string
modelPath
=
(
std
::
string
)
netNode
[
"ModelPath"
];
// 初始化session
//设置DCU
OrtROCMProviderOptions
rocm_options
;
rocm_options
.
device_id
=
0
;
sessionOptions
.
AppendExecutionProvider_ROCM
(
rocm_options
);
sessionOptions
.
SetGraphOptimizationLevel
(
GraphOptimizationLevel
::
ORT_ENABLE_BASIC
);
// sessionOptions.EnableProfiling("profile_prefix");
OrtMIGraphXProviderOptions
migraphx_options
;
migraphx_options
.
device_id
=
0
;
migraphx_options
.
migraphx_fp16_enable
=
1
;
migraphx_options
.
dynamic_model
=
0
;
sessionOptions
.
AppendExecutionProvider_MIGraphX
(
migraphx_options
);
session
=
new
Ort
::
Session
(
env
,
modelPath
.
c_str
(),
sessionOptions
);
return
SUCCESS
;
...
...
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