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
6212aa28
Commit
6212aa28
authored
Jan 03, 2021
by
Jiezhong Qiu
Browse files
update
parent
27af1828
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
pytorch/cuda/cuda_stream_manager.h
pytorch/cuda/cuda_stream_manager.h
+3
-1
No files found.
pytorch/cuda/cuda_stream_manager.h
View file @
6212aa28
...
@@ -16,11 +16,13 @@ public:
...
@@ -16,11 +16,13 @@ public:
which means pytorch always sets the correct device for us.
which means pytorch always sets the correct device for us.
But for safety, we still manually set device to the desired one.
But for safety, we still manually set device to the desired one.
*/
*/
/*
int current_device;
int current_device;
checkCudaErrors(cudaGetDevice(¤t_device));
checkCudaErrors(cudaGetDevice(¤t_device));
printf("CudaStreamManager construnctor called, get device %d, set device %d\n", current_device, device);
printf("CudaStreamManager construnctor called, get device %d, set device %d\n", current_device, device);
*/
checkCudaErrors
(
cudaSetDevice
(
device
));
checkCudaErrors
(
cudaSetDevice
(
device
));
streams
=
new
cudaStream_t
[
num_expert
];
streams
=
new
cudaStream_t
[
num_expert
];
checkCudaErrors
(
cublasCreate
(
&
handle
));
checkCudaErrors
(
cublasCreate
(
&
handle
));
for
(
size_t
i
=
0
;
i
<
num_expert
;
++
i
)
{
for
(
size_t
i
=
0
;
i
<
num_expert
;
++
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