From e1b13e9e557025fc9220e27d0e32ff09302ddd2b Mon Sep 17 00:00:00 2001 From: Anna R <annarev@google.com> Date: Wed, 21 Oct 2020 13:18:52 -0700 Subject: [PATCH] Access stateful_random_ops algorithm value as int64. Algorithm is specified to have int64 type here: https://cs.opensource.google/tensorflow/tensorflow/+/master:tensorflow/core/ops/stateful_random_ops.cc;l=38?q=stateful_random_ops.cc and below in this file. PiperOrigin-RevId: 338326682 Change-Id: I24ba7c43258d65cd690611769e715a2616a8130f --- tensorflow/compiler/tf2xla/kernels/stateful_random_ops.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow/compiler/tf2xla/kernels/stateful_random_ops.cc b/tensorflow/compiler/tf2xla/kernels/stateful_random_ops.cc index a46cceddced..cfd05f18c8d 100644 --- a/tensorflow/compiler/tf2xla/kernels/stateful_random_ops.cc +++ b/tensorflow/compiler/tf2xla/kernels/stateful_random_ops.cc @@ -181,7 +181,7 @@ Status CompileImpl( } xla::Literal alg_literal; TF_RETURN_IF_ERROR(ctx->ConstantInput(alg_input_idx, &alg_literal)); - Algorithm alg = Algorithm(alg_literal.Get<int>({})); + Algorithm alg = Algorithm(alg_literal.Get<int64>({})); if (!(alg == RNG_ALG_THREEFRY || alg == RNG_ALG_PHILOX)) { return errors::InvalidArgument("Unsupported algorithm id: ", alg); }