From 89a3ad00fd78a44e747bd3b3b0464d87ca387b9a Mon Sep 17 00:00:00 2001 From: Davide Libenzi Date: Fri, 27 Sep 2019 15:41:29 -0700 Subject: [PATCH] More VLOG around device barrier locking. --- torch_xla/csrc/tensor.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/torch_xla/csrc/tensor.cpp b/torch_xla/csrc/tensor.cpp index 6e027b2ed0ae..bdaf0d39ffba 100644 --- a/torch_xla/csrc/tensor.cpp +++ b/torch_xla/csrc/tensor.cpp @@ -966,7 +966,11 @@ XLATensor::SyncTensorCollection XLATensor::CollectSyncTensors( std::vector at_tensor_index; SyncTensorCollection coll; coll.indices.reserve(tensors.size()); + TF_VLOG(4) << "Waiting on device barrier for device " + << unique_device->ToString() << " ..."; coll.unlocker = LockDevices(unique_device.AsSet()); + TF_VLOG(4) << "Waiting on device barrier for device " + << unique_device->ToString() << " done!"; for (size_t i = 0; i < tensors.size(); ++i) { if (tensors[i].CurrentXlaData() == nullptr) { ir::Value ir_value = tensors[i].CurrentIrValue();