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
Commits
9c3ce77c
"packaging/windows/vscode:/vscode.git/clone" did not exist on "abc1506332614ee44ac8fad15d5edfb3d91c182c"
Unverified
Commit
9c3ce77c
authored
Oct 30, 2023
by
Po Yen Chen
Committed by
GitHub
Oct 30, 2023
Browse files
Shrink init value range for FA examples (#23)
parent
95889861
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
18 deletions
+18
-18
example/91_tile_program/batched_gemm_softmax_gemm.cpp
example/91_tile_program/batched_gemm_softmax_gemm.cpp
+6
-6
example/91_tile_program/fmha_fwd.cpp
example/91_tile_program/fmha_fwd.cpp
+6
-6
example/91_tile_program/gemm_softmax_gemm.cpp
example/91_tile_program/gemm_softmax_gemm.cpp
+6
-6
No files found.
example/91_tile_program/batched_gemm_softmax_gemm.cpp
View file @
9c3ce77c
...
@@ -71,13 +71,13 @@ int main(int argc, char* argv[])
...
@@ -71,13 +71,13 @@ int main(int argc, char* argv[])
Tensor
<
ODataType
>
o_host_dev
(
o_lengths
,
o_strides
);
Tensor
<
ODataType
>
o_host_dev
(
o_lengths
,
o_strides
);
#if 0
#if 0
ck::utils::FillUniformDistributionIntegerValue<QDataType>{-
3
.f,
3
.f}(q_host);
ck::utils::FillUniformDistributionIntegerValue<QDataType>{-
2
.f,
2
.f}(q_host);
ck::utils::FillUniformDistributionIntegerValue<KDataType>{-
3
.f,
3
.f}(k_host);
ck::utils::FillUniformDistributionIntegerValue<KDataType>{-
2
.f,
2
.f}(k_host);
ck::utils::FillUniformDistributionIntegerValue<VDataType>{-
3
.f,
3
.f}(v_host);
ck::utils::FillUniformDistributionIntegerValue<VDataType>{-
2
.f,
2
.f}(v_host);
#else
#else
ck
::
utils
::
FillUniformDistribution
<
QDataType
>
{
-
3
.
f
,
3
.
f
}(
q_host
);
ck
::
utils
::
FillUniformDistribution
<
QDataType
>
{
-
2
.
f
,
2
.
f
}(
q_host
);
ck
::
utils
::
FillUniformDistribution
<
KDataType
>
{
-
3
.
f
,
3
.
f
}(
k_host
);
ck
::
utils
::
FillUniformDistribution
<
KDataType
>
{
-
2
.
f
,
2
.
f
}(
k_host
);
ck
::
utils
::
FillUniformDistribution
<
VDataType
>
{
-
3
.
f
,
3
.
f
}(
v_host
);
ck
::
utils
::
FillUniformDistribution
<
VDataType
>
{
-
2
.
f
,
2
.
f
}(
v_host
);
#endif
#endif
// reference
// reference
...
...
example/91_tile_program/fmha_fwd.cpp
View file @
9c3ce77c
...
@@ -109,13 +109,13 @@ int main(int argc, char* argv[])
...
@@ -109,13 +109,13 @@ int main(int argc, char* argv[])
Tensor
<
ODataType
>
o_host
(
get_lengths
(
o_perm
,
batch
,
nhead
,
seqlen_q
,
hdim_v
));
Tensor
<
ODataType
>
o_host
(
get_lengths
(
o_perm
,
batch
,
nhead
,
seqlen_q
,
hdim_v
));
#if 0
#if 0
ck::utils::FillUniformDistributionIntegerValue<QDataType>{-
3
.f,
3
.f}(q_host);
ck::utils::FillUniformDistributionIntegerValue<QDataType>{-
2
.f,
2
.f}(q_host);
ck::utils::FillUniformDistributionIntegerValue<KDataType>{-
3
.f,
3
.f}(k_host);
ck::utils::FillUniformDistributionIntegerValue<KDataType>{-
2
.f,
2
.f}(k_host);
ck::utils::FillUniformDistributionIntegerValue<VDataType>{-
3
.f,
3
.f}(v_host);
ck::utils::FillUniformDistributionIntegerValue<VDataType>{-
2
.f,
2
.f}(v_host);
#else
#else
ck
::
utils
::
FillUniformDistribution
<
QDataType
>
{
-
3
.
f
,
3
.
f
}(
q_host
);
ck
::
utils
::
FillUniformDistribution
<
QDataType
>
{
-
2
.
f
,
2
.
f
}(
q_host
);
ck
::
utils
::
FillUniformDistribution
<
KDataType
>
{
-
3
.
f
,
3
.
f
}(
k_host
);
ck
::
utils
::
FillUniformDistribution
<
KDataType
>
{
-
2
.
f
,
2
.
f
}(
k_host
);
ck
::
utils
::
FillUniformDistribution
<
VDataType
>
{
-
3
.
f
,
3
.
f
}(
v_host
);
ck
::
utils
::
FillUniformDistribution
<
VDataType
>
{
-
2
.
f
,
2
.
f
}(
v_host
);
#endif
#endif
DeviceMem
q_buf
(
sizeof
(
QDataType
)
*
q_host
.
GetElementSpaceSize
());
DeviceMem
q_buf
(
sizeof
(
QDataType
)
*
q_host
.
GetElementSpaceSize
());
...
...
example/91_tile_program/gemm_softmax_gemm.cpp
View file @
9c3ce77c
...
@@ -69,13 +69,13 @@ int main(int argc, char* argv[])
...
@@ -69,13 +69,13 @@ int main(int argc, char* argv[])
Tensor
<
ODataType
>
o_host_dev
(
o_lengths
,
o_strides
);
Tensor
<
ODataType
>
o_host_dev
(
o_lengths
,
o_strides
);
#if 0
#if 0
ck::utils::FillUniformDistributionIntegerValue<QDataType>{-
3
.f,
3
.f}(q_host);
ck::utils::FillUniformDistributionIntegerValue<QDataType>{-
2
.f,
2
.f}(q_host);
ck::utils::FillUniformDistributionIntegerValue<KDataType>{-
3
.f,
3
.f}(k_host);
ck::utils::FillUniformDistributionIntegerValue<KDataType>{-
2
.f,
2
.f}(k_host);
ck::utils::FillUniformDistributionIntegerValue<VDataType>{-
3
.f,
3
.f}(v_host);
ck::utils::FillUniformDistributionIntegerValue<VDataType>{-
2
.f,
2
.f}(v_host);
#else
#else
ck
::
utils
::
FillUniformDistribution
<
QDataType
>
{
-
3
.
f
,
3
.
f
}(
q_host
);
ck
::
utils
::
FillUniformDistribution
<
QDataType
>
{
-
2
.
f
,
2
.
f
}(
q_host
);
ck
::
utils
::
FillUniformDistribution
<
KDataType
>
{
-
3
.
f
,
3
.
f
}(
k_host
);
ck
::
utils
::
FillUniformDistribution
<
KDataType
>
{
-
2
.
f
,
2
.
f
}(
k_host
);
ck
::
utils
::
FillUniformDistribution
<
VDataType
>
{
-
3
.
f
,
3
.
f
}(
v_host
);
ck
::
utils
::
FillUniformDistribution
<
VDataType
>
{
-
2
.
f
,
2
.
f
}(
v_host
);
#endif
#endif
// reference
// reference
...
...
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