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
6c39e6af
Commit
6c39e6af
authored
Feb 04, 2025
by
Andriy Roshchenko
Browse files
Add tensor generator specialization for scales
parent
a24c1b01
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
include/ck/library/utility/host_tensor_generator.hpp
include/ck/library/utility/host_tensor_generator.hpp
+15
-0
No files found.
include/ck/library/utility/host_tensor_generator.hpp
View file @
6c39e6af
...
@@ -359,6 +359,21 @@ struct GeneratorTensor_Sequential
...
@@ -359,6 +359,21 @@ struct GeneratorTensor_Sequential
}
}
};
};
template
<
ck
::
index_t
Dim
>
struct
GeneratorTensor_Sequential
<
ck
::
e8m0_bexp_t
,
Dim
>
{
int
offset
=
0
;
template
<
typename
...
Ts
>
ck
::
e8m0_bexp_t
operator
()(
Ts
...
Xs
)
const
{
std
::
array
<
ck
::
index_t
,
sizeof
...(
Ts
)
>
dims
=
{{
static_cast
<
ck
::
index_t
>
(
Xs
)...}};
int
tmp
=
dims
[
Dim
];
return
ck
::
type_convert
<
ck
::
e8m0_bexp_t
>
(
powf
(
2
,
tmp
+
offset
));
}
};
template
<
typename
T
,
size_t
NumEffectiveDim
=
2
>
template
<
typename
T
,
size_t
NumEffectiveDim
=
2
>
struct
GeneratorTensor_Diagonal
struct
GeneratorTensor_Diagonal
{
{
...
...
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