-
Notifications
You must be signed in to change notification settings - Fork 777
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
warning: 'resolved_axis' may be used uninitialized in this function (reduce.cc) #449
Comments
When I compiled without |
As an aside, if you'd like to avoid pulling in a whole lot of unrelated code into your repo, you could use TFLM's new support for external integration:
To address this specific issue, while the code in question is certainly complex, AFAICT this is a false positive. The variable is passed as a pre-allocated buffer and gives the impression of being an input parameter. However, if we trace the call stack it is initialized. For example, tflite-micro/tensorflow/lite/micro/kernels/reduce.cc Lines 171 to 177 in a9f2e03
calls into tflite-micro/tensorflow/lite/kernels/internal/reference/reduce.h Lines 215 to 240 in a9f2e03
which then initializes the variable in tflite-micro/tensorflow/lite/kernels/internal/reference/reduce.h Lines 107 to 109 in a9f2e03
It may be worth adding For completeness, here are the flags that the TFLM repo uses: gcc on x86: tflite-micro/tensorflow/lite/micro/tools/make/Makefile Lines 130 to 145 in a9f2e03
clang on x86: tflite-micro/tensorflow/lite/micro/build_def.bzl Lines 1 to 6 in a9f2e03
|
Thank you for the detailed answer, @advaitjain . We are currently manually copying the directories and files that we need from TFLM; we should switch over to the new support. FYI @alanvgreen |
This was seen when we attempted to bump the tflite-micro submodule in our project up to current main, from about a month ago (google/CFU-Playground#230 (comment)).
Since we compile TFL-micro with
-Werror
(using riscv gcc v8.3), this warning becomes an error for us:I think it's referencing this: https://github.com/tensorflow/tflite-micro/blob/main/tensorflow/lite/micro/kernels/reduce.cc#L149 , and I can't see where/how it gets initialized.
If you don't see these warnings, then there must be something wrong in our usage of tfl-micro.
The text was updated successfully, but these errors were encountered: