[Bugfix][Quantization] Fix MXFP8 startup crash on layers below mm_mxfp8 shape limits (#54223)
Signed-off-by: samuelkim7 <samuelmwkim@gmail.com> Signed-off-by: mgoin <mgoin64@gmail.com> Co-authored-by: mgoin <mgoin64@gmail.com>
This commit is contained in:
@@ -17,9 +17,6 @@ from .inc_scheme import INCLinearScheme
|
||||
|
||||
|
||||
class INCMxfp8LinearScheme(INCLinearScheme):
|
||||
def __init__(self) -> None:
|
||||
self.kernel = init_mxfp8_linear_kernel()
|
||||
|
||||
@classmethod
|
||||
def get_min_capability(cls) -> int:
|
||||
return 75
|
||||
@@ -72,6 +69,8 @@ class INCMxfp8LinearScheme(INCLinearScheme):
|
||||
)
|
||||
layer.register_parameter("weight_scale", weight_scale)
|
||||
|
||||
self.kernel = init_mxfp8_linear_kernel(weight_shape=layer.weight.shape)
|
||||
|
||||
def process_weights_after_loading(self, layer: torch.nn.Module) -> None:
|
||||
self.kernel.process_weights_after_loading(layer)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user