| { |
| "$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" |
| }, |
| "normal_divisor": { |
| "description": "normal_divisor for error bounds", |
| "type": "number" |
| }, |
| "bound_as_magnitude": { |
| "description": "when the bound magnitude is passed in the bound value", |
| "type": "boolean" |
| }, |
| "bound_addition": { |
| "description": "addition to the bounds value", |
| "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" |
| ] |
| } |