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
composable_kernel
Commits
8d0e00a0
Commit
8d0e00a0
authored
Jun 23, 2022
by
carlushuang
Browse files
fix some printout
parent
6ffd41ae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
14 deletions
+11
-14
example/cpu_01_conv2d_fwd/cpu_conv2d_fwd.cpp
example/cpu_01_conv2d_fwd/cpu_conv2d_fwd.cpp
+6
-12
example/cpu_02_conv2d_fwd_bias_relu_add/cpu_conv2d_fwd_bias_relu_add.cpp
...conv2d_fwd_bias_relu_add/cpu_conv2d_fwd_bias_relu_add.cpp
+5
-2
No files found.
example/cpu_01_conv2d_fwd/cpu_conv2d_fwd.cpp
View file @
8d0e00a0
#include <sstream>
#include <iomanip>
#include "config.hpp"
#include "device.hpp"
#include "host_tensor.hpp"
...
...
@@ -642,20 +643,13 @@ int main(int argc, char* argv[])
if
(
fastest_kernel_time
!=
std
::
numeric_limits
<
double
>::
max
())
{
std
::
cout
<<
" fastest:"
<<
fastest_kernel_name
<<
", time:"
<<
fastest_kernel_time
<<
"ms, Gflops:"
<<
fastest_kernel_gflops
<<
std
::
endl
;
double
total_flop
=
static_cast
<
double
>
(
2
)
*
N
*
C
*
Ho
*
Wo
*
K
*
Y
*
X
;
std
::
cout
<<
"fastest: "
<<
fastest_kernel_name
;
std
::
cout
<<
", total_gflop:"
<<
((
double
)
total_flop
/
1.0e9
)
<<
", time(ms):"
<<
fastest_kernel_time
<<
", Gflops:"
<<
fastest_kernel_gflops
<<
std
::
endl
;
}
return
0
;
// if(success)
// {
// std::cout << "test conv2d fwd cpu : Pass" << std::endl;
// return 0;
// }
// else
// {
// std::cout << "test conv2d fwd cpu: Fail " << std::endl;
// return -1;
// }
};
if
(
data_type
==
0
)
...
...
example/cpu_02_conv2d_fwd_bias_relu_add/cpu_conv2d_fwd_bias_relu_add.cpp
View file @
8d0e00a0
...
...
@@ -780,8 +780,11 @@ int main(int argc, char* argv[])
if
(
fastest_kernel_time
!=
std
::
numeric_limits
<
double
>::
max
())
{
std
::
cout
<<
" fastest:"
<<
fastest_kernel_name
<<
", time:"
<<
fastest_kernel_time
<<
"ms, Gflops:"
<<
fastest_kernel_gflops
<<
std
::
endl
;
double
total_flop
=
static_cast
<
double
>
(
2
)
*
N
*
C
*
Ho
*
Wo
*
K
*
Y
*
X
;
std
::
cout
<<
"fastest: "
<<
fastest_kernel_name
;
std
::
cout
<<
", total_gflop:"
<<
((
double
)
total_flop
/
1.0e9
)
<<
", time(ms):"
<<
fastest_kernel_time
<<
", Gflops:"
<<
fastest_kernel_gflops
<<
std
::
endl
;
}
return
0
;
// if(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