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
ca7015c4
Commit
ca7015c4
authored
Mar 15, 2023
by
rocking
Browse files
Refine num_bytes
parent
2267283c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
12 deletions
+13
-12
client_example/09_quantization/conv2d_fwd_bias_relu_perchannel_quantization.cpp
...tization/conv2d_fwd_bias_relu_perchannel_quantization.cpp
+5
-4
client_example/09_quantization/conv2d_fwd_bias_relu_perlayer_quantization.cpp
...antization/conv2d_fwd_bias_relu_perlayer_quantization.cpp
+4
-4
client_example/09_quantization/conv2d_fwd_perchannel_quantization.cpp
...le/09_quantization/conv2d_fwd_perchannel_quantization.cpp
+4
-4
No files found.
client_example/09_quantization/conv2d_fwd_bias_relu_perchannel_quantization.cpp
View file @
ca7015c4
...
@@ -135,10 +135,11 @@ int main(int argc, char* argv[])
...
@@ -135,10 +135,11 @@ int main(int argc, char* argv[])
{
{
float
avg_time
=
invoker_ptr
->
Run
(
argument_ptr
.
get
(),
StreamConfig
{
nullptr
,
true
});
float
avg_time
=
invoker_ptr
->
Run
(
argument_ptr
.
get
(),
StreamConfig
{
nullptr
,
true
});
std
::
size_t
flop
=
G
*
2
*
N
*
K
*
C
*
Ho
*
Wo
*
Y
*
X
;
std
::
size_t
flop
=
G
*
2
*
N
*
K
*
C
*
Ho
*
Wo
*
Y
*
X
;
std
::
size_t
num_bytes
=
G
*
sizeof
(
InDataType
)
*
N
*
Hi
*
Wi
*
C
+
std
::
size_t
num_bytes
=
G
*
sizeof
(
WeiDataType
)
*
K
*
Y
*
X
*
C
+
G
*
sizeof
(
InDataType
)
*
N
*
Hi
*
Wi
*
C
+
G
*
sizeof
(
WeiDataType
)
*
K
*
Y
*
X
*
C
+
G
*
sizeof
(
OutDataType
)
*
N
*
Ho
*
Wo
*
K
;
G
*
sizeof
(
BiasDataType
)
*
K
+
G
*
sizeof
(
RequantScaleDataType
)
*
K
+
G
*
sizeof
(
OutDataType
)
*
N
*
Ho
*
Wo
*
K
;
float
tflops
=
static_cast
<
float
>
(
flop
)
/
1.E9
/
avg_time
;
float
tflops
=
static_cast
<
float
>
(
flop
)
/
1.E9
/
avg_time
;
float
gb_per_sec
=
num_bytes
/
1.E6
/
avg_time
;
float
gb_per_sec
=
num_bytes
/
1.E6
/
avg_time
;
...
...
client_example/09_quantization/conv2d_fwd_bias_relu_perlayer_quantization.cpp
View file @
ca7015c4
...
@@ -130,10 +130,10 @@ int main(int argc, char* argv[])
...
@@ -130,10 +130,10 @@ int main(int argc, char* argv[])
{
{
float
avg_time
=
invoker_ptr
->
Run
(
argument_ptr
.
get
(),
StreamConfig
{
nullptr
,
true
});
float
avg_time
=
invoker_ptr
->
Run
(
argument_ptr
.
get
(),
StreamConfig
{
nullptr
,
true
});
std
::
size_t
flop
=
G
*
2
*
N
*
K
*
C
*
Ho
*
Wo
*
Y
*
X
;
std
::
size_t
flop
=
G
*
2
*
N
*
K
*
C
*
Ho
*
Wo
*
Y
*
X
;
std
::
size_t
num_bytes
=
G
*
sizeof
(
InDataType
)
*
N
*
Hi
*
Wi
*
C
+
std
::
size_t
num_bytes
=
G
*
sizeof
(
WeiDataType
)
*
K
*
Y
*
X
*
C
+
G
*
sizeof
(
InDataType
)
*
N
*
Hi
*
Wi
*
C
+
G
*
sizeof
(
WeiDataType
)
*
K
*
Y
*
X
*
C
+
G
*
sizeof
(
OutDataType
)
*
N
*
Ho
*
Wo
*
K
;
G
*
sizeof
(
BiasDataType
)
*
K
+
G
*
sizeof
(
OutDataType
)
*
N
*
Ho
*
Wo
*
K
;
float
tflops
=
static_cast
<
float
>
(
flop
)
/
1.E9
/
avg_time
;
float
tflops
=
static_cast
<
float
>
(
flop
)
/
1.E9
/
avg_time
;
float
gb_per_sec
=
num_bytes
/
1.E6
/
avg_time
;
float
gb_per_sec
=
num_bytes
/
1.E6
/
avg_time
;
...
...
client_example/09_quantization/conv2d_fwd_perchannel_quantization.cpp
View file @
ca7015c4
...
@@ -130,10 +130,10 @@ int main(int argc, char* argv[])
...
@@ -130,10 +130,10 @@ int main(int argc, char* argv[])
{
{
float
avg_time
=
invoker_ptr
->
Run
(
argument_ptr
.
get
(),
StreamConfig
{
nullptr
,
true
});
float
avg_time
=
invoker_ptr
->
Run
(
argument_ptr
.
get
(),
StreamConfig
{
nullptr
,
true
});
std
::
size_t
flop
=
G
*
2
*
N
*
K
*
C
*
Ho
*
Wo
*
Y
*
X
;
std
::
size_t
flop
=
G
*
2
*
N
*
K
*
C
*
Ho
*
Wo
*
Y
*
X
;
std
::
size_t
num_bytes
=
G
*
sizeof
(
InDataType
)
*
N
*
Hi
*
Wi
*
C
+
std
::
size_t
num_bytes
=
G
*
sizeof
(
WeiDataType
)
*
K
*
Y
*
X
*
C
+
G
*
sizeof
(
InDataType
)
*
N
*
Hi
*
Wi
*
C
+
G
*
sizeof
(
WeiDataType
)
*
K
*
Y
*
X
*
C
+
G
*
sizeof
(
OutDataType
)
*
N
*
Ho
*
Wo
*
K
;
G
*
sizeof
(
RequantScaleDataType
)
*
K
+
G
*
sizeof
(
OutDataType
)
*
N
*
Ho
*
Wo
*
K
;
float
tflops
=
static_cast
<
float
>
(
flop
)
/
1.E9
/
avg_time
;
float
tflops
=
static_cast
<
float
>
(
flop
)
/
1.E9
/
avg_time
;
float
gb_per_sec
=
num_bytes
/
1.E6
/
avg_time
;
float
gb_per_sec
=
num_bytes
/
1.E6
/
avg_time
;
...
...
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