8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent becfda0 commit e52245bCopy full SHA for e52245b
aten/src/ATen/core/ivalue_inl.h
@@ -947,9 +947,11 @@ struct C10_EXPORT ivalue::Future final : c10::intrusive_ptr_target {
947
currentDevice_ = impl_.getDevice();
948
storages_ = std::move(actualStorages);
949
for (const c10::Device& device : usedDevices) {
950
- c10::Event event(impl_.type());
951
- event.record(impl_.getStream(device));
952
- events_.push_back(std::move(event));
+ if (impl_.getDevice() != device) {
+ c10::Event event(impl_.type());
+ event.record(impl_.getStream(device));
953
+ events_.push_back(std::move(event));
954
+ }
955
}
956
957
std::vector<FutureCallback> cbs;
0 commit comments