Commit 82661877 authored by helloyongyang's avatar helloyongyang
Browse files

update quant utils

parent 7423e576
import torch import torch
from qtorch.quant import float_quantize
from loguru import logger from loguru import logger
try:
from qtorch.quant import float_quantize
except Exception:
logger.warning("qtorch not found, please install qtorch.Please install qtorch (pip install qtorch).")
float_quantize = None
class BaseQuantizer(object): class BaseQuantizer(object):
def __init__(self, bit, symmetric, granularity, **kwargs): def __init__(self, bit, symmetric, granularity, **kwargs):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment