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
f56cef53
"git@developer.sourcefind.cn:modelzoo/resnet50_tensorflow.git" did not exist on "cc12b7acd48776ea2f183b6379fdc275228d94d2"
Commit
f56cef53
authored
Sep 15, 2022
by
Po-Yen, Chen
Browse files
Use std::cerr to report error
parent
7b6fb72b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
library/include/ck/library/utility/check_err.hpp
library/include/ck/library/utility/check_err.hpp
+10
-10
No files found.
library/include/ck/library/utility/check_err.hpp
View file @
f56cef53
...
@@ -33,7 +33,7 @@ check_err(const std::vector<T>& out,
...
@@ -33,7 +33,7 @@ check_err(const std::vector<T>& out,
{
{
if
(
out
.
size
()
!=
ref
.
size
())
if
(
out
.
size
()
!=
ref
.
size
())
{
{
std
::
c
out
<<
msg
<<
" out.size() != ref.size(), :"
<<
out
.
size
()
<<
" != "
<<
ref
.
size
()
std
::
c
err
<<
msg
<<
" out.size() != ref.size(), :"
<<
out
.
size
()
<<
" != "
<<
ref
.
size
()
<<
std
::
endl
;
<<
std
::
endl
;
return
false
;
return
false
;
}
}
...
@@ -51,7 +51,7 @@ check_err(const std::vector<T>& out,
...
@@ -51,7 +51,7 @@ check_err(const std::vector<T>& out,
err_count
++
;
err_count
++
;
if
(
err_count
<
5
)
if
(
err_count
<
5
)
{
{
std
::
c
out
<<
msg
<<
std
::
setw
(
12
)
<<
std
::
setprecision
(
7
)
<<
" out["
<<
i
std
::
c
err
<<
msg
<<
std
::
setw
(
12
)
<<
std
::
setprecision
(
7
)
<<
" out["
<<
i
<<
"] != ref["
<<
i
<<
"]: "
<<
out
[
i
]
<<
" != "
<<
ref
[
i
]
<<
std
::
endl
;
<<
"] != ref["
<<
i
<<
"]: "
<<
out
[
i
]
<<
" != "
<<
ref
[
i
]
<<
std
::
endl
;
}
}
res
=
false
;
res
=
false
;
...
@@ -59,7 +59,7 @@ check_err(const std::vector<T>& out,
...
@@ -59,7 +59,7 @@ check_err(const std::vector<T>& out,
}
}
if
(
!
res
)
if
(
!
res
)
{
{
std
::
c
out
<<
std
::
setw
(
12
)
<<
std
::
setprecision
(
7
)
<<
"max err: "
<<
max_err
<<
std
::
endl
;
std
::
c
err
<<
std
::
setw
(
12
)
<<
std
::
setprecision
(
7
)
<<
"max err: "
<<
max_err
<<
std
::
endl
;
}
}
return
res
;
return
res
;
}
}
...
@@ -74,7 +74,7 @@ check_err(const std::vector<T>& out,
...
@@ -74,7 +74,7 @@ check_err(const std::vector<T>& out,
{
{
if
(
out
.
size
()
!=
ref
.
size
())
if
(
out
.
size
()
!=
ref
.
size
())
{
{
std
::
c
out
<<
msg
<<
" out.size() != ref.size(), :"
<<
out
.
size
()
<<
" != "
<<
ref
.
size
()
std
::
c
err
<<
msg
<<
" out.size() != ref.size(), :"
<<
out
.
size
()
<<
" != "
<<
ref
.
size
()
<<
std
::
endl
;
<<
std
::
endl
;
return
false
;
return
false
;
}
}
...
@@ -95,7 +95,7 @@ check_err(const std::vector<T>& out,
...
@@ -95,7 +95,7 @@ check_err(const std::vector<T>& out,
err_count
++
;
err_count
++
;
if
(
err_count
<
5
)
if
(
err_count
<
5
)
{
{
std
::
c
out
<<
msg
<<
std
::
setw
(
12
)
<<
std
::
setprecision
(
7
)
<<
" out["
<<
i
std
::
c
err
<<
msg
<<
std
::
setw
(
12
)
<<
std
::
setprecision
(
7
)
<<
" out["
<<
i
<<
"] != ref["
<<
i
<<
"]: "
<<
o
<<
" != "
<<
r
<<
std
::
endl
;
<<
"] != ref["
<<
i
<<
"]: "
<<
o
<<
" != "
<<
r
<<
std
::
endl
;
}
}
res
=
false
;
res
=
false
;
...
@@ -103,7 +103,7 @@ check_err(const std::vector<T>& out,
...
@@ -103,7 +103,7 @@ check_err(const std::vector<T>& out,
}
}
if
(
!
res
)
if
(
!
res
)
{
{
std
::
c
out
<<
std
::
setw
(
12
)
<<
std
::
setprecision
(
7
)
<<
"max err: "
<<
max_err
<<
std
::
endl
;
std
::
c
err
<<
std
::
setw
(
12
)
<<
std
::
setprecision
(
7
)
<<
"max err: "
<<
max_err
<<
std
::
endl
;
}
}
return
res
;
return
res
;
}
}
...
@@ -118,7 +118,7 @@ check_err(span<const T> out,
...
@@ -118,7 +118,7 @@ check_err(span<const T> out,
{
{
if
(
out
.
size
()
!=
ref
.
size
())
if
(
out
.
size
()
!=
ref
.
size
())
{
{
std
::
c
out
<<
msg
<<
" out.size() != ref.size(), :"
<<
out
.
size
()
<<
" != "
<<
ref
.
size
()
std
::
c
err
<<
msg
<<
" out.size() != ref.size(), :"
<<
out
.
size
()
<<
" != "
<<
ref
.
size
()
<<
std
::
endl
;
<<
std
::
endl
;
return
false
;
return
false
;
}
}
...
@@ -138,7 +138,7 @@ check_err(span<const T> out,
...
@@ -138,7 +138,7 @@ check_err(span<const T> out,
err_count
++
;
err_count
++
;
if
(
err_count
<
5
)
if
(
err_count
<
5
)
{
{
std
::
c
out
<<
msg
<<
std
::
setw
(
12
)
<<
std
::
setprecision
(
7
)
<<
" out["
<<
i
std
::
c
err
<<
msg
<<
std
::
setw
(
12
)
<<
std
::
setprecision
(
7
)
<<
" out["
<<
i
<<
"] != ref["
<<
i
<<
"]: "
<<
o
<<
" != "
<<
r
<<
std
::
endl
;
<<
"] != ref["
<<
i
<<
"]: "
<<
o
<<
" != "
<<
r
<<
std
::
endl
;
}
}
res
=
false
;
res
=
false
;
...
@@ -146,7 +146,7 @@ check_err(span<const T> out,
...
@@ -146,7 +146,7 @@ check_err(span<const T> out,
}
}
if
(
!
res
)
if
(
!
res
)
{
{
std
::
c
out
<<
std
::
setw
(
12
)
<<
std
::
setprecision
(
7
)
<<
"max err: "
<<
max_err
<<
std
::
endl
;
std
::
c
err
<<
std
::
setw
(
12
)
<<
std
::
setprecision
(
7
)
<<
"max err: "
<<
max_err
<<
std
::
endl
;
}
}
return
res
;
return
res
;
}
}
...
@@ -206,7 +206,7 @@ check_err(const std::vector<T>& out,
...
@@ -206,7 +206,7 @@ check_err(const std::vector<T>& out,
}
}
if
(
!
res
)
if
(
!
res
)
{
{
std
::
c
out
<<
"max err: "
<<
max_err
<<
std
::
endl
;
std
::
c
err
<<
"max err: "
<<
max_err
<<
std
::
endl
;
}
}
return
res
;
return
res
;
}
}
...
...
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