Skip to content

Commit

Permalink
Fix locking of variables in SparseProximalGradientDescent,
Browse files Browse the repository at this point in the history
AdagradDA, SparseAdagradDA.

PiperOrigin-RevId: 168252530
  • Loading branch information
tensorflower-gardener committed Sep 11, 2017
1 parent abde008 commit a6223c0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tensorflow/core/kernels/training_ops.cc
Expand Up @@ -875,7 +875,7 @@ class SparseApplyProximalGradientDescentOp : public OpKernel {

void Compute(OpKernelContext* ctx) override NO_THREAD_SAFETY_ANALYSIS {
auto locks =
MaybeLockVariableInputMutexesInOrder(ctx, use_exclusive_lock_, {0, 1});
MaybeLockVariableInputMutexesInOrder(ctx, use_exclusive_lock_, {0});
Tensor var;
OP_REQUIRES_OK(
ctx, GetInputTensorFromVariable(ctx, 0, use_exclusive_lock_, &var));
Expand Down Expand Up @@ -1524,8 +1524,8 @@ class ApplyAdagradDAOp : public OpKernel {
}

void Compute(OpKernelContext* ctx) override {
auto locks =
MaybeLockVariableInputMutexesInOrder(ctx, use_exclusive_lock_, {0, 1});
auto locks = MaybeLockVariableInputMutexesInOrder(ctx, use_exclusive_lock_,
{0, 1, 2});
Tensor var;
OP_REQUIRES_OK(
ctx, GetInputTensorFromVariable(ctx, 0, use_exclusive_lock_, &var));
Expand Down Expand Up @@ -1626,8 +1626,8 @@ class SparseApplyAdagradDAOp : public OpKernel {
}

void Compute(OpKernelContext* ctx) override NO_THREAD_SAFETY_ANALYSIS {
auto locks =
MaybeLockVariableInputMutexesInOrder(ctx, use_exclusive_lock_, {0, 1});
auto locks = MaybeLockVariableInputMutexesInOrder(ctx, use_exclusive_lock_,
{0, 1, 2});
Tensor var;
OP_REQUIRES_OK(
ctx, GetInputTensorFromVariable(ctx, 0, use_exclusive_lock_, &var));
Expand Down

0 comments on commit a6223c0

Please sign in to comment.