Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.

Makes 'Tensor.gathering' generic over 'Int32' and 'Int64'. #272

Merged
merged 3 commits into from
Jun 21, 2019

Conversation

eaplatanios
Copy link
Contributor

Fixes #259.

@rxwei
Copy link
Contributor

rxwei commented Jun 21, 2019

I’m not sure this is the safest solution, because Int8 and Int16 also conform to TensorFlowInteger.

@eaplatanios
Copy link
Contributor Author

Oh I see. I can make a new protocol then, as you suggested.

@eaplatanios
Copy link
Contributor Author

It's weird though that the raw ops generation script assigns TensorFlowScalar & BinaryInteger as the signature of the gather ops.

@eaplatanios
Copy link
Contributor Author

In either case, I created a separate protocol and local tests pass. Currently running CI tests.

@rxwei
Copy link
Contributor

rxwei commented Jun 21, 2019

Yeah, I think the wrapper generation script doesn’t pay attention to the specific integer types. We should change the script to use the new protocol for APIs that only take index scalar types.

@eaplatanios
Copy link
Contributor Author

Sure, I can do that in a separate PR after we're done with this one.

@rxwei
Copy link
Contributor

rxwei commented Jun 21, 2019

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request kokoro:run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make 'gathering(atIndices:alongAxis:)' generic over 'Int32' and 'Int64'.
3 participants