Skip to content

Commit

Permalink
Rolling back due to:
Browse files Browse the repository at this point in the history
#41539
#41980

Resolves #41539, resolves #41980.

PiperOrigin-RevId: 336736742
Change-Id: Ibcc53f3fbf9c798da95d9bb4fdb62b65ead56d4d
  • Loading branch information
dubey authored and tensorflower-gardener committed Oct 12, 2020
1 parent 0930645 commit da8b395
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
1 change: 0 additions & 1 deletion tensorflow/core/nccl/BUILD
Expand Up @@ -43,7 +43,6 @@ cc_library(
]) + if_cuda_or_rocm([
"@com_google_absl//absl/base",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/memory",
"//tensorflow/core:core_cpu",
"//tensorflow/core:framework",
"//tensorflow/core:gpu_headers_lib",
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/core/nccl/nccl_manager.cc
Expand Up @@ -632,7 +632,7 @@ void NcclManager::RunCollective(Collective* collective) {
// Wait to ensure that the kernel that produces the data in the input
// tensor has finished running before the nccl kernel runs on the
// communication stream.
nccl_stream->stream->ThenWaitFor(p->input_event.get());
nccl_stream->stream->ThenWaitFor(p->tensor_stream);
}
if (p->root) {
if (collective->root_rank == -1) {
Expand Down
11 changes: 0 additions & 11 deletions tensorflow/core/nccl/nccl_manager.h
Expand Up @@ -27,7 +27,6 @@ limitations under the License.
#endif

#include "absl/container/flat_hash_map.h"
#include "absl/memory/memory.h"
#if GOOGLE_CUDA
#include "third_party/nccl/nccl.h"
#elif TENSORFLOW_USE_ROCM
Expand Down Expand Up @@ -77,19 +76,13 @@ class NcclManager {
context(static_cast<GPUDeviceContext*>(info->default_context)),
#endif
input(input),
input_event(nullptr),
output(output),
global_rank(global_rank),
done_callback(std::move(done_callback)),
root(false) {
DCHECK(executor != nullptr);
DCHECK(event_mgr != nullptr);
DCHECK(tensor_stream != nullptr);
if (input != nullptr) {
input_event = absl::make_unique<se::Event>(executor);
input_event->Init();
tensor_stream->ThenRecordEvent(input_event.get());
}
}

// StreamExecutor for the device. Expected to be live for process lifetime.
Expand Down Expand Up @@ -118,10 +111,6 @@ class NcclManager {
// called. Is NULL for participants that only receive data.
const Tensor* input;

// Wait on this event rather than synchronizing on the entire stream.
// This allows greater concurrency between compute and nccl streams.
std::unique_ptr<se::Event> input_event;

// Owned by the caller, who must keep it live until `done_callback` is
// called. Is NULL for participants that only send data.
Tensor* output;
Expand Down

0 comments on commit da8b395

Please sign in to comment.