Skip to content
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

Removed trival warnings #27073

Merged

Conversation

amitsrivastava78
Copy link
Contributor

Removed some warnings from the files

@rthadur rthadur self-assigned this Mar 25, 2019
@rthadur rthadur added comp:lite TF Lite related issues size:S CL Change Size: Small labels Mar 25, 2019
@rthadur rthadur requested a review from renjie-liu March 25, 2019 21:05
@renjie-liu renjie-liu requested review from jdduke and removed request for renjie-liu March 26, 2019 00:24
@amitsrivastava78
Copy link
Contributor Author

@jdduke , thanks for pointing this out, i updated the code as per the review comments, kindly check and approve.

Regards
Amit

tensorflow/lite/arena_planner.cc Show resolved Hide resolved
tensorflow/lite/arena_planner.cc Outdated Show resolved Hide resolved
@amitsrivastava78
Copy link
Contributor Author

@jdduke , i have updated the code as per comments, kindly check and update.

Regards
Amit

@amitsrivastava78 amitsrivastava78 force-pushed the floormod_warning branch 2 times, most recently from 89b1d54 to 60c060b Compare March 27, 2019 04:13
@amitsrivastava78
Copy link
Contributor Author

@jdduke , i found one problem in the function CalculateDeallocationOfInternalTensors and CalculateAllocationOfInternalTensors, this is when the node_index becomes negative(in one of the TC) then dues to the implicit conversion with the unsigned int, negative values were becoming positive and hence the test case was passing, not sure this was intentional or oversight, anyway i changed the code as per your suggestion and added the small error check code to ensure sanity.
if (node_index < 0) {
return kTfLiteOk;
}
Hope this is ok, Kindly check and approve.

Regards
Amit

@amitsrivastava78
Copy link
Contributor Author

@jdduke , i found one problem in the function CalculateDeallocationOfInternalTensors and CalculateAllocationOfInternalTensors, this is when the node_index becomes negative(in one of the TC) then dues to the implicit conversion with the unsigned int, negative values were becoming positive and hence the test case was passing, not sure this was intentional or oversight, anyway i changed the code as per your suggestion and added the small error check code to ensure sanity.
if (node_index < 0) {
return kTfLiteOk;
}
Hope this is ok, Kindly check and approve.

Regards
Amit

tensorflow/lite/arena_planner.cc Outdated Show resolved Hide resolved
@jdduke
Copy link
Member

jdduke commented Mar 27, 2019

@jdduke , i found one problem in the function CalculateDeallocationOfInternalTensors and CalculateAllocationOfInternalTensors, this is when the node_index becomes negative(in one of the TC)

Interesting, can we expand the test to catch this? Can you tell if this would happen for a legit model/interpreter use-case?

@amitsrivastava78
Copy link
Contributor Author

@jdduke this happens when the graph is empty , the TC which is triggering this condition is (ArenaPlannerTest, EmptyGraph) , which ultimately calls CalculateAllocations which subtracts one from the active node hence causing the problem.

Regards
Amit

@jdduke
Copy link
Member

jdduke commented Apr 1, 2019

@jdduke this happens when the graph is empty , the TC which is triggering this condition is (ArenaPlannerTest, EmptyGraph) , which ultimately calls CalculateAllocations which subtracts one from the active node hence causing the problem.

Can you add a (unit) test for this case?

@amitsrivastava78
Copy link
Contributor Author

@jdduke , thanks for the review i have added one case to cover this scenario, kindly check and approve.

Regards
Amit

@rthadur rthadur requested a review from jdduke April 1, 2019 20:23
tensorflow/lite/arena_planner_test.cc Outdated Show resolved Hide resolved
@amitsrivastava78
Copy link
Contributor Author

@jdduke , sorry for the miss,i have updated the code with the comments, explaining why this TC is added and what problem previously was seen. Hope this is ok.

Regards
Amit

@tensorflow-bot tensorflow-bot bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Apr 26, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Apr 26, 2019
@amitsrivastava78
Copy link
Contributor Author

@jdduke , thanks for approving the PR, can you please help to get this merged.

Regards
Amit

@jdduke
Copy link
Member

jdduke commented May 7, 2019

@rthadur is working to land this.

@amitsrivastava78
Copy link
Contributor Author

@rthadur is working to land this.

@rthadur any update as to when this can be merged.

Regards
Amit

@rthadur rthadur added pending merge internally ready to pull PR ready for merge process and removed ready to pull PR ready for merge process labels Jun 26, 2019
@amitsrivastava78
Copy link
Contributor Author

@rthadur , can you please help to get this merged.

Regards
Amit

@rthadur
Copy link
Contributor

rthadur commented Jul 10, 2019

Its failing because of internal error . Here is the error:
[==========] Running 14 tests from 1 test suite. [----------] Global test environment set-up. [----------] 14 tests from ArenaPlannerTest [ RUN ] ArenaPlannerTest.EmptyGraph [ OK ] ArenaPlannerTest.EmptyGraph (3 ms) [ RUN ] ArenaPlannerTest.DeallocationOfInputTensor Unhandled exception: @ 0x7feea2d26ce2 GoogleTerminateHandler() @ 0x7feea2814266 __cxxabiv1::__terminate() @ 0x7feea2814293 std::terminate() @ 0x7feea28143cf __cxa_throw @ 0x7feea2758f60 std::__g::__throw_out_of_range_fmt() @ 0x7feea2e33599 tflite::ArenaPlanner::PlanAllocations() @ 0x7feea47cab82 tflite::(anonymous namespace)::ArenaPlannerTest::SetGraph() @ 0x7feea47cba8d tflite::(anonymous namespace)::ArenaPlannerTest_DeallocationOfInputTensor_Test::TestBody() @ 0x7feea35f960a testing::Test::Run() @ 0x7feea35fa973 testing::TestInfo::Run() @ 0x7feea35fb50b testing::TestSuite::Run() @ 0x7feea360ba77 testing::internal::UnitTestImpl::RunAllTests() @ 0x7feea360b446 testing::UnitTest::Run() @ 0x7feea47c9701 main @ 0x7feea23aabbd __libc_start_main @ 0x55574cb9e4c9 ../sysdeps/x86_64/start.S:108 _start terminate called after throwing an instance of 'std::__g::out_of_range'

Amit Srivastava added 2 commits July 11, 2019 08:15
Removed the warning from the file.
Added a Bug Fix, TC and removed warnings from the file.
@amitsrivastava78
Copy link
Contributor Author

@rthadur , i have fixed the problem.
@jdduke , i know this is old PR, can you please re approve.

Regards
Amit

@rthadur rthadur requested a review from jdduke July 15, 2019 19:23
@rthadur rthadur added awaiting review Pull request awaiting review and removed pending merge internally ready to pull PR ready for merge process labels Jul 15, 2019
@tensorflow-bot tensorflow-bot bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Aug 2, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Aug 2, 2019
@rthadur
Copy link
Contributor

rthadur commented Aug 2, 2019

Changes are merged internally , waiting for auto merge to happen.

@tensorflow-copybara tensorflow-copybara merged commit fa52c1c into tensorflow:master Aug 2, 2019
tensorflow-copybara pushed a commit that referenced this pull request Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review Pull request awaiting review cla: yes comp:lite TF Lite related issues ready to pull PR ready for merge process size:S CL Change Size: Small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants