Skip to content

Implement CONCAT, GATHER, SLICE, SPLIT, STRIDED_SLICE, and many other ops for any types of size 1, 2, 4, 8 bytes.#6202

Merged
copybara-service[bot] merged 1 commit intomainfrom
test_879737023
Mar 9, 2026
Merged

Implement CONCAT, GATHER, SLICE, SPLIT, STRIDED_SLICE, and many other ops for any types of size 1, 2, 4, 8 bytes.#6202
copybara-service[bot] merged 1 commit intomainfrom
test_879737023

Conversation

@copybara-service
Copy link

@copybara-service copybara-service bot commented Mar 6, 2026

Implement CONCAT, GATHER, SLICE, SPLIT, STRIDED_SLICE, and many other ops for any types of size 1, 2, 4, 8 bytes.

This generalizes to new types better, and reduces code size a bit.

This also removes a specialization for STRIDED_SLICE and just uses STRIDED_SLICE_REF, the two implementations are the same anyways.

This change adds a new helper TfLiteGetTypeSizeBits, which is helpful to more safely implement this change.

@copybara-service copybara-service bot force-pushed the test_879737023 branch 4 times, most recently from 1364361 to 1d12d4f Compare March 9, 2026 05:38
@copybara-service copybara-service bot changed the title Implement CONCAT, GATHER, SLICE, SPLIT, STRIDED_SLICE for any types of size 1, 2, 4, 8 bytes. Implement CONCAT, GATHER, SLICE, SPLIT, STRIDED_SLICE, and many other ops for any types of size 1, 2, 4, 8 bytes. Mar 9, 2026
@copybara-service copybara-service bot force-pushed the test_879737023 branch 7 times, most recently from 52f910d to 151ab9b Compare March 9, 2026 20:06
… ops for any types of size 1, 2, 4, 8 bytes.

This generalizes to new types better, and reduces code size a bit.

This also removes a specialization for STRIDED_SLICE and just uses STRIDED_SLICE_REF, the two implementations are the same anyways.

This change adds a new helper `TfLiteGetTypeSizeBits`, which is helpful to more safely implement this change.

PiperOrigin-RevId: 881022036
@copybara-service copybara-service bot merged commit 7162aec into main Mar 9, 2026
@copybara-service copybara-service bot deleted the test_879737023 branch March 9, 2026 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant