Skip to content

Commit

Permalink
Rebased from develop
Browse files Browse the repository at this point in the history
Signed-off-by: Seokjun An <quic_seokan@quicinc.com>
  • Loading branch information
quic-seokan authored and neoci committed Jan 24, 2024
1 parent 83787b9 commit 3e4cd74
Show file tree
Hide file tree
Showing 6 changed files with 276 additions and 1,241 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
# pylint: skip-file
""" Placeholder for _QuantizationMixin definition, to be deleted/moved/updated """

from abc import ABC, abstractmethod
from typing import Union, Tuple, Iterable, Optional, Mapping
from dataclasses import dataclass
from torch import nn
Expand All @@ -60,21 +59,30 @@ class _ModuleSpec:
output_spec: Iterable[Optional[_TensorSpec]]


class _QuantizationMixin(ABC):
class _QuantizationMixin:
""" Base class for quantized modules """

@classmethod
def from_module(cls, module: nn.Module, spec: _ModuleSpec) -> Union['_QuantizationMixin', nn.Module]:
...

@abstractmethod
def input_quantizers(self):
...

@abstractmethod
def output_quantizers(self):
...

@abstractmethod
def param_quantizers(self):
...
...

def export_input_encodings(self):
...

def export_output_encodings(self):
...

def export_param_encodings(self):
...

def get_original_module(self):
...
Loading

0 comments on commit 3e4cd74

Please sign in to comment.