File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ std::unique_ptr<Aligner> create_aligner(
5050 cudaStream_t stream, int32_t device_id, int64_t max_device_memory_allocator_caching_size)
5151{
5252 GW_NVTX_RANGE (profiler, " create_aligner" );
53+ scoped_device_switch device (device_id);
5354 if (max_device_memory_allocator_caching_size < -1 )
5455 {
5556 throw std::invalid_argument (" max_device_memory_allocator_caching_size has to be either -1 (=all available GPU memory) or greater or equal than 0." );
@@ -99,6 +100,7 @@ std::unique_ptr<FixedBandAligner> create_aligner(
99100 int64_t max_device_memory)
100101{
101102 GW_NVTX_RANGE (profiler, " create_aligner" );
103+ scoped_device_switch device (device_id);
102104 if (max_device_memory < -1 )
103105 {
104106 throw std::invalid_argument (" max_device_memory has to be either -1 (=all available GPU memory) or greater or equal than 0." );
You can’t perform that action at this time.
0 commit comments