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
OpenDAS
TransformerEngine
Commits
ac5e868f
Unverified
Commit
ac5e868f
authored
Oct 07, 2025
by
vcherepanov-nv
Committed by
GitHub
Oct 07, 2025
Browse files
Skip fp8 tests on unsupported devices (#2243)
Signed-off-by:
Vladimir Cherepanov
<
vcherepanov@nvidia.com
>
parent
76bced54
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
tests/cpp_distributed/test_comm_gemm.cu
tests/cpp_distributed/test_comm_gemm.cu
+31
-0
No files found.
tests/cpp_distributed/test_comm_gemm.cu
View file @
ac5e868f
...
@@ -69,6 +69,34 @@ bool IsMulticastSupported(int device_id) {
...
@@ -69,6 +69,34 @@ bool IsMulticastSupported(int device_id) {
return
supported
;
return
supported
;
}
}
int
GetDeviceComputeCapability
(
int
device_id
)
{
int
major
{};
int
minor
{};
CHECK_CU
(
cuDeviceGetAttribute
(
&
major
,
CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR
,
device_id
));
CHECK_CU
(
cuDeviceGetAttribute
(
&
minor
,
CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR
,
device_id
));
return
major
*
10
+
minor
;
}
template
<
typename
T
>
bool
IsDTypeSupported
(
int
/* device_id */
)
{
return
true
;
}
template
<
>
bool
IsDTypeSupported
<
test
::
fp8e5m2
>
(
int
device_id
)
{
return
GetDeviceComputeCapability
(
device_id
)
>=
89
;
}
template
<
>
bool
IsDTypeSupported
<
test
::
fp8e4m3
>
(
int
device_id
)
{
return
GetDeviceComputeCapability
(
device_id
)
>=
89
;
}
template
<
typename
...
Ts
>
bool
AllDTypesSupported
(
int
device_id
)
{
return
(
IsDTypeSupported
<
Ts
>
(
device_id
)
&&
...);
}
template
<
typename
T
>
template
<
typename
T
>
std
::
vector
<
T
>
CopyMatrix
(
const
std
::
vector
<
T
>&
data
,
size_t
mstart
,
size_t
nstart
,
size_t
msize
,
std
::
vector
<
T
>
CopyMatrix
(
const
std
::
vector
<
T
>&
data
,
size_t
mstart
,
size_t
nstart
,
size_t
msize
,
size_t
nsize
,
size_t
ld
)
{
size_t
nsize
,
size_t
ld
)
{
...
@@ -161,6 +189,9 @@ class CommGemmFixure : public ::testing::TestWithParam<Params> {
...
@@ -161,6 +189,9 @@ class CommGemmFixure : public ::testing::TestWithParam<Params> {
template
<
typename
AType
,
typename
BType
,
typename
DType
,
typename
BiasType
>
template
<
typename
AType
,
typename
BType
,
typename
DType
,
typename
BiasType
>
void
Run
(
bool
transa
,
bool
transb
,
size_t
m
,
size_t
n
,
size_t
k
,
float
tol
)
{
void
Run
(
bool
transa
,
bool
transb
,
size_t
m
,
size_t
n
,
size_t
k
,
float
tol
)
{
if
(
!
AllDTypesSupported
<
AType
,
BType
,
DType
,
BiasType
>
(
rank_
))
GTEST_SKIP
()
<<
"FP8 is not supported on device "
<<
rank_
;
cudaStream_t
stream
{};
cudaStream_t
stream
{};
NVTE_CHECK_CUDA
(
cudaStreamCreate
(
&
stream
));
NVTE_CHECK_CUDA
(
cudaStreamCreate
(
&
stream
));
...
...
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