message: Correctly support floating point size in tf.range.
diff: @@ -22,6 +22,7 @@ limitations under the License.
  #include "tensorflow/compiler/xla/client/xla_builder.h"
  #include "tensorflow/compiler/xla/literal.h"
  #include "tensorflow/compiler/xla/primitive_util.h"
  +#include "tensorflow/compiler/xla/xla_data.pb.h"
  #include "tensorflow/core/framework/op_kernel.h"
  #include "tensorflow/core/framework/register_types.h"
  #include "tensorflow/core/framework/tensor.h"
  @@ -122,13 +123,14 @@ class RangeOp : public XlaOpKernel {
  xla::XlaOp limit = ctx->Input(1);
  xla::XlaOp start = ctx->Input(0);
  if (type == DT_INT32 || type == DT_INT64) {
  - auto dynamic_size =
  - ((xla::Abs(limit - start) + xla::Abs(delta) -
  + auto dynamic_size = (xla::Abs(limit - start) + xla::Abs(delta) -
  xla::One(ctx->builder(), ctx->input_xla_type(0))) /
  - xla::Abs(delta));
  + xla::Abs(delta);
  + dynamic_size = xla::ConvertElementType(dynamic_size, xla::S32);
  output = xla::SetDimensionSize(output.ValueOrDie(), dynamic_size, 0);
  } else {
  auto dynamic_size = (xla::Ceil(xla::Abs((limit - start) / delta)));
  + dynamic_size = xla::ConvertElementType(dynamic_size, xla::S32);
  output = xla::SetDimensionSize(output.ValueOrDie(), dynamic_size, 0);
  }
  }
  