Skip to content

Commit

Permalink
Add FloatAddChecker to CI (and make it work again, if possible)
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancescoConti committed Nov 13, 2024
1 parent b6cf6fa commit 35d2fa5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
testRequantizedDWConv
test2DRequantizedConv
iSoftmax
testFloatAdder
generic-models:
uses: ./.github/workflows/TestRunnerGeneric.yml
Expand Down Expand Up @@ -149,6 +150,7 @@ jobs:
Hardswish
RQHardswish
testBacktracking
testFloatAdder
num-cores: 8

siracusa-models:
Expand Down
12 changes: 10 additions & 2 deletions Deeploy/Targets/Generic/TypeCheckers.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

from Deeploy.AbstractDataTypes import Pointer
from Deeploy.CommonExtensions.TypeCheckers.SignPropTypeChecker import SignPropTypeChecker
from Deeploy.DeeployTypes import ConstantBuffer, NodeTypeChecker, OperatorRepresentation, VariableBuffer
from Deeploy.DeeployTypes import ConstantBuffer, OperatorRepresentation, VariableBuffer


class ConcatChecker(SignPropTypeChecker):
Expand Down Expand Up @@ -125,11 +125,19 @@ def _inferSignedness(self, inputs: List[VariableBuffer],
return [False]


class FloatAddChecker(NodeTypeChecker):
class FloatAddChecker(SignPropTypeChecker):

def __init__(self, input_types: Sequence[Type[Pointer]], output_types: Sequence[Type[Pointer]]):
super().__init__(input_types, output_types)

def _inferNumLevels(self, inputs: List[VariableBuffer],
operatorRepresentation: OperatorRepresentation) -> List[int]:
return [inputs[0].nLevels + inputs[1].nLevels]

def _inferSignedness(self, inputs: List[VariableBuffer],
operatorRepresentation: OperatorRepresentation) -> List[bool]:
return [True]


class GatherChecker(SignPropTypeChecker):

Expand Down

0 comments on commit 35d2fa5

Please sign in to comment.