Bases: parameterized_concatenation_fusion
Source code in tinybig/fusion/parameterized_concatenation_fusion.py
| class hm_parameterized_concatenation_fusion(parameterized_concatenation_fusion):
def __init__(self, p: int, q: int = None, name: str = 'hm_parameterized_concatenation_fusion', *args, **kwargs):
super().__init__(name=name, *args, **kwargs)
self.p = p
self.q = q if q is not None else p
assert self.n is not None and self.n % self.p == 0
assert self.dims is not None and sum(self.dims) % self.q == 0
self.parameter_fabrication = hm_reconciliation(p=self.p, q=self.q)
|