Commit 894aac26 authored by Vijay Vasudevan's avatar Vijay Vasudevan Committed by TensorFlower Gardener
Browse files

Fix SliceHelper _baseslice case to use the same dtype for begin and strides.

Using '1' automatically gets converted to int32, but when the user explicitly
uses an int64 for the 'begin' argument, we want to make sure that 'strides'
is of the same dtype, so we make sure we use a 1 of the proper dtype.

Adds a test that failed before and passes with this change.  Also
tested the indexing case in addition to the _baseslice case, and added
tests for both 'begin' as a Tensor as well as a non-Tensor.

Fixes #11380.

RELNOTES: Fixes 'strides' and 'begin' dtype mismatch when slicing using int64 Tensor index in python. See #11380.
PiperOrigin-RevId: 161411479
parent 792685e9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment