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
7af4a1c1
Commit
7af4a1c1
authored
Dec 30, 2020
by
Rick Ho
Browse files
limit max streams support
parent
bf60a846
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
pytorch/cuda/cuda_stream_manager.cpp
pytorch/cuda/cuda_stream_manager.cpp
+7
-2
No files found.
pytorch/cuda/cuda_stream_manager.cpp
View file @
7af4a1c1
#include <c
assert
>
#include <c
uda_runtime.h
>
#include "cuda_stream_manager.h"
#include "cuda_stream_manager.h"
...
@@ -8,6 +8,11 @@ CudaStreamManager* getCudaStreamManager(const size_t num_expert) {
...
@@ -8,6 +8,11 @@ CudaStreamManager* getCudaStreamManager(const size_t num_expert) {
if
(
!
smgr
)
{
if
(
!
smgr
)
{
smgr
=
new
CudaStreamManager
(
num_expert
);
smgr
=
new
CudaStreamManager
(
num_expert
);
}
}
assert
(
smgr
->
num_expert
==
num_expert
);
return
smgr
;
return
smgr
;
}
}
void
CudaStreamManager
::
sync
()
{
for
(
size_t
i
=
0
;
i
<
MAX_STREAMS
;
++
i
)
{
cudaStreamSynchronize
(
streams
[
i
]);
}
}
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