From 36638b51327efcb77951c2ed293ab1032d079e67 Mon Sep 17 00:00:00 2001 From: Mikael Olsson Date: Tue, 16 Jan 2024 11:57:13 +0100 Subject: 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 --- applications/message_handler_openamp/message_handler.cpp | 5 ++--- 1 file 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 + * SPDX-FileCopyrightText: Copyright 2022-2024 Arm Limited and/or its affiliates * 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: { -- cgit v1.2.1