aboutsummaryrefslogtreecommitdiff
path: root/scripts/schemavalidation/compliance-config.schema.json
blob: c0a479d0468fe7e9d5572b0139c759e1e1db513e (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
 {
    "$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"
                            ]
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "mode",
                        "data_type"
                    ]
                }
            }
        }
    },
    "additionalProperties": false,
    "required": [
        "version",
        "tensors"
    ]
}