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
665b99bf
Unverified
Commit
665b99bf
authored
Apr 30, 2022
by
Rick Ho
Committed by
GitHub
Apr 30, 2022
Browse files
Merge pull request #107 from laekov/faster-bug
fix bug: skip computeFn when batch is empty
parents
59bcec8e
d90ff389
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
cuda/fastermoe/smart_schedule.h
cuda/fastermoe/smart_schedule.h
+3
-0
fmoe/fastermoe/shadow_policy.py
fmoe/fastermoe/shadow_policy.py
+1
-1
No files found.
cuda/fastermoe/smart_schedule.h
View file @
665b99bf
...
...
@@ -80,6 +80,9 @@ void computeFn(py::function fn, c10::Device device,
scalar_t
*
inp_buf
,
scalar_t
*
out_buf
,
long
idx
,
long
offset
,
long
micro_batch_size
,
long
d_model
,
CudaStreamManager
*
smgr
)
{
if
(
micro_batch_size
==
0
)
{
return
;
}
auto
options
=
torch
::
TensorOptions
()
.
dtype
(
c10
::
CppTypeToScalarType
<
scalar_t
>::
value
)
.
device
(
device
)
...
...
fmoe/fastermoe/shadow_policy.py
View file @
665b99bf
...
...
@@ -69,5 +69,5 @@ def get_shadow_policy(d_model=None):
if
d_model
is
not
None
and
'FMOE_FASTER_GLBPLC_DMODEL'
not
in
os
.
environ
:
os
.
environ
[
'FMOE_FASTER_GLBPLC_DMODEL'
]
=
str
(
d_model
)
if
not
switch_from_env
(
'FMOE_FASTER_SHADOW_ENABLE'
):
return
no_policy
return
no_
shadow_
policy
return
global_policy
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