mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
+1
-1
@@ -1,7 +1,7 @@
|
||||
import timm
|
||||
import torch.nn as nn
|
||||
from .utils import activations, forward_default, get_activation
|
||||
from ..external.next_vit.classification.nextvit import * # noqa
|
||||
from ..external.next_vit.classification.nextvit import *
|
||||
|
||||
|
||||
def forward_next_vit(pretrained, x):
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
|
||||
import torch
|
||||
|
||||
from ...common import compile_func, fp_mm_func # noqa: TID252
|
||||
from ...dequantizer import dequantize_symmetric, dequantize_symmetric_with_bias # noqa: TID252
|
||||
from ...quant_utils import rotate_hadamard, get_hadamard # noqa: TID252
|
||||
from ...packed_float import unpack_float # noqa: TID252
|
||||
from ...common import compile_func, fp_mm_func
|
||||
from ...dequantizer import dequantize_symmetric, dequantize_symmetric_with_bias
|
||||
from ...quant_utils import rotate_hadamard, get_hadamard
|
||||
from ...packed_float import unpack_float
|
||||
|
||||
from .forward import get_conv_args, process_conv_input
|
||||
from ..linear.linear_fp8_tensorwise import quantize_fp_mm_input_tensorwise # noqa: TID252
|
||||
from ..linear.forward import check_mats # noqa: TID252
|
||||
from ..linear.linear_fp8_tensorwise import quantize_fp_mm_input_tensorwise
|
||||
from ..linear.forward import check_mats
|
||||
|
||||
|
||||
def conv_fp16_matmul(
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
import torch
|
||||
|
||||
from ...common import compile_func # noqa: TID252
|
||||
from ...quant_utils import rotate_hadamard, get_hadamard # noqa: TID252
|
||||
from ...packed_float import unpack_float # noqa: TID252
|
||||
from ...common import compile_func
|
||||
from ...quant_utils import rotate_hadamard, get_hadamard
|
||||
from ...packed_float import unpack_float
|
||||
|
||||
from .forward import get_conv_args, process_conv_input
|
||||
from ..linear.linear_fp8 import quantize_fp_mm_input # noqa: TID252
|
||||
from ..linear.forward import check_mats # noqa: TID252
|
||||
from ..linear.linear_fp8 import quantize_fp_mm_input
|
||||
from ..linear.forward import check_mats
|
||||
|
||||
|
||||
def conv_fp8_matmul(
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
|
||||
import torch
|
||||
|
||||
from ...common import compile_func # noqa: TID252
|
||||
from ...dequantizer import dequantize_symmetric, dequantize_symmetric_with_bias # noqa: TID252
|
||||
from ...quant_utils import rotate_hadamard, get_hadamard # noqa: TID252
|
||||
from ...packed_float import unpack_float # noqa: TID252
|
||||
from ...common import compile_func
|
||||
from ...dequantizer import dequantize_symmetric, dequantize_symmetric_with_bias
|
||||
from ...quant_utils import rotate_hadamard, get_hadamard
|
||||
from ...packed_float import unpack_float
|
||||
|
||||
from .forward import get_conv_args, process_conv_input
|
||||
from ..linear.linear_fp8_tensorwise import quantize_fp_mm_input_tensorwise # noqa: TID252
|
||||
from ..linear.forward import check_mats # noqa: TID252
|
||||
from ..linear.linear_fp8_tensorwise import quantize_fp_mm_input_tensorwise
|
||||
from ..linear.forward import check_mats
|
||||
|
||||
|
||||
def conv_fp8_matmul_tensorwise(
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
|
||||
import torch
|
||||
|
||||
from ...common import compile_func, int_mm_func # noqa: TID252
|
||||
from ...dequantizer import dequantize_symmetric, dequantize_symmetric_with_bias # noqa: TID252
|
||||
from ...quant_utils import rotate_hadamard, get_hadamard # noqa: TID252
|
||||
from ...packed_int import unpack_int # noqa: TID252
|
||||
from ...common import compile_func, int_mm_func
|
||||
from ...dequantizer import dequantize_symmetric, dequantize_symmetric_with_bias
|
||||
from ...quant_utils import rotate_hadamard, get_hadamard
|
||||
from ...packed_int import unpack_int
|
||||
|
||||
from .forward import get_conv_args, process_conv_input
|
||||
from ..linear.linear_int8 import quantize_int_mm_input # noqa: TID252
|
||||
from ..linear.forward import check_mats # noqa: TID252
|
||||
from ..linear.linear_int8 import quantize_int_mm_input
|
||||
from ..linear.forward import check_mats
|
||||
|
||||
|
||||
def conv_int8_matmul(
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
import torch
|
||||
|
||||
from ...common import dtype_dict, compile_func # noqa: TID252
|
||||
from ...dequantizer import dequantize_symmetric, dequantize_asymmetric # noqa: TID252
|
||||
from ...quant_utils import get_hadamard # noqa: TID252
|
||||
from ...packed_int import unpack_int # noqa: TID252
|
||||
from ...packed_float import unpack_float # noqa: TID252
|
||||
from ...common import dtype_dict, compile_func
|
||||
from ...dequantizer import dequantize_symmetric, dequantize_asymmetric
|
||||
from ...quant_utils import get_hadamard
|
||||
from ...packed_int import unpack_int
|
||||
from ...packed_float import unpack_float
|
||||
|
||||
|
||||
def quantized_embedding(
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import torch
|
||||
|
||||
from ...common import use_contiguous_mm # noqa: TID252
|
||||
from ...common import use_contiguous_mm
|
||||
|
||||
|
||||
def check_mats(input: torch.Tensor, weight: torch.Tensor, allow_contiguous_mm: bool = True) -> tuple[torch.Tensor, torch.Tensor]:
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
import torch
|
||||
|
||||
from ...common import compile_func, fp_mm_func # noqa: TID252
|
||||
from ...dequantizer import dequantize_symmetric, dequantize_symmetric_with_bias # noqa: TID252
|
||||
from ...quant_utils import rotate_hadamard, get_hadamard # noqa: TID252
|
||||
from ...packed_float import unpack_float # noqa: TID252
|
||||
from ...common import compile_func, fp_mm_func
|
||||
from ...dequantizer import dequantize_symmetric, dequantize_symmetric_with_bias
|
||||
from ...quant_utils import rotate_hadamard, get_hadamard
|
||||
from ...packed_float import unpack_float
|
||||
|
||||
from .forward import check_mats
|
||||
from .linear_fp8_tensorwise import quantize_fp_mm_input_tensorwise
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
import torch
|
||||
|
||||
from ...common import compile_func # noqa: TID252
|
||||
from ...quant_utils import quantize_fp_mm, rotate_hadamard, get_hadamard # noqa: TID252
|
||||
from ...packed_float import unpack_float # noqa: TID252
|
||||
from ...common import compile_func
|
||||
from ...quant_utils import quantize_fp_mm, rotate_hadamard, get_hadamard
|
||||
from ...packed_float import unpack_float
|
||||
|
||||
from .forward import check_mats
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
import torch
|
||||
|
||||
from ...common import compile_func # noqa: TID252
|
||||
from ...dequantizer import dequantize_symmetric, dequantize_symmetric_with_bias # noqa: TID252
|
||||
from ...quant_utils import quantize_fp_mm, rotate_hadamard, get_hadamard # noqa: TID252
|
||||
from ...packed_float import unpack_float # noqa: TID252
|
||||
from ...common import compile_func
|
||||
from ...dequantizer import dequantize_symmetric, dequantize_symmetric_with_bias
|
||||
from ...quant_utils import quantize_fp_mm, rotate_hadamard, get_hadamard
|
||||
from ...packed_float import unpack_float
|
||||
|
||||
from .forward import check_mats
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
import torch
|
||||
|
||||
from ...common import compile_func, int_mm_func # noqa: TID252
|
||||
from ...dequantizer import dequantize_symmetric, dequantize_symmetric_with_bias # noqa: TID252
|
||||
from ...quant_utils import quantize_int_mm, rotate_hadamard, get_hadamard # noqa: TID252
|
||||
from ...packed_int import unpack_int # noqa: TID252
|
||||
from ...common import compile_func, int_mm_func
|
||||
from ...dequantizer import dequantize_symmetric, dequantize_symmetric_with_bias
|
||||
from ...quant_utils import quantize_int_mm, rotate_hadamard, get_hadamard
|
||||
from ...packed_int import unpack_int
|
||||
|
||||
from .forward import check_mats
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import torch
|
||||
|
||||
from ..common import dtype_dict # noqa: TID252
|
||||
from ..common import dtype_dict
|
||||
|
||||
from .pack import (
|
||||
pack_uint15,
|
||||
|
||||
@@ -68,6 +68,7 @@ ignore = [
|
||||
"RUF022", # All is not sorted
|
||||
"RUF046", # Value being cast to `int` is already an integer
|
||||
"RUF051", # Prefer pop over del
|
||||
"TID252", # Relative imports in vendored code
|
||||
]
|
||||
fixable = ["ALL"]
|
||||
unfixable = []
|
||||
|
||||
Reference in New Issue
Block a user