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
RapidASR
Commits
4ba51522
Commit
4ba51522
authored
Feb 26, 2023
by
mayong
Browse files
Add RTF.
parent
fbd84f8d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
2 deletions
+17
-2
cpp_onnx/CMakeSettings.json
cpp_onnx/CMakeSettings.json
+12
-0
cpp_onnx/src/lib/paraformer_onnx.cpp
cpp_onnx/src/lib/paraformer_onnx.cpp
+1
-1
cpp_onnx/tester/tester.cpp
cpp_onnx/tester/tester.cpp
+4
-1
No files found.
cpp_onnx/CMakeSettings.json
View file @
4ba51522
...
@@ -9,6 +9,18 @@
...
@@ -9,6 +9,18 @@
"installRoot"
:
"${projectDir}
\\
out
\\
install
\\
${name}"
,
"installRoot"
:
"${projectDir}
\\
out
\\
install
\\
${name}"
,
"buildCommandArgs"
:
""
,
"buildCommandArgs"
:
""
,
"ctestCommandArgs"
:
""
"ctestCommandArgs"
:
""
},
{
"name"
:
"x64-Release"
,
"generator"
:
"Ninja"
,
"configurationType"
:
"RelWithDebInfo"
,
"buildRoot"
:
"${projectDir}
\\
out
\\
build
\\
${name}"
,
"installRoot"
:
"${projectDir}
\\
out
\\
install
\\
${name}"
,
"cmakeCommandArgs"
:
""
,
"buildCommandArgs"
:
""
,
"ctestCommandArgs"
:
""
,
"inheritEnvironments"
:
[
"msvc_x64_x64"
],
"variables"
:
[]
}
}
]
]
}
}
\ No newline at end of file
cpp_onnx/src/lib/paraformer_onnx.cpp
View file @
4ba51522
...
@@ -18,7 +18,7 @@ ModelImp::ModelImp(const char* path, int mode,int nNumThread)
...
@@ -18,7 +18,7 @@ ModelImp::ModelImp(const char* path, int mode,int nNumThread)
sessionOptions
.
SetInterOpNumThreads
(
nNumThread
);
//
sessionOptions.SetInterOpNumThreads(nNumThread);
sessionOptions
.
SetGraphOptimizationLevel
(
GraphOptimizationLevel
::
ORT_ENABLE_EXTENDED
);
sessionOptions
.
SetGraphOptimizationLevel
(
GraphOptimizationLevel
::
ORT_ENABLE_EXTENDED
);
#ifdef _WIN32
#ifdef _WIN32
...
...
cpp_onnx/tester/tester.cpp
View file @
4ba51522
...
@@ -51,8 +51,11 @@ int main(int argc, char *argv[])
...
@@ -51,8 +51,11 @@ int main(int argc, char *argv[])
cout
<<
"
\"
."
<<
endl
;
cout
<<
"
\"
."
<<
endl
;
seconds
=
(
end
.
tv_sec
-
start
.
tv_sec
);
seconds
=
(
end
.
tv_sec
-
start
.
tv_sec
);
micros
=
((
seconds
*
1000000
)
+
end
.
tv_usec
)
-
(
start
.
tv_usec
);
long
taking_
micros
=
((
seconds
*
1000000
)
+
end
.
tv_usec
)
-
(
start
.
tv_usec
);
printf
(
"Model inference takes %lfs.
\n
"
,
(
double
)
micros
/
1000000
);
printf
(
"Model inference takes %lfs.
\n
"
,
(
double
)
micros
/
1000000
);
printf
(
"Model inference RTF %04lf.
\n
"
,
(
double
)
taking_micros
/
micros
);
delete
mm
;
delete
mm
;
return
0
;
return
0
;
...
...
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