Update the tensorflow yaml by adding the missing conv2d+biasadd+relu6 pattern for s8 input and adding the int8 type into Conv2D/MatMul.
fp32: ['*'] # '*' means all op types
capabilities: &common_capabilities
- int8: &ref_2_4 {
+ int8: &ref_2_4_int8 {
+ 'Conv2D': {
+ 'weight': {
+ 'dtype': ['int8', 'fp32'],
+ 'scheme': ['sym'],
+ 'granularity': ['per_channel','per_tensor'],
+ 'algorithm': ['minmax']
+ },
+ 'activation': {
+ 'dtype': ['int8', 'fp32'],
+ 'scheme': ['sym'],
+ 'granularity': ['per_tensor'],
+ 'algorithm': ['minmax', 'kl']
+ }
+ },
+ 'MatMul': {
+ 'weight': {
+ 'dtype': ['int8', 'fp32'],
+ 'scheme': ['sym'],
+ 'granularity': ['per_tensor'],
+ 'algorithm': ['minmax', 'kl']
+ },
+ 'activation': {
+ 'dtype': ['int8', 'fp32'],
+ 'scheme': ['asym', 'sym'],
+ 'granularity': ['per_tensor'],
+ 'algorithm': ['minmax']
+ }
+ },
+ 'default': {
+ 'activation': {
+ 'dtype': ['uint8', 'fp32'],
+ 'algorithm': ['minmax'],
+ 'scheme': ['sym'],
+ 'granularity': ['per_tensor']
+ }
+ },
+ }
+
+ uint8: &ref_2_4_uint8 {
'Conv2D': {
'weight': {
'dtype': ['int8', 'fp32'],
},
}
- uint8: *ref_2_4
-
patterns: &common_patterns
fp32: [ #TODO Add more patterns here to demonstrate our concept the results external engine should return.
'Conv2D + Add + Relu',
'Conv2D + Relu6',
'Conv2D + BiasAdd'
]
- int8: ['Conv2D + BiasAdd', 'Conv2D + BiasAdd+Relu']
+ int8: ['Conv2D + BiasAdd', 'Conv2D + BiasAdd + Relu', 'Conv2D + BiasAdd + Relu6']
uint8: [
'Conv2D + BiasAdd + AddN + Relu',
'Conv2D + BiasAdd + AddN + Relu6',
