aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Olsson <mikael.olsson@arm.com>2024-01-16 11:57:13 +0100
committerMikael Olsson <mikael.olsson@arm.com>2024-01-16 11:57:13 +0100
commit36638b51327efcb77951c2ed293ab1032d079e67 (patch)
treec44b578a48c8b71c074b915667c52022f7bcb232
parent296c4c267b0151e08a6f68d1be58970a384064e4 (diff)
downloadethos-u-core-platform-36638b51327efcb77951c2ed293ab1032d079e67.tar.gz
Remove cancel error for inference not in queue
Currently if the inference to cancel is not found in the inference queue, the message_handler_openamp will response with an error. The inference may already be running and therefore not be in the queue anymore or the inference is already done and the response is in the mailbox queue. In either case, responding with an error when the inference is not in the queue isn't useful so the check has been removed. The Linux kernel driver knows what inferences that are inflight and will track what inferences that have been cancelled and handle it accordingly. Change-Id: I780e0e08a68e458221649bc2cecf7d665adc3c33 Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
-rw-r--r--applications/message_handler_openamp/message_handler.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/applications/message_handler_openamp/message_handler.cpp b/applications/message_handler_openamp/message_handler.cpp
index 9694f39..953372f 100644
--- a/applications/message_handler_openamp/message_handler.cpp
+++ b/applications/message_handler_openamp/message_handler.cpp
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: Copyright 2022-2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
+ * SPDX-FileCopyrightText: Copyright 2022-2024 Arm Limited and/or its affiliates <open-source-office@arm.com>
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the License); you may
@@ -191,8 +191,7 @@ int MessageHandler::handleMessage(void *data, size_t len, uint32_t src) {
sendInferenceRsp(src, request.inference_handle, EthosU::ETHOSU_CORE_STATUS_ABORTED);
}
- sendCancelInferenceRsp(
- src, rpmsg->header.msg_id, found ? EthosU::ETHOSU_CORE_STATUS_OK : EthosU::ETHOSU_CORE_STATUS_ERROR);
+ sendCancelInferenceRsp(src, rpmsg->header.msg_id, EthosU::ETHOSU_CORE_STATUS_OK);
break;
}
case EthosU::ETHOSU_CORE_MSG_NETWORK_INFO_REQ: {