From 6168047ef0354927cb175ad295722924dfc3053c Mon Sep 17 00:00:00 2001 From: Grant Watson Date: Wed, 31 May 2023 14:56:13 +0100 Subject: Correctly identify "axis" attributes. - Allows axis attributes to be treated differently to other arguments in attribute.def Signed-off-by: Grant Watson Change-Id: I1be2595c24bf22e5391a2911a5283391d310df37 --- scripts/operator_api/generate_api.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'scripts') diff --git a/scripts/operator_api/generate_api.py b/scripts/operator_api/generate_api.py index 671d902..5038973 100644 --- a/scripts/operator_api/generate_api.py +++ b/scripts/operator_api/generate_api.py @@ -192,6 +192,18 @@ def getOperators(tosaXml): operator["serializeAttType"] = getSerializeOpType(opName) tosaArgs = getTosaArgs(opXml) serializeArgs = getSerializeArgsForOp(opName, allSerializeArgs, tosaArgs) + # Handle "axis" arguments + axisList = [arg["name"] for arg in tosaArgs if arg["name"] == "axis"] + if operator["serializeAttType"] == "None" and len(axisList) > 0: + operator["serializeAttType"] = "Axis" + serializeArgs = [ + { + "name": "axis", + "dType": "int32_t", + "SV": "S", + "init": "= client_axis", + } + ] updateTosaArgs(tosaArgs, serializeArgs, tosaXml) operator["arguments"] = tosaArgs operator["serializeArgs"] = serializeArgs -- cgit v1.2.1