Skip to content

Use a literal sentinel value for kernel init failure #2896

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 19, 2025

Conversation

copybara-service[bot]
Copy link

Use a literal sentinel value for kernel init failure

If a TFLite delegate is compiled into a library then TfLiteKernelInitFailed can return a different value than the one that the TFLite interpreter expects. This could be fixed by modifying the linkage of this function but that doesn't seem to be common in TFLite so the easier solution is to use a literal sentinel value (-1) instead of a memory address.

@copybara-service copybara-service bot force-pushed the test_784453957 branch 7 times, most recently from 5f1b77b to 1241eea Compare July 19, 2025 04:24
If a TFLite delegate is compiled into a library then `TfLiteKernelInitFailed` can return a different value than the one that the TFLite interpreter expects. This could be fixed by modifying the linkage of this function but that doesn't seem to be common in TFLite so the easier solution is to use a literal sentinel value (-1) instead of a memory address.

PiperOrigin-RevId: 784812328
@copybara-service copybara-service bot merged commit faeb8b9 into main Jul 19, 2025
@copybara-service copybara-service bot deleted the test_784453957 branch July 19, 2025 05:15
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