Skip to content

Commit

Permalink
update.
Browse files Browse the repository at this point in the history
  • Loading branch information
yangwang201911 committed Dec 20, 2024
1 parent 4e27715 commit ee75163
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/plugins/auto/tests/unit/runtime_fallback_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ TEST_P(AutoRuntimeFallback, releaseResource) {
ifThrow);
inferRequests[deviceName].push_back(inferRequest);
inferRequests[deviceName].push_back(inferRequest_2);
ON_CALL(*mockIExeNet.get(), create_infer_request()).WillByDefault([this, &inferRequests, deviceName]() {
ON_CALL(*mockIExeNet.get(), create_infer_request()).WillByDefault([&inferRequests, deviceName]() {
auto infer = inferRequests.at(deviceName).back();
if (inferRequests.at(deviceName).size() > 1) {
// in case of passthrough model, we need to keep the infer request
Expand All @@ -210,7 +210,7 @@ TEST_P(AutoRuntimeFallback, releaseResource) {
inferRequests[deviceName].push_back(inferRequest);
inferRequests[deviceName].push_back(inferRequest_2);
ON_CALL(*mockIExeNetActual.get(), create_infer_request())
.WillByDefault(InvokeWithoutArgs([this, &inferRequests, deviceName]() {
.WillByDefault(InvokeWithoutArgs([&inferRequests, deviceName]() {
std::this_thread::sleep_for(std::chrono::milliseconds(0));
auto infer = inferRequests.at(deviceName).back();
if (inferRequests.at(deviceName).size() > 1) {
Expand Down Expand Up @@ -241,7 +241,7 @@ TEST_P(AutoRuntimeFallback, releaseResource) {
inferRequests[deviceName].push_back(inferRequest);
inferRequests[deviceName].push_back(inferRequest_2);
ON_CALL(*mockIExeNetGPU_1.get(), create_infer_request())
.WillByDefault(InvokeWithoutArgs([this, &inferRequests, deviceName]() {
.WillByDefault(InvokeWithoutArgs([&inferRequests, deviceName]() {
std::this_thread::sleep_for(std::chrono::milliseconds(0));
auto infer = inferRequests.at(deviceName).back();
if (inferRequests.at(deviceName).size() > 1) {
Expand All @@ -265,7 +265,7 @@ TEST_P(AutoRuntimeFallback, releaseResource) {
inferRequests[deviceName].push_back(inferRequest);
inferRequests[deviceName].push_back(inferRequest_2);
ON_CALL(*mockIExeNetOTHER.get(), create_infer_request())
.WillByDefault(InvokeWithoutArgs([this, &inferRequests, deviceName]() {
.WillByDefault(InvokeWithoutArgs([&inferRequests, deviceName]() {
std::this_thread::sleep_for(std::chrono::milliseconds(0));
auto infer = inferRequests.at(deviceName).back();
if (inferRequests.at(deviceName).size() > 1) {
Expand Down Expand Up @@ -399,7 +399,7 @@ TEST_P(AutoCTPUTRuntimeFallback, ctputDeviceInferFailTest) {
ifThrow);
inferRequests[deviceName].push_back(mockInferrequest);
inferRequests[deviceName].push_back(inferRequest_2);
ON_CALL(*mockIExeNet.get(), create_infer_request()).WillByDefault([this, &inferRequests, deviceName]() {
ON_CALL(*mockIExeNet.get(), create_infer_request()).WillByDefault([&inferRequests, deviceName]() {
auto infer = inferRequests.at(deviceName).back();
if (inferRequests.at(deviceName).size() > 1) {
// in case of passthrough model, we need to keep the infer request
Expand All @@ -423,7 +423,7 @@ TEST_P(AutoCTPUTRuntimeFallback, ctputDeviceInferFailTest) {
inferRequests[deviceName].push_back(mockInferrequestGPU_0);
inferRequests[deviceName].push_back(inferRequest_2);
ON_CALL(*mockIExeNetActual.get(), create_infer_request())
.WillByDefault(InvokeWithoutArgs([this, &inferRequests, deviceName]() {
.WillByDefault(InvokeWithoutArgs([&inferRequests, deviceName]() {
std::this_thread::sleep_for(std::chrono::milliseconds(0));
auto infer = inferRequests.at(deviceName).back();
if (inferRequests.at(deviceName).size() > 1) {
Expand Down Expand Up @@ -455,7 +455,7 @@ TEST_P(AutoCTPUTRuntimeFallback, ctputDeviceInferFailTest) {
inferRequests[deviceName].push_back(mockInferrequestGPU_1);
inferRequests[deviceName].push_back(inferRequest_2);
ON_CALL(*mockIExeNetGPU_1.get(), create_infer_request())
.WillByDefault(InvokeWithoutArgs([this, &inferRequests, deviceName]() {
.WillByDefault(InvokeWithoutArgs([&inferRequests, deviceName]() {
std::this_thread::sleep_for(std::chrono::milliseconds(0));
auto infer = inferRequests.at(deviceName).back();
if (inferRequests.at(deviceName).size() > 1) {
Expand Down

0 comments on commit ee75163

Please sign in to comment.