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
2ce87038
Commit
2ce87038
authored
Apr 30, 2022
by
zms1999
Browse files
skip computeFn when micro_batch_size == 0
parent
59bcec8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
cuda/fastermoe/smart_schedule.h
cuda/fastermoe/smart_schedule.h
+3
-0
No files found.
cuda/fastermoe/smart_schedule.h
View file @
2ce87038
...
...
@@ -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
)
...
...
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