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
d2c77acc
Commit
d2c77acc
authored
Jan 30, 2026
by
wenjh
Browse files
Fix out-of-bounds issues for types struct in common/common.h
Signed-off-by:
wenjh
<
wenjh@sugon.com
>
parent
284d3f6f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
transformer_engine/common/common.h
transformer_engine/common/common.h
+3
-1
No files found.
transformer_engine/common/common.h
View file @
d2c77acc
...
...
@@ -457,7 +457,9 @@ struct TypeInfo {
struct
Helper
{
constexpr
static
DType
getType
()
{
constexpr
int
i
=
static_cast
<
int
>
(
current
);
if
(
std
::
is_same
<
U
,
typename
std
::
tuple_element
<
i
,
types
>::
type
>::
value
)
{
if
constexpr
(
i
>=
std
::
tuple_size_v
<
types
>
)
{
return
DType
::
kNumTypes
;
}
else
if
(
std
::
is_same
<
U
,
typename
std
::
tuple_element
<
i
,
types
>::
type
>::
value
)
{
return
current
;
}
else
{
return
Helper
<
U
,
static_cast
<
DType
>
(
i
+
1
)
>::
getType
();
...
...
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