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
c8e91d41
Commit
c8e91d41
authored
Nov 14, 2024
by
letaoqin
Browse files
comments
parent
049cacff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
example/ck_tile/16_fused_moe_general/main.cpp
example/ck_tile/16_fused_moe_general/main.cpp
+8
-8
No files found.
example/ck_tile/16_fused_moe_general/main.cpp
View file @
c8e91d41
...
@@ -207,8 +207,8 @@ bool run(const ck_tile::ArgParser& arg_parser)
...
@@ -207,8 +207,8 @@ bool run(const ck_tile::ArgParser& arg_parser)
{(
max_num_tokens_padded
+
block_m
-
1
)
/
block_m
});
{(
max_num_tokens_padded
+
block_m
-
1
)
/
block_m
});
ck_tile
::
HostTensor
<
IndexDataType
>
num_sorted_tiles_host
({
1
});
ck_tile
::
HostTensor
<
IndexDataType
>
num_sorted_tiles_host
({
1
});
#if
0
#if
1
# if
1
# if
0
ck_tile
::
FillStepRange
<
ADataType
>
{
-
.5
f
,
.5
f
,
0.01
f
}(
a_host
);
ck_tile
::
FillStepRange
<
ADataType
>
{
-
.5
f
,
.5
f
,
0.01
f
}(
a_host
);
ck_tile
::
FillStepRange
<
GDataType
>
{
-
.5
f
,
.5
f
,
0.01
f
}(
g_host
);
ck_tile
::
FillStepRange
<
GDataType
>
{
-
.5
f
,
.5
f
,
0.01
f
}(
g_host
);
ck_tile
::
FillStepRange
<
DDataType
,
false
>
{
.5
f
,
-
.5
f
,
-
0.01
f
}(
d_host
);
ck_tile
::
FillStepRange
<
DDataType
,
false
>
{
.5
f
,
-
.5
f
,
-
0.01
f
}(
d_host
);
...
@@ -225,7 +225,7 @@ bool run(const ck_tile::ArgParser& arg_parser)
...
@@ -225,7 +225,7 @@ bool run(const ck_tile::ArgParser& arg_parser)
ck_tile
::
FillUniformDistribution
<
GScaleDataType
>
{
-
.5
f
,
.5
f
}(
sg_host
);
ck_tile
::
FillUniformDistribution
<
GScaleDataType
>
{
-
.5
f
,
.5
f
}(
sg_host
);
ck_tile
::
FillUniformDistribution
<
DScaleDataType
>
{
-
.5
f
,
.5
f
}(
sd_host
);
ck_tile
::
FillUniformDistribution
<
DScaleDataType
>
{
-
.5
f
,
.5
f
}(
sd_host
);
ck_tile
::
FillUniformDistribution
<
YSmoothScaleDataType
>
{
-
.5
f
,
.5
f
}(
sy_host
);
ck_tile
::
FillUniformDistribution
<
YSmoothScaleDataType
>
{
-
.5
f
,
.5
f
}(
sy_host
);
ck_tile
::
FillUniformDistribution
<
TopkWeightDataType
>
{
-
.5
f
,
.5
f
}(
topk_weight_host
);
ck_tile
::
FillUniformDistribution
<
TopkWeightDataType
>
{
0.0
f
,
1.0
f
}(
topk_weight_host
);
# endif
# endif
// permute weight
// permute weight
...
@@ -333,12 +333,12 @@ bool run(const ck_tile::ArgParser& arg_parser)
...
@@ -333,12 +333,12 @@ bool run(const ck_tile::ArgParser& arg_parser)
experts
,
experts
,
block_m
);
block_m
);
std
::
cout
<<
sorted_token_ids_host
<<
std
::
endl
;
//
std::cout << sorted_token_ids_host << std::endl;
std
::
cout
<<
num_sorted_tiles_host
<<
std
::
endl
;
//
std::cout << num_sorted_tiles_host << std::endl;
std
::
cout
<<
sorted_expert_ids_host
<<
std
::
endl
;
//
std::cout << sorted_expert_ids_host << std::endl;
std
::
cout
<<
topk_weight_host
<<
std
::
endl
;
//
std::cout << topk_weight_host << std::endl;
std
::
cout
<<
sorted_weight_host
<<
std
::
endl
;
//
std::cout << sorted_weight_host << std::endl;
// done, preparing GPU buffer
// done, preparing GPU buffer
ck_tile
::
DeviceMem
a_buf
(
a_host
);
ck_tile
::
DeviceMem
a_buf
(
a_host
);
...
...
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