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
5125f400
"...pyexps/git@developer.sourcefind.cn:cnjsdfcy/simbricks.git" did not exist on "aaa18272680b6335db6f93fdd38c6e61c28e46ff"
Commit
5125f400
authored
Oct 31, 2024
by
Andriy Roshchenko
Browse files
Can build `tests` target on gfx950.
parent
a8b9caf1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
20 deletions
+27
-20
include/ck/utility/amd_ck_fp8.hpp
include/ck/utility/amd_ck_fp8.hpp
+1
-0
include/ck/utility/data_type.hpp
include/ck/utility/data_type.hpp
+26
-20
No files found.
include/ck/utility/amd_ck_fp8.hpp
View file @
5125f400
...
@@ -485,6 +485,7 @@ struct non_native_vector_base<bf8_ocp_t, 1>
...
@@ -485,6 +485,7 @@ struct non_native_vector_base<bf8_ocp_t, 1>
__host__
__device__
operator
data_v
()
const
{
return
d
;
}
__host__
__device__
operator
data_v
()
const
{
return
d
;
}
__host__
__device__
operator
data_t
()
const
{
return
d
[
0
];
}
__host__
__device__
operator
data_t
()
const
{
return
d
[
0
];
}
__host__
__device__
operator
bf8_ocp_t
()
const
{
return
bf8_ocp_t
{
d
[
0
]};
}
};
};
namespace
fp8_impl
{
namespace
fp8_impl
{
...
...
include/ck/utility/data_type.hpp
View file @
5125f400
...
@@ -1173,9 +1173,10 @@ struct vector_type<T, 2, typename std::enable_if_t<!is_native_type<T>()>>
...
@@ -1173,9 +1173,10 @@ struct vector_type<T, 2, typename std::enable_if_t<!is_native_type<T>()>>
template
<
typename
T
>
template
<
typename
T
>
struct
vector_type
<
T
,
4
,
typename
std
::
enable_if_t
<!
is_native_type
<
T
>
()
>>
struct
vector_type
<
T
,
4
,
typename
std
::
enable_if_t
<!
is_native_type
<
T
>
()
>>
{
{
using
d1_t
=
T
;
using
d1_t
=
T
;
using
d2_t
=
non_native_vector_base
<
T
,
2
>
;
using
d1_nnv_t
=
non_native_vector_base
<
T
,
1
>
;
using
d4_t
=
non_native_vector_base
<
T
,
4
>
;
using
d2_t
=
non_native_vector_base
<
T
,
2
>
;
using
d4_t
=
non_native_vector_base
<
T
,
4
>
;
using
type
=
d4_t
;
using
type
=
d4_t
;
...
@@ -1183,6 +1184,7 @@ struct vector_type<T, 4, typename std::enable_if_t<!is_native_type<T>()>>
...
@@ -1183,6 +1184,7 @@ struct vector_type<T, 4, typename std::enable_if_t<!is_native_type<T>()>>
{
{
d4_t
d4_
;
d4_t
d4_
;
StaticallyIndexedArray
<
d1_t
,
4
>
d1x4_
;
StaticallyIndexedArray
<
d1_t
,
4
>
d1x4_
;
StaticallyIndexedArray
<
d1_nnv_t
,
4
>
d1nnvx4_
;
StaticallyIndexedArray
<
d2_t
,
2
>
d2x2_
;
StaticallyIndexedArray
<
d2_t
,
2
>
d2x2_
;
StaticallyIndexedArray
<
d4_t
,
1
>
d4x1_
;
StaticallyIndexedArray
<
d4_t
,
1
>
d4x1_
;
}
data_
;
}
data_
;
...
@@ -1194,10 +1196,11 @@ struct vector_type<T, 4, typename std::enable_if_t<!is_native_type<T>()>>
...
@@ -1194,10 +1196,11 @@ struct vector_type<T, 4, typename std::enable_if_t<!is_native_type<T>()>>
template
<
typename
X
>
template
<
typename
X
>
__host__
__device__
constexpr
const
auto
&
AsType
()
const
__host__
__device__
constexpr
const
auto
&
AsType
()
const
{
{
static_assert
(
is_same
<
X
,
d1_t
>::
value
||
is_same
<
X
,
d2_t
>::
value
||
is_same
<
X
,
d4_t
>::
value
,
static_assert
(
is_same
<
X
,
d1_t
>::
value
||
is_same
<
X
,
d1_nnv_t
>::
value
||
is_same
<
X
,
d2_t
>::
value
||
is_same
<
X
,
d4_t
>::
value
,
"Something went wrong, please check src and dst types."
);
"Something went wrong, please check src and dst types."
);
if
constexpr
(
is_same
<
X
,
d1_t
>::
value
)
if
constexpr
(
is_same
<
X
,
d1_t
>::
value
||
is_same
<
X
,
d1_nnv_t
>::
value
)
{
{
return
data_
.
d1x4_
;
return
data_
.
d1x4_
;
}
}
...
@@ -1218,10 +1221,11 @@ struct vector_type<T, 4, typename std::enable_if_t<!is_native_type<T>()>>
...
@@ -1218,10 +1221,11 @@ struct vector_type<T, 4, typename std::enable_if_t<!is_native_type<T>()>>
template
<
typename
X
>
template
<
typename
X
>
__host__
__device__
constexpr
auto
&
AsType
()
__host__
__device__
constexpr
auto
&
AsType
()
{
{
static_assert
(
is_same
<
X
,
d1_t
>::
value
||
is_same
<
X
,
d2_t
>::
value
||
is_same
<
X
,
d4_t
>::
value
,
static_assert
(
is_same
<
X
,
d1_t
>::
value
||
is_same
<
X
,
d1_nnv_t
>::
value
||
is_same
<
X
,
d2_t
>::
value
||
is_same
<
X
,
d4_t
>::
value
,
"Something went wrong, please check src and dst types."
);
"Something went wrong, please check src and dst types."
);
if
constexpr
(
is_same
<
X
,
d1_t
>::
value
)
if
constexpr
(
is_same
<
X
,
d1_t
>::
value
||
is_same
<
X
,
d1_nnv_t
>::
value
)
{
{
return
data_
.
d1x4_
;
return
data_
.
d1x4_
;
}
}
...
@@ -1329,11 +1333,12 @@ struct vector_type<T, 8, typename std::enable_if_t<!is_native_type<T>()>>
...
@@ -1329,11 +1333,12 @@ struct vector_type<T, 8, typename std::enable_if_t<!is_native_type<T>()>>
template
<
typename
T
>
template
<
typename
T
>
struct
vector_type
<
T
,
16
,
typename
std
::
enable_if_t
<!
is_native_type
<
T
>
()
>>
struct
vector_type
<
T
,
16
,
typename
std
::
enable_if_t
<!
is_native_type
<
T
>
()
>>
{
{
using
d1_t
=
T
;
using
d1_t
=
T
;
using
d2_t
=
non_native_vector_base
<
T
,
2
>
;
using
d1_nnv_t
=
non_native_vector_base
<
T
,
1
>
;
using
d4_t
=
non_native_vector_base
<
T
,
4
>
;
using
d2_t
=
non_native_vector_base
<
T
,
2
>
;
using
d8_t
=
non_native_vector_base
<
T
,
8
>
;
using
d4_t
=
non_native_vector_base
<
T
,
4
>
;
using
d16_t
=
non_native_vector_base
<
T
,
16
>
;
using
d8_t
=
non_native_vector_base
<
T
,
8
>
;
using
d16_t
=
non_native_vector_base
<
T
,
16
>
;
using
type
=
d16_t
;
using
type
=
d16_t
;
...
@@ -1341,6 +1346,7 @@ struct vector_type<T, 16, typename std::enable_if_t<!is_native_type<T>()>>
...
@@ -1341,6 +1346,7 @@ struct vector_type<T, 16, typename std::enable_if_t<!is_native_type<T>()>>
{
{
d16_t
d16_
;
d16_t
d16_
;
StaticallyIndexedArray
<
d1_t
,
16
>
d1x16_
;
StaticallyIndexedArray
<
d1_t
,
16
>
d1x16_
;
StaticallyIndexedArray
<
d1_nnv_t
,
16
>
d1nnvx16_
;
StaticallyIndexedArray
<
d2_t
,
8
>
d2x8_
;
StaticallyIndexedArray
<
d2_t
,
8
>
d2x8_
;
StaticallyIndexedArray
<
d4_t
,
4
>
d4x4_
;
StaticallyIndexedArray
<
d4_t
,
4
>
d4x4_
;
StaticallyIndexedArray
<
d8_t
,
2
>
d8x2_
;
StaticallyIndexedArray
<
d8_t
,
2
>
d8x2_
;
...
@@ -1354,12 +1360,12 @@ struct vector_type<T, 16, typename std::enable_if_t<!is_native_type<T>()>>
...
@@ -1354,12 +1360,12 @@ struct vector_type<T, 16, typename std::enable_if_t<!is_native_type<T>()>>
template
<
typename
X
>
template
<
typename
X
>
__host__
__device__
constexpr
const
auto
&
AsType
()
const
__host__
__device__
constexpr
const
auto
&
AsType
()
const
{
{
static_assert
(
is_same
<
X
,
d1_t
>::
value
||
is_same
<
X
,
d
2
_t
>::
value
||
static_assert
(
is_same
<
X
,
d1_t
>::
value
||
is_same
<
X
,
d
1_nnv
_t
>::
value
||
is_same
<
X
,
d
4
_t
>::
value
||
is_same
<
X
,
d
8
_t
>::
value
||
is_same
<
X
,
d
2
_t
>::
value
||
is_same
<
X
,
d
4
_t
>::
value
||
is_same
<
X
,
d16_t
>::
value
,
is_same
<
X
,
d8_t
>::
value
||
is_same
<
X
,
d16_t
>::
value
,
"Something went wrong, please check src and dst types."
);
"Something went wrong, please check src and dst types."
);
if
constexpr
(
is_same
<
X
,
d1_t
>::
value
)
if
constexpr
(
is_same
<
X
,
d1_t
>::
value
||
is_same
<
X
,
d1_nnv_t
>::
value
)
{
{
return
data_
.
d1x16_
;
return
data_
.
d1x16_
;
}
}
...
@@ -1388,12 +1394,12 @@ struct vector_type<T, 16, typename std::enable_if_t<!is_native_type<T>()>>
...
@@ -1388,12 +1394,12 @@ struct vector_type<T, 16, typename std::enable_if_t<!is_native_type<T>()>>
template
<
typename
X
>
template
<
typename
X
>
__host__
__device__
constexpr
auto
&
AsType
()
__host__
__device__
constexpr
auto
&
AsType
()
{
{
static_assert
(
is_same
<
X
,
d1_t
>::
value
||
is_same
<
X
,
d
2
_t
>::
value
||
static_assert
(
is_same
<
X
,
d1_t
>::
value
||
is_same
<
X
,
d
1_nnv
_t
>::
value
||
is_same
<
X
,
d
4
_t
>::
value
||
is_same
<
X
,
d
8
_t
>::
value
||
is_same
<
X
,
d
2
_t
>::
value
||
is_same
<
X
,
d
4
_t
>::
value
||
is_same
<
X
,
d16_t
>::
value
,
is_same
<
X
,
d8_t
>::
value
||
is_same
<
X
,
d16_t
>::
value
,
"Something went wrong, please check src and dst types."
);
"Something went wrong, please check src and dst types."
);
if
constexpr
(
is_same
<
X
,
d1_t
>::
value
)
if
constexpr
(
is_same
<
X
,
d1_t
>::
value
||
is_same
<
X
,
d1_nnv_t
>::
value
)
{
{
return
data_
.
d1x16_
;
return
data_
.
d1x16_
;
}
}
...
...
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