Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8a0f28d2 authored by Michael Butler's avatar Michael Butler Committed by Automerger Merge Worker
Browse files

Merge "Do not call releaseMemoryResource on ignored slot in NN VTS" into...

Merge "Do not call releaseMemoryResource on ignored slot in NN VTS" into tm-dev am: cb2e758c am: 2e7f0d95

Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/17970068



Change-Id: I11dacfeb01370113ee8b150bec6e7c36bfb89a86
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents d4dca923 2e7f0d95
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -659,6 +659,7 @@ void EvaluatePreparedModel(const std::shared_ptr<IDevice>& device,
                ASSERT_NE(nullptr, burst.get());

                // associate a unique slot with each memory pool
                constexpr int64_t kIgnoreSlot = -1;
                int64_t currentSlot = 0;
                std::vector<int64_t> slots;
                slots.reserve(request.pools.size());
@@ -667,7 +668,7 @@ void EvaluatePreparedModel(const std::shared_ptr<IDevice>& device,
                        slots.push_back(currentSlot++);
                    } else {
                        EXPECT_EQ(pool.getTag(), RequestMemoryPool::Tag::token);
                        slots.push_back(-1);
                        slots.push_back(kIgnoreSlot);
                    }
                }

@@ -698,9 +699,11 @@ void EvaluatePreparedModel(const std::shared_ptr<IDevice>& device,
                // Mark each slot as unused after the execution. This is unnecessary because the
                // burst is freed after this scope ends, but this is here to test the functionality.
                for (int64_t slot : slots) {
                    if (slot != kIgnoreSlot) {
                        ret = burst->releaseMemoryResource(slot);
                        ASSERT_TRUE(ret.isOk()) << ret.getDescription();
                    }
                }

                break;
            }