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_ROCM
Commits
96023bdb
Commit
96023bdb
authored
Aug 26, 2024
by
Rostyslav Geyyer
Browse files
Add a test failing on gfx10/11/12
parent
25935b57
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
+35
-0
test/data_type/CMakeLists.txt
test/data_type/CMakeLists.txt
+4
-0
test/data_type/failing_test.cpp
test/data_type/failing_test.cpp
+31
-0
No files found.
test/data_type/CMakeLists.txt
View file @
96023bdb
...
@@ -23,5 +23,9 @@ add_gtest_executable(test_bf8 test_bf8.cpp)
...
@@ -23,5 +23,9 @@ add_gtest_executable(test_bf8 test_bf8.cpp)
if
(
result EQUAL 0
)
if
(
result EQUAL 0
)
target_link_libraries
(
test_bf8 PRIVATE utility
)
target_link_libraries
(
test_bf8 PRIVATE utility
)
endif
()
endif
()
add_gtest_executable
(
failing_test failing_test.cpp
)
if
(
result EQUAL 0
)
target_link_libraries
(
failing_test PRIVATE utility
)
endif
()
add_gtest_executable
(
test_type_convert_const type_convert_const.cpp
)
add_gtest_executable
(
test_type_convert_const type_convert_const.cpp
)
test/data_type/failing_test.cpp
0 → 100644
View file @
96023bdb
// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2024, Advanced Micro Devices, Inc. All rights reserved.
#include "gtest/gtest.h"
#include "ck/utility/data_type.hpp"
#include "ck/utility/type_convert.hpp"
using
ck
::
bf8_t
;
using
ck
::
f8_convert_rne
;
using
ck
::
f8_t
;
using
ck
::
type_convert
;
TEST
(
FailingTest
,
FP8
)
{
// fix the tolerance value
float
abs_tol
=
1e-6
;
// convert minimal float to fp8 and back, check if holds
ASSERT_NEAR
(
std
::
numeric_limits
<
float
>::
min
(),
type_convert
<
float
>
(
f8_convert_rne
<
f8_t
>
(
std
::
numeric_limits
<
float
>::
min
())),
abs_tol
);
}
TEST
(
FailingTest
,
BF8
)
{
// fix the tolerance value
float
abs_tol
=
1e-6
;
// convert minimal float to bf8 and back, check if holds
ASSERT_NEAR
(
std
::
numeric_limits
<
float
>::
min
(),
type_convert
<
float
>
(
f8_convert_rne
<
bf8_t
>
(
std
::
numeric_limits
<
float
>::
min
())),
abs_tol
);
}
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