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
20cc924b
Commit
20cc924b
authored
Jan 03, 2021
by
Jiezhong Qiu
Browse files
update
parent
046455a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
pytorch/cuda/moe_test.py
pytorch/cuda/moe_test.py
+1
-1
No files found.
pytorch/cuda/moe_test.py
View file @
20cc924b
...
...
@@ -20,7 +20,7 @@ def perf():
n_runs
=
16
tott
=
0.
for
i
in
range
(
n_runs
):
gate
=
torch
.
randint
(
low
=
0
,
high
=
num_expert
,
size
=
(
batch_size
,
),
requires_grad
=
False
).
int
().
cuda
()
gate
=
torch
.
randint
(
low
=
0
,
high
=
num_expert
,
size
=
(
batch_size
,
),
requires_grad
=
False
).
int
().
cuda
(
"cuda:1"
)
ts
=
time
.
time
()
o
=
moe
(
inp
,
gate
)
te
=
time
.
time
()
...
...
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