blob: 517dd99b0b025481a89ecfe0b87dc737a3536fb1 [file] [log] [blame]
Jeremy Johnson77fc6142023-09-04 17:04:21 +01001 {
Jeremy Johnsond80ea5e2024-01-03 10:54:12 +00002 "$comment": "Copyright (c) 2023-2024, ARM Limited.",
Jeremy Johnson77fc6142023-09-04 17:04:21 +01003 "$comment": "SPDX-License-Identifier: Apache-2.0",
4 "$id": "compliance-config.schema.json",
5 "$schema": "https://json-schema.org/draft/2020-12/schema",
6 "title": "compliance-config",
7 "description": "Compliance configuration for verifying TOSA tensor data outputs from a test",
8 "type": "object",
9 "properties": {
10 "version": {
11 "description": "version string X.Y of this config data",
12 "type": "string"
13 },
14 "tensors": {
15 "type": "object",
16 "description": "dictionary of output tensors - keys are the tosa network names",
17 "patternProperties":
18 {
19 "^.*$":
20 {
21 "description": "per named tensor config for compliance checking",
22 "type": "object",
23 "properties": {
24 "mode": {
25 "description": "verifier mode EXACT, DOT_PRODUCT, ULP, REDUCE_PRODUCT, or FP_SPECIAL",
26 "type": "string"
27 },
Jeremy Johnsonbb0935f2023-09-14 16:43:48 +010028 "data_type": {
29 "description": "tensor data type, such as: BOOL, INT16, FP32",
30 "type": "string"
31 },
Jeremy Johnson77fc6142023-09-04 17:04:21 +010032 "ulp_info": {
33 "description": "info required for the ULP mode",
34 "type": "object",
35 "properties":
36 {
37 "ulp": {
Jeremy Johnsona4d907e2023-10-26 13:53:14 +010038 "description": "ulp range limit - positive float",
39 "type": "number",
Jeremy Johnsonbb0935f2023-09-14 16:43:48 +010040 "minimum": 0
Jeremy Johnson77fc6142023-09-04 17:04:21 +010041 }
42 },
43 "required": [ "ulp" ]
44 },
45 "dot_product_info": {
46 "description": "info required for the DOT_PRODUCT mode",
47 "type": "object",
48 "properties":
49 {
50 "s": {
51 "description": "test set 0 to 5 or -1 for other data",
52 "type": "integer"
53 },
54 "ks": {
55 "description": "kernel size for this dot product operation",
56 "type": "integer"
Jeremy Johnson77fc6142023-09-04 17:04:21 +010057 }
58 },
59 "additionalProperties": false,
60 "required": [
61 "s",
Jeremy Johnsonbb0935f2023-09-14 16:43:48 +010062 "ks"
Jeremy Johnson77fc6142023-09-04 17:04:21 +010063 ]
Jeremy Johnsond80ea5e2024-01-03 10:54:12 +000064 },
65 "abs_error_info": {
66 "description": "info required for the ABS_ERROR mode",
67 "type": "object",
68 "properties":
69 {
70 "lower_bound": {
71 "description": "lower bound multiplier for error bounds",
72 "type": "number"
Jerry Ge51bd4f52024-02-20 11:21:19 -080073 },
74 "normal_divisor": {
75 "description": "normal_divisor for error bounds",
76 "type": "number"
Jeremy Johnson1eb14552024-04-11 16:21:54 +010077 },
78 "bound_as_magnitude": {
79 "description": "when the bound magnitude is passed in the bound value",
80 "type": "boolean"
81 },
82 "bound_addition": {
83 "description": "addition to the bounds value",
84 "type": "number"
Jeremy Johnsond80ea5e2024-01-03 10:54:12 +000085 }
86 },
87 "additionalProperties": false
Jeremy Johnsonbd801962024-01-03 17:07:44 +000088 },
89 "reduce_product_info": {
90 "description": "info required for the REDUCE_PRODUCT mode",
91 "type": "object",
92 "properties":
93 {
94 "n": {
95 "description": "number of products in the operation",
96 "type": "integer"
97 }
98 },
99 "additionalProperties": false,
100 "required": [
101 "n"
102 ]
Jeremy Johnson32d0b5a2024-02-01 15:54:07 +0000103 },
104 "relative_info": {
105 "description": "info required for the RELATIVE mode",
106 "type": "object",
107 "properties":
108 {
109 "max": {
110 "description": "maximum absolute input value",
111 "type": "number",
112 "minimum": 0
113 },
114 "scale": {
115 "description": "relative scaling factor",
116 "type": "number",
117 "minimum": 0
118 }
119 },
120 "additionalProperties": false,
121 "required": [
122 "max",
123 "scale"
124 ]
Jeremy Johnson77fc6142023-09-04 17:04:21 +0100125 }
Jeremy Johnson32d0b5a2024-02-01 15:54:07 +0000126
Jeremy Johnson77fc6142023-09-04 17:04:21 +0100127 },
128 "additionalProperties": false,
129 "required": [
Jeremy Johnsonbb0935f2023-09-14 16:43:48 +0100130 "mode",
131 "data_type"
Jeremy Johnson77fc6142023-09-04 17:04:21 +0100132 ]
133 }
134 }
135 }
136 },
137 "additionalProperties": false,
138 "required": [
139 "version",
140 "tensors"
141 ]
142}