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
FastMoE
Commits
eb1525ec
Commit
eb1525ec
authored
Dec 18, 2020
by
Jiezhong Qiu
Browse files
updatre
parent
30283570
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
pytorch/cuda/moe_cuda_kernel.cu
pytorch/cuda/moe_cuda_kernel.cu
+8
-8
No files found.
pytorch/cuda/moe_cuda_kernel.cu
View file @
eb1525ec
...
@@ -78,10 +78,10 @@ void moe_cuda_forward_impl(
...
@@ -78,10 +78,10 @@ void moe_cuda_forward_impl(
const
size_t
*
gate
,
const
size_t
*
gate
,
const
scalar_t
*
weight
,
const
scalar_t
*
weight
,
scalar_t
*
output
,
scalar_t
*
output
,
size_t
batch_size
,
const
size_t
batch_size
,
size_t
top_k
,
const
size_t
top_k
,
size_t
in_feat
,
const
size_t
in_feat
,
size_t
out_feat
)
{
const
size_t
out_feat
)
{
cublasHandle_t
handle
;
cublasHandle_t
handle
;
...
@@ -135,12 +135,12 @@ void moe_cuda_forward_impl(
...
@@ -135,12 +135,12 @@ void moe_cuda_forward_impl(
int
main
()
{
int
main
()
{
const
data_t
*
input
,
*
weight
;
data_t
*
input
,
*
weight
;
data_t
*
output
;
data_t
*
output
;
const
size_t
*
gate
;
size_t
*
gate
;
checkCudaErrors
(
cudaMalloc
(
&
input
,
batch_size
*
in_feat
*
sizeof
(
const
data_t
)));
checkCudaErrors
(
cudaMalloc
(
&
input
,
batch_size
*
in_feat
*
sizeof
(
data_t
)));
checkCudaErrors
(
cudaMalloc
(
&
weight
,
num_expert
*
in_feat
*
out_feat
*
sizeof
(
const
data_t
)));
checkCudaErrors
(
cudaMalloc
(
&
weight
,
num_expert
*
in_feat
*
out_feat
*
sizeof
(
data_t
)));
checkCudaErrors
(
cudaMalloc
(
&
output
,
batch_size
*
top_k
*
out_feat
*
sizeof
(
data_t
)));
checkCudaErrors
(
cudaMalloc
(
&
output
,
batch_size
*
top_k
*
out_feat
*
sizeof
(
data_t
)));
checkCudaErrors
(
cudaMalloc
(
&
gate
,
batch_size
*
top_k
*
sizeof
(
size_t
)));
checkCudaErrors
(
cudaMalloc
(
&
gate
,
batch_size
*
top_k
*
sizeof
(
size_t
)));
...
...
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