You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"4D/5D tensor only supports per tensor activation and weight quantization"
1842
+
)
1836
1843
1837
-
elifnot_fp8_mm_compat(weight):
1838
-
# TODO(future PR): this should really throw an exception instead of silently
1839
-
# not doing what the user asked
1840
-
returnweight
1844
+
# conv3d weight dim: (C_out, C_in, K1, K2, K3)
1845
+
# conv2d weight dim: (C_out, C_in, K1, K2)
1846
+
# skip quantization when either C_out or C_in
1847
+
# is not a multiple of 16
1848
+
ifweight.shape[0] %16!=0orweight.shape[1] %16!=0:
1849
+
returnweight
1841
1850
1842
-
ifisinstance(weight_granularity, PerRow):
1843
-
assertweight.dtype==torch.bfloat16, (
1844
-
"PerRow quantization only works for bfloat16 precision input weight"
1845
-
)
1851
+
elifnot_fp8_mm_compat(weight):
1852
+
# TODO(future PR): this should really throw an exception instead of silently
1853
+
# not doing what the user asked
1854
+
returnweight
1855
+
1856
+
ifisinstance(weight_granularity, PerRow):
1857
+
assertweight.dtype==torch.bfloat16, (
1858
+
"PerRow quantization only works for bfloat16 precision input weight"
1859
+
)
1846
1860
1847
1861
ifconfig.version==1:
1848
1862
warnings.warn(
1849
1863
"Config Deprecation: version 1 of Float8DynamicActivationFloat8WeightConfig is deprecated and will no longer be supported in a future release, please use version 2, see https://github.com/pytorch/ao/issues/2649 for more details"
0 commit comments