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
Loading
Please sign in to comment