Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions torch/csrc/utils/tensor_new.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ static Tensor new_with_type_conversion(const Type& type, Tensor other, int64_t d
}

static Tensor new_with_tensor_copy(const Type& type, Tensor other, int64_t device) {
AutoGPU auto_gpu(device);
AutoNoGIL no_gil;
maybe_initialize_cuda(type);
AutoNoGIL no_gil;
AutoGPU auto_gpu(device);
return type.copy(other);
}

Expand Down