From f3466a2a3da26e1100974e632652e59eaa7acc50 Mon Sep 17 00:00:00 2001 From: Luka Macan Date: Fri, 6 Dec 2024 07:46:26 +0100 Subject: [PATCH] Fix allowed types for neureka_v2 Neureka_v2 uses signed 8-bit scales. It should also support signed 32-bit scales but it is not tested. Also for the output type, I have removed the 32-bit unquantized output for now because there were some issues with the spatial strides (height and width). There was the issue that output stride in the previous neureka was multiplied with the number of output bytes, but in neureka_v2 it seems that gets done in the accelerator, at least by the look of the model. But when I tried with that change, the whole thing broke. The output offsets were correct but still got all the wrong results so I guess the output strides affect some other parts of the model which I am not aware of. --- test/NeurekaV2TestConf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/NeurekaV2TestConf.py b/test/NeurekaV2TestConf.py index 561f365..0cfe6aa 100644 --- a/test/NeurekaV2TestConf.py +++ b/test/NeurekaV2TestConf.py @@ -59,7 +59,7 @@ def check_valid_in_type(cls, v: IntegerType) -> IntegerType: @field_validator("out_type") @classmethod def check_valid_out_type(cls, v: IntegerType) -> IntegerType: - NeurekaV2TestConf._check_type("out_type", v, ["uint8", "int8", "int32"]) + NeurekaV2TestConf._check_type("out_type", v, ["uint8", "int8"]) return v @field_validator("weight_type") @@ -72,7 +72,7 @@ def check_valid_weight_type(cls, v: IntegerType) -> IntegerType: @classmethod def check_valid_scale_type(cls, v: Optional[IntegerType]) -> Optional[IntegerType]: if v is not None: - NeurekaV2TestConf._check_type("scale_type", v, ["uint8", "uint32"]) + NeurekaV2TestConf._check_type("scale_type", v, ["int8"]) return v @field_validator("bias_type")