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
MIGraphX
Commits
9f50051e
Commit
9f50051e
authored
Nov 18, 2023
by
Umang Yadav
Browse files
fixes
parent
e2b0c406
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
8 deletions
+4
-8
src/targets/cpu/dnnl.cpp
src/targets/cpu/dnnl.cpp
+1
-1
test/verify/test_literal_limits.cpp
test/verify/test_literal_limits.cpp
+3
-7
No files found.
src/targets/cpu/dnnl.cpp
View file @
9f50051e
...
@@ -68,7 +68,7 @@ dnnl::memory::data_type to_dnnl_memory_data_type(shape::type_t t)
...
@@ -68,7 +68,7 @@ dnnl::memory::data_type to_dnnl_memory_data_type(shape::type_t t)
case
st
::
int32_type
:
return
dt
::
s32
;
case
st
::
int32_type
:
return
dt
::
s32
;
case
st
::
int8_type
:
return
dt
::
s8
;
case
st
::
int8_type
:
return
dt
::
s8
;
case
st
::
uint8_type
:
return
dt
::
u8
;
case
st
::
uint8_type
:
return
dt
::
u8
;
case
st
::
fp8e4m3fnuz_type
:
return
dt
:
u8
;
case
st
::
fp8e4m3fnuz_type
:
return
dt
::
u8
;
default:
MIGRAPHX_THROW
(
"Unsupported data type"
);
default:
MIGRAPHX_THROW
(
"Unsupported data type"
);
}
}
}
}
...
...
test/verify/test_literal_limits.cpp
View file @
9f50051e
...
@@ -36,15 +36,11 @@ struct test_literal_limits : verify_program<test_literal_limits<Q, T>>
...
@@ -36,15 +36,11 @@ struct test_literal_limits : verify_program<test_literal_limits<Q, T>>
migraphx
::
program
p
;
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
auto
*
mm
=
p
.
get_main_module
();
auto
input_s
=
migraphx
::
shape
(
Q
,
{
3
,
1
});
auto
input_s
=
migraphx
::
shape
(
Q
,
{
3
,
1
});
auto
infinity_val
=
std
::
numeric_limits
<
T
>::
max
()
;
T
infinity_val
{
0
}
;
if
constexpr
(
std
::
numeric_limits
<
T
>::
has_infinity
and
std
::
is_floating_point
<
T
>
{})
if
constexpr
(
std
::
numeric_limits
<
T
>::
has_infinity
and
std
::
is_floating_point
<
T
>
{})
{
{
infinity_val
=
std
::
numeric_limits
<
T
>::
infinity
();
infinity_val
=
std
::
numeric_limits
<
T
>::
infinity
();
}
}
else
{
// for the interger vals, infinity doesn't exist
infinity_val
=
0
;
}
std
::
vector
<
T
>
s_data
{
std
::
vector
<
T
>
s_data
{
infinity_val
,
static_cast
<
T
>
(
-
infinity_val
),
std
::
numeric_limits
<
T
>::
quiet_NaN
()};
infinity_val
,
static_cast
<
T
>
(
-
infinity_val
),
std
::
numeric_limits
<
T
>::
quiet_NaN
()};
...
...
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