Skip to content

Application custom DECODE operator support (part 1) - #3687

Open
ddavis-2015 wants to merge 10 commits into
tensorflow:mainfrom
ddavis-2015:decode-custom
Open

ddavis-2015 wants to merge 10 commits into
tensorflow:mainfrom
ddavis-2015:decode-custom

Conversation

@ddavis-2015

@ddavis-2015 ddavis-2015 commented Sep 1, 2026 •

Copy link
Copy Markdown
Member

@tensorflow/micro

This is part 1 of 2 to add support for custom DECODE operators and their registration. Part 2 will add this support to the Python MicroInterpreter wrapper.

Add unit tests for custom DECODE operator registration.

Fix minor comment typos.

bug=fixes #3215

@tensorflow/micro

This is part 1 of 2 to add support for custom DECODE operators and their registration.  Part 2 will add this support to the Python MicroInterpreter wrapper.

Add unit tests for custom DECODE operator registration.

Re-enable -Werror in the Makefile.

Fix minor comment typos.

bug=fixes tensorflow#3215
@ddavis-2015
ddavis-2015 requested a review from a team as a code owner September 1, 2026 20:20
@ddavis-2015 ddavis-2015 added the ci:full Triggers the comprehensive cross-platform test suite. label Sep 1, 2026
@ddavis-2015 ddavis-2015 self-assigned this Sep 1, 2026
@ddavis-2015
ddavis-2015 deployed to integration-test September 1, 2026 20:20 — with GitHub Actions Active
@tensorflow/micro

Put the -Werror flag back into the primary makefile, to prevent creaping warning accumulation.

Fix various warning generators in codebase.

bug=fixes tensorflow#3689
Comment thread tensorflow/lite/micro/micro_context.h Outdated

struct CustomDecodeRegistration {
tflite::DecodeState* (*create_state)(const CustomDecodeRegistration&,
const TfLiteContext&,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious whether usage of & is intentional? TFLM used to use * for those types like TfLiteContext*.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentional.

Comment thread tensorflow/lite/micro/micro_context.h Outdated
const CustomDecodeRegistration* registrations, size_t count);

// Get the custom decompression registrations.
virtual const std::pair<const CustomDecodeRegistration*, size_t /*count*/>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: just std::pair would be better than const std::pair as a return value type.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

// Set the DECODE operator custom registrations.
// Can only be called during the MicroInterpreter kInit state (i.e. must
// be called before MicroInterpreter::AllocateTensors).
// The regions pointer argument is the start of a

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

registrations pointer instead?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@veblush veblush left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a few minor comments

Remove virtual specifiers where not needed.
@ddavis-2015
ddavis-2015 deployed to integration-test September 29, 2026 01:08 — with GitHub Actions Active
@ddavis-2015
ddavis-2015 deployed to integration-test September 29, 2026 01:37 — with GitHub Actions Active
@ddavis-2015
ddavis-2015 deployed to integration-test September 29, 2026 02:46 — with GitHub Actions Active
@ddavis-2015
ddavis-2015 requested a review from veblush September 29, 2026 03:27
veblush
veblush previously approved these changes Sep 29, 2026
@veblush
veblush added this pull request to the merge queue Sep 29, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Sep 29, 2026
@ddavis-2015
ddavis-2015 deployed to integration-test September 29, 2026 18:25 — with GitHub Actions Active
@ddavis-2015
ddavis-2015 requested a review from veblush September 29, 2026 20:38
@ddavis-2015

Copy link
Copy Markdown
Member Author

@veblush needs another review and merge due to merge conflict with #3788

This branch was successfully deployed

1 active deployment
integration-test — f479f14c Deployed Sep 29, 2026 by ddavis-2015 via approval-gate #1024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:full Triggers the comprehensive cross-platform test suite.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for DECODE operator

2 participants