aboutsummaryrefslogtreecommitdiff
path: root/scripts/schemavalidation/compliance-config.schema.json
blob: eb3ccde174847131cef0b949d99e06a1032b7f56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
 {
    "$comment": "Copyright (c) 2023-2024, ARM Limited.",
    "$comment": "SPDX-License-Identifier: Apache-2.0",
    "$id": "compliance-config.schema.json",
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "title": "compliance-config",
    "description": "Compliance configuration for verifying TOSA tensor data outputs from a test",
    "type": "object",
    "properties": {
        "version": {
            "description": "version string X.Y of this config data",
            "type": "string"
        },
        "tensors": {
            "type": "object",
            "description": "dictionary of output tensors - keys are the tosa network names",
            "patternProperties":
            {
                "^.*$":
                {
                    "description": "per named tensor config for compliance checking",
                    "type": "object",
                    "properties": {
                        "mode": {
                            "description": "verifier mode EXACT, DOT_PRODUCT, ULP, REDUCE_PRODUCT, or FP_SPECIAL",
                            "type": "string"
                        },
                        "data_type": {
                            "description": "tensor data type, such as: BOOL, INT16, FP32",
                            "type": "string"
                        },
                        "ulp_info": {
                            "description": "info required for the ULP mode",
                            "type": "object",
                            "properties":
                            {
                                "ulp": {
                                    "description": "ulp range limit - positive float",
                                    "type": "number",
                                    "minimum": 0
                                }
                            },
                            "required": [ "ulp" ]
                        },
                        "dot_product_info": {
                            "description": "info required for the DOT_PRODUCT mode",
                            "type": "object",
                            "properties":
                            {
                                "s": {
                                    "description": "test set 0 to 5 or -1 for other data",
                                    "type": "integer"
                                },
                                "ks": {
                                    "description": "kernel size for this dot product operation",
                                    "type": "integer"
                                }
                            },
                            "additionalProperties": false,
                            "required": [
                                "s",
                                "ks"
                            ]
                        },
                        "abs_error_info": {
                            "description": "info required for the ABS_ERROR mode",
                            "type": "object",
                            "properties":
                            {
                                "lower_bound": {
                                    "description": "lower bound multiplier for error bounds",
                                    "type": "number"
                                }
                            },
                            "additionalProperties": false
                        },
                        "reduce_product_info": {
                            "description": "info required for the REDUCE_PRODUCT mode",
                            "type": "object",
                            "properties":
                            {
                                "n": {
                                    "description": "number of products in the operation",
                                    "type": "integer"
                                }
                            },
                            "additionalProperties": false,
                            "required": [
                                "n"
                            ]
                        },
                        "relative_info": {
                            "description": "info required for the RELATIVE mode",
                            "type": "object",
                            "properties":
                            {
                                "max": {
                                    "description": "maximum absolute input value",
                                    "type": "number",
                                    "minimum": 0
                                },
                                "scale": {
                                    "description": "relative scaling factor",
                                    "type": "number",
                                    "minimum": 0
                                }
                            },
                            "additionalProperties": false,
                            "required": [
                                "max",
                                "scale"
                            ]
                        }

                    },
                    "additionalProperties": false,
                    "required": [
                        "mode",
                        "data_type"
                    ]
                }
            }
        }
    },
    "additionalProperties": false,
    "required": [
        "version",
        "tensors"
    ]
}