Build (x86_64)
Browse files- build/torch26-cxx11-cu118-x86_64-linux/quantization/__init__.py +9 -0
- build/torch26-cxx11-cu118-x86_64-linux/quantization/_ops.py +3 -3
- build/torch26-cxx11-cu118-x86_64-linux/quantization/{_quantization_e8730d8_dirty.abi3.so → _quantization_dfa7d18.abi3.so} +2 -2
- build/torch26-cxx11-cu118-x86_64-linux/quantization/compressed_tensors.py +3 -1
- build/torch26-cxx11-cu118-x86_64-linux/quantization/platforms.py +35 -0
- build/torch26-cxx11-cu124-x86_64-linux/quantization/__init__.py +9 -0
- build/torch26-cxx11-cu124-x86_64-linux/quantization/_ops.py +3 -3
- build/torch26-cxx11-cu124-x86_64-linux/quantization/{_quantization_e8730d8_dirty.abi3.so → _quantization_dfa7d18.abi3.so} +2 -2
- build/torch26-cxx11-cu124-x86_64-linux/quantization/compressed_tensors.py +3 -1
- build/torch26-cxx11-cu124-x86_64-linux/quantization/platforms.py +35 -0
- build/torch26-cxx11-cu126-x86_64-linux/quantization/__init__.py +9 -0
- build/torch26-cxx11-cu126-x86_64-linux/quantization/_ops.py +3 -3
- build/torch26-cxx11-cu126-x86_64-linux/quantization/{_quantization_e8730d8_dirty.abi3.so → _quantization_dfa7d18.abi3.so} +2 -2
- build/torch26-cxx11-cu126-x86_64-linux/quantization/compressed_tensors.py +3 -1
- build/torch26-cxx11-cu126-x86_64-linux/quantization/platforms.py +35 -0
- build/torch26-cxx98-cu118-x86_64-linux/quantization/__init__.py +9 -0
- build/torch26-cxx98-cu118-x86_64-linux/quantization/_ops.py +3 -3
- build/torch26-cxx98-cu118-x86_64-linux/quantization/{_quantization_e8730d8_dirty.abi3.so → _quantization_dfa7d18.abi3.so} +2 -2
- build/torch26-cxx98-cu118-x86_64-linux/quantization/compressed_tensors.py +3 -1
- build/torch26-cxx98-cu118-x86_64-linux/quantization/platforms.py +35 -0
- build/torch26-cxx98-cu124-x86_64-linux/quantization/__init__.py +9 -0
- build/torch26-cxx98-cu124-x86_64-linux/quantization/_ops.py +3 -3
- build/torch26-cxx98-cu124-x86_64-linux/quantization/_quantization_dfa7d18.abi3.so +3 -0
- build/torch26-cxx98-cu124-x86_64-linux/quantization/_quantization_e8730d8_dirty.abi3.so +0 -3
- build/torch26-cxx98-cu124-x86_64-linux/quantization/compressed_tensors.py +3 -1
- build/torch26-cxx98-cu124-x86_64-linux/quantization/platforms.py +35 -0
- build/torch26-cxx98-cu126-x86_64-linux/quantization/__init__.py +9 -0
- build/torch26-cxx98-cu126-x86_64-linux/quantization/_ops.py +3 -3
- build/torch26-cxx98-cu126-x86_64-linux/quantization/_quantization_dfa7d18.abi3.so +3 -0
- build/torch26-cxx98-cu126-x86_64-linux/quantization/_quantization_e8730d8_dirty.abi3.so +0 -3
- build/torch26-cxx98-cu126-x86_64-linux/quantization/compressed_tensors.py +3 -1
- build/torch26-cxx98-cu126-x86_64-linux/quantization/platforms.py +35 -0
- build/torch27-cxx11-cu118-x86_64-linux/quantization/__init__.py +9 -0
- build/torch27-cxx11-cu118-x86_64-linux/quantization/_ops.py +3 -3
- build/torch27-cxx11-cu118-x86_64-linux/quantization/_quantization_dfa7d18.abi3.so +3 -0
- build/torch27-cxx11-cu118-x86_64-linux/quantization/_quantization_e8730d8_dirty.abi3.so +0 -3
- build/torch27-cxx11-cu118-x86_64-linux/quantization/compressed_tensors.py +3 -1
- build/torch27-cxx11-cu118-x86_64-linux/quantization/platforms.py +35 -0
- build/torch27-cxx11-cu126-x86_64-linux/quantization/__init__.py +9 -0
- build/torch27-cxx11-cu126-x86_64-linux/quantization/_ops.py +3 -3
- build/torch27-cxx11-cu126-x86_64-linux/quantization/_quantization_dfa7d18.abi3.so +3 -0
- build/torch27-cxx11-cu126-x86_64-linux/quantization/_quantization_e8730d8_dirty.abi3.so +0 -3
- build/torch27-cxx11-cu126-x86_64-linux/quantization/compressed_tensors.py +3 -1
- build/torch27-cxx11-cu126-x86_64-linux/quantization/platforms.py +35 -0
- build/torch27-cxx11-cu128-x86_64-linux/quantization/__init__.py +9 -0
- build/torch27-cxx11-cu128-x86_64-linux/quantization/_ops.py +3 -3
- build/torch27-cxx11-cu128-x86_64-linux/quantization/_quantization_dfa7d18.abi3.so +3 -0
- build/torch27-cxx11-cu128-x86_64-linux/quantization/_quantization_e8730d8_dirty.abi3.so +0 -3
- build/torch27-cxx11-cu128-x86_64-linux/quantization/compressed_tensors.py +3 -1
- build/torch27-cxx11-cu128-x86_64-linux/quantization/platforms.py +35 -0
build/torch26-cxx11-cu118-x86_64-linux/quantization/__init__.py
CHANGED
@@ -19,6 +19,11 @@ from .scalar_type import (
|
|
19 |
)
|
20 |
from ._ops import ops
|
21 |
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
__all__ = [
|
24 |
"ScalarType",
|
@@ -32,7 +37,11 @@ __all__ = [
|
|
32 |
"gptq_marlin_repack",
|
33 |
"marlin_gemm",
|
34 |
"marlin_qqq_gemm",
|
|
|
|
|
|
|
35 |
"ops",
|
|
|
36 |
"scalar_types",
|
37 |
"scaled_fp8_quant",
|
38 |
"scaled_int8_quant",
|
|
|
19 |
)
|
20 |
from ._ops import ops
|
21 |
|
22 |
+
from .utils import marlin_utils
|
23 |
+
from .utils import marlin_utils_fp4
|
24 |
+
from .utils import marlin_utils_fp8
|
25 |
+
from .utils import quant_utils
|
26 |
+
|
27 |
|
28 |
__all__ = [
|
29 |
"ScalarType",
|
|
|
37 |
"gptq_marlin_repack",
|
38 |
"marlin_gemm",
|
39 |
"marlin_qqq_gemm",
|
40 |
+
"marlin_utils",
|
41 |
+
"marlin_utils_fp4",
|
42 |
+
"marlin_utils_fp8",
|
43 |
"ops",
|
44 |
+
"quant_utils",
|
45 |
"scalar_types",
|
46 |
"scaled_fp8_quant",
|
47 |
"scaled_int8_quant",
|
build/torch26-cxx11-cu118-x86_64-linux/quantization/_ops.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
import torch
|
2 |
-
from . import
|
3 |
-
ops = torch.ops.
|
4 |
|
5 |
def add_op_namespace_prefix(op_name: str):
|
6 |
"""
|
7 |
Prefix op by namespace.
|
8 |
"""
|
9 |
-
return f"
|
|
|
1 |
import torch
|
2 |
+
from . import _quantization_dfa7d18
|
3 |
+
ops = torch.ops._quantization_dfa7d18
|
4 |
|
5 |
def add_op_namespace_prefix(op_name: str):
|
6 |
"""
|
7 |
Prefix op by namespace.
|
8 |
"""
|
9 |
+
return f"_quantization_dfa7d18::{op_name}"
|
build/torch26-cxx11-cu118-x86_64-linux/quantization/{_quantization_e8730d8_dirty.abi3.so → _quantization_dfa7d18.abi3.so}
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:05b3dbcc1c3200458ec526bc95169a8b286704dbbfe93b1b5bb580d490be4f3d
|
3 |
+
size 155751904
|
build/torch26-cxx11-cu118-x86_64-linux/quantization/compressed_tensors.py
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
-
from typing import Optional,
|
2 |
|
3 |
import torch
|
4 |
|
5 |
from ._ops import ops
|
|
|
|
|
6 |
|
7 |
# fp8
|
8 |
def scaled_fp8_quant(
|
|
|
1 |
+
from typing import Optional, Union
|
2 |
|
3 |
import torch
|
4 |
|
5 |
from ._ops import ops
|
6 |
+
from .platforms import current_platform
|
7 |
+
|
8 |
|
9 |
# fp8
|
10 |
def scaled_fp8_quant(
|
build/torch26-cxx11-cu118-x86_64-linux/quantization/platforms.py
CHANGED
@@ -27,6 +27,29 @@ class DeviceCapability(NamedTuple):
|
|
27 |
class Platform(ABC):
|
28 |
simple_compile_backend: str = "inductor"
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
@classmethod
|
31 |
@abstractmethod
|
32 |
def get_device_name(cls, device_id: int = 0) -> str: ...
|
@@ -51,6 +74,18 @@ class CudaPlatform(Platform):
|
|
51 |
|
52 |
|
53 |
class RocmPlatform(Platform):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
@classmethod
|
55 |
@lru_cache(maxsize=8)
|
56 |
def get_device_capability(cls, device_id: int = 0) -> DeviceCapability:
|
|
|
27 |
class Platform(ABC):
|
28 |
simple_compile_backend: str = "inductor"
|
29 |
|
30 |
+
@classmethod
|
31 |
+
def fp8_dtype(cls) -> torch.dtype:
|
32 |
+
"""
|
33 |
+
Returns the preferred FP8 type on the current platform.
|
34 |
+
|
35 |
+
See the documentation for is_fp8_fnuz for details.
|
36 |
+
"""
|
37 |
+
return torch.float8_e4m3fn
|
38 |
+
|
39 |
+
@classmethod
|
40 |
+
def is_fp8_fnuz(cls) -> bool:
|
41 |
+
"""
|
42 |
+
Returns whether the preferred FP8 type is FNUZ on the current platform.
|
43 |
+
|
44 |
+
There are two representations of FP8, OCP FP8 and FNUZ FP8.
|
45 |
+
The OCP specification can be found at https://tinyurl.com/b7jvwpft.
|
46 |
+
The FNUZ specification can be found at https://tinyurl.com/5n6hwwu5.
|
47 |
+
|
48 |
+
AMD's MI300 and MI325 have native hardware support for FNUZ. All other
|
49 |
+
hardware has converged on the OCP FP8 standard.
|
50 |
+
"""
|
51 |
+
return False
|
52 |
+
|
53 |
@classmethod
|
54 |
@abstractmethod
|
55 |
def get_device_name(cls, device_id: int = 0) -> str: ...
|
|
|
74 |
|
75 |
|
76 |
class RocmPlatform(Platform):
|
77 |
+
@classmethod
|
78 |
+
def fp8_dtype(cls) -> torch.dtype:
|
79 |
+
if cls.is_fp8_fnuz():
|
80 |
+
return torch.float8_e4m3fnuz
|
81 |
+
else:
|
82 |
+
return torch.float8_e4m3fn
|
83 |
+
|
84 |
+
@classmethod
|
85 |
+
def is_fp8_fnuz(cls) -> bool:
|
86 |
+
# only device 0 is checked, this assumes MI300 platforms are homogeneous
|
87 |
+
return "gfx94" in torch.cuda.get_device_properties(0).gcnArchName
|
88 |
+
|
89 |
@classmethod
|
90 |
@lru_cache(maxsize=8)
|
91 |
def get_device_capability(cls, device_id: int = 0) -> DeviceCapability:
|
build/torch26-cxx11-cu124-x86_64-linux/quantization/__init__.py
CHANGED
@@ -19,6 +19,11 @@ from .scalar_type import (
|
|
19 |
)
|
20 |
from ._ops import ops
|
21 |
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
__all__ = [
|
24 |
"ScalarType",
|
@@ -32,7 +37,11 @@ __all__ = [
|
|
32 |
"gptq_marlin_repack",
|
33 |
"marlin_gemm",
|
34 |
"marlin_qqq_gemm",
|
|
|
|
|
|
|
35 |
"ops",
|
|
|
36 |
"scalar_types",
|
37 |
"scaled_fp8_quant",
|
38 |
"scaled_int8_quant",
|
|
|
19 |
)
|
20 |
from ._ops import ops
|
21 |
|
22 |
+
from .utils import marlin_utils
|
23 |
+
from .utils import marlin_utils_fp4
|
24 |
+
from .utils import marlin_utils_fp8
|
25 |
+
from .utils import quant_utils
|
26 |
+
|
27 |
|
28 |
__all__ = [
|
29 |
"ScalarType",
|
|
|
37 |
"gptq_marlin_repack",
|
38 |
"marlin_gemm",
|
39 |
"marlin_qqq_gemm",
|
40 |
+
"marlin_utils",
|
41 |
+
"marlin_utils_fp4",
|
42 |
+
"marlin_utils_fp8",
|
43 |
"ops",
|
44 |
+
"quant_utils",
|
45 |
"scalar_types",
|
46 |
"scaled_fp8_quant",
|
47 |
"scaled_int8_quant",
|
build/torch26-cxx11-cu124-x86_64-linux/quantization/_ops.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
import torch
|
2 |
-
from . import
|
3 |
-
ops = torch.ops.
|
4 |
|
5 |
def add_op_namespace_prefix(op_name: str):
|
6 |
"""
|
7 |
Prefix op by namespace.
|
8 |
"""
|
9 |
-
return f"
|
|
|
1 |
import torch
|
2 |
+
from . import _quantization_dfa7d18
|
3 |
+
ops = torch.ops._quantization_dfa7d18
|
4 |
|
5 |
def add_op_namespace_prefix(op_name: str):
|
6 |
"""
|
7 |
Prefix op by namespace.
|
8 |
"""
|
9 |
+
return f"_quantization_dfa7d18::{op_name}"
|
build/torch26-cxx11-cu124-x86_64-linux/quantization/{_quantization_e8730d8_dirty.abi3.so → _quantization_dfa7d18.abi3.so}
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b5dc49e9b5709f18d3e12ab2d76e37743c31cb2602d219e80173a9c5c0ba1acd
|
3 |
+
size 159574040
|
build/torch26-cxx11-cu124-x86_64-linux/quantization/compressed_tensors.py
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
-
from typing import Optional,
|
2 |
|
3 |
import torch
|
4 |
|
5 |
from ._ops import ops
|
|
|
|
|
6 |
|
7 |
# fp8
|
8 |
def scaled_fp8_quant(
|
|
|
1 |
+
from typing import Optional, Union
|
2 |
|
3 |
import torch
|
4 |
|
5 |
from ._ops import ops
|
6 |
+
from .platforms import current_platform
|
7 |
+
|
8 |
|
9 |
# fp8
|
10 |
def scaled_fp8_quant(
|
build/torch26-cxx11-cu124-x86_64-linux/quantization/platforms.py
CHANGED
@@ -27,6 +27,29 @@ class DeviceCapability(NamedTuple):
|
|
27 |
class Platform(ABC):
|
28 |
simple_compile_backend: str = "inductor"
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
@classmethod
|
31 |
@abstractmethod
|
32 |
def get_device_name(cls, device_id: int = 0) -> str: ...
|
@@ -51,6 +74,18 @@ class CudaPlatform(Platform):
|
|
51 |
|
52 |
|
53 |
class RocmPlatform(Platform):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
@classmethod
|
55 |
@lru_cache(maxsize=8)
|
56 |
def get_device_capability(cls, device_id: int = 0) -> DeviceCapability:
|
|
|
27 |
class Platform(ABC):
|
28 |
simple_compile_backend: str = "inductor"
|
29 |
|
30 |
+
@classmethod
|
31 |
+
def fp8_dtype(cls) -> torch.dtype:
|
32 |
+
"""
|
33 |
+
Returns the preferred FP8 type on the current platform.
|
34 |
+
|
35 |
+
See the documentation for is_fp8_fnuz for details.
|
36 |
+
"""
|
37 |
+
return torch.float8_e4m3fn
|
38 |
+
|
39 |
+
@classmethod
|
40 |
+
def is_fp8_fnuz(cls) -> bool:
|
41 |
+
"""
|
42 |
+
Returns whether the preferred FP8 type is FNUZ on the current platform.
|
43 |
+
|
44 |
+
There are two representations of FP8, OCP FP8 and FNUZ FP8.
|
45 |
+
The OCP specification can be found at https://tinyurl.com/b7jvwpft.
|
46 |
+
The FNUZ specification can be found at https://tinyurl.com/5n6hwwu5.
|
47 |
+
|
48 |
+
AMD's MI300 and MI325 have native hardware support for FNUZ. All other
|
49 |
+
hardware has converged on the OCP FP8 standard.
|
50 |
+
"""
|
51 |
+
return False
|
52 |
+
|
53 |
@classmethod
|
54 |
@abstractmethod
|
55 |
def get_device_name(cls, device_id: int = 0) -> str: ...
|
|
|
74 |
|
75 |
|
76 |
class RocmPlatform(Platform):
|
77 |
+
@classmethod
|
78 |
+
def fp8_dtype(cls) -> torch.dtype:
|
79 |
+
if cls.is_fp8_fnuz():
|
80 |
+
return torch.float8_e4m3fnuz
|
81 |
+
else:
|
82 |
+
return torch.float8_e4m3fn
|
83 |
+
|
84 |
+
@classmethod
|
85 |
+
def is_fp8_fnuz(cls) -> bool:
|
86 |
+
# only device 0 is checked, this assumes MI300 platforms are homogeneous
|
87 |
+
return "gfx94" in torch.cuda.get_device_properties(0).gcnArchName
|
88 |
+
|
89 |
@classmethod
|
90 |
@lru_cache(maxsize=8)
|
91 |
def get_device_capability(cls, device_id: int = 0) -> DeviceCapability:
|
build/torch26-cxx11-cu126-x86_64-linux/quantization/__init__.py
CHANGED
@@ -19,6 +19,11 @@ from .scalar_type import (
|
|
19 |
)
|
20 |
from ._ops import ops
|
21 |
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
__all__ = [
|
24 |
"ScalarType",
|
@@ -32,7 +37,11 @@ __all__ = [
|
|
32 |
"gptq_marlin_repack",
|
33 |
"marlin_gemm",
|
34 |
"marlin_qqq_gemm",
|
|
|
|
|
|
|
35 |
"ops",
|
|
|
36 |
"scalar_types",
|
37 |
"scaled_fp8_quant",
|
38 |
"scaled_int8_quant",
|
|
|
19 |
)
|
20 |
from ._ops import ops
|
21 |
|
22 |
+
from .utils import marlin_utils
|
23 |
+
from .utils import marlin_utils_fp4
|
24 |
+
from .utils import marlin_utils_fp8
|
25 |
+
from .utils import quant_utils
|
26 |
+
|
27 |
|
28 |
__all__ = [
|
29 |
"ScalarType",
|
|
|
37 |
"gptq_marlin_repack",
|
38 |
"marlin_gemm",
|
39 |
"marlin_qqq_gemm",
|
40 |
+
"marlin_utils",
|
41 |
+
"marlin_utils_fp4",
|
42 |
+
"marlin_utils_fp8",
|
43 |
"ops",
|
44 |
+
"quant_utils",
|
45 |
"scalar_types",
|
46 |
"scaled_fp8_quant",
|
47 |
"scaled_int8_quant",
|
build/torch26-cxx11-cu126-x86_64-linux/quantization/_ops.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
import torch
|
2 |
-
from . import
|
3 |
-
ops = torch.ops.
|
4 |
|
5 |
def add_op_namespace_prefix(op_name: str):
|
6 |
"""
|
7 |
Prefix op by namespace.
|
8 |
"""
|
9 |
-
return f"
|
|
|
1 |
import torch
|
2 |
+
from . import _quantization_dfa7d18
|
3 |
+
ops = torch.ops._quantization_dfa7d18
|
4 |
|
5 |
def add_op_namespace_prefix(op_name: str):
|
6 |
"""
|
7 |
Prefix op by namespace.
|
8 |
"""
|
9 |
+
return f"_quantization_dfa7d18::{op_name}"
|
build/torch26-cxx11-cu126-x86_64-linux/quantization/{_quantization_e8730d8_dirty.abi3.so → _quantization_dfa7d18.abi3.so}
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:af7fad3054f0981d175aa7dcabf9dbe3c556ba0dcee7f20a2c104abd17dce7a5
|
3 |
+
size 160280624
|
build/torch26-cxx11-cu126-x86_64-linux/quantization/compressed_tensors.py
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
-
from typing import Optional,
|
2 |
|
3 |
import torch
|
4 |
|
5 |
from ._ops import ops
|
|
|
|
|
6 |
|
7 |
# fp8
|
8 |
def scaled_fp8_quant(
|
|
|
1 |
+
from typing import Optional, Union
|
2 |
|
3 |
import torch
|
4 |
|
5 |
from ._ops import ops
|
6 |
+
from .platforms import current_platform
|
7 |
+
|
8 |
|
9 |
# fp8
|
10 |
def scaled_fp8_quant(
|
build/torch26-cxx11-cu126-x86_64-linux/quantization/platforms.py
CHANGED
@@ -27,6 +27,29 @@ class DeviceCapability(NamedTuple):
|
|
27 |
class Platform(ABC):
|
28 |
simple_compile_backend: str = "inductor"
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
@classmethod
|
31 |
@abstractmethod
|
32 |
def get_device_name(cls, device_id: int = 0) -> str: ...
|
@@ -51,6 +74,18 @@ class CudaPlatform(Platform):
|
|
51 |
|
52 |
|
53 |
class RocmPlatform(Platform):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
@classmethod
|
55 |
@lru_cache(maxsize=8)
|
56 |
def get_device_capability(cls, device_id: int = 0) -> DeviceCapability:
|
|
|
27 |
class Platform(ABC):
|
28 |
simple_compile_backend: str = "inductor"
|
29 |
|
30 |
+
@classmethod
|
31 |
+
def fp8_dtype(cls) -> torch.dtype:
|
32 |
+
"""
|
33 |
+
Returns the preferred FP8 type on the current platform.
|
34 |
+
|
35 |
+
See the documentation for is_fp8_fnuz for details.
|
36 |
+
"""
|
37 |
+
return torch.float8_e4m3fn
|
38 |
+
|
39 |
+
@classmethod
|
40 |
+
def is_fp8_fnuz(cls) -> bool:
|
41 |
+
"""
|
42 |
+
Returns whether the preferred FP8 type is FNUZ on the current platform.
|
43 |
+
|
44 |
+
There are two representations of FP8, OCP FP8 and FNUZ FP8.
|
45 |
+
The OCP specification can be found at https://tinyurl.com/b7jvwpft.
|
46 |
+
The FNUZ specification can be found at https://tinyurl.com/5n6hwwu5.
|
47 |
+
|
48 |
+
AMD's MI300 and MI325 have native hardware support for FNUZ. All other
|
49 |
+
hardware has converged on the OCP FP8 standard.
|
50 |
+
"""
|
51 |
+
return False
|
52 |
+
|
53 |
@classmethod
|
54 |
@abstractmethod
|
55 |
def get_device_name(cls, device_id: int = 0) -> str: ...
|
|
|
74 |
|
75 |
|
76 |
class RocmPlatform(Platform):
|
77 |
+
@classmethod
|
78 |
+
def fp8_dtype(cls) -> torch.dtype:
|
79 |
+
if cls.is_fp8_fnuz():
|
80 |
+
return torch.float8_e4m3fnuz
|
81 |
+
else:
|
82 |
+
return torch.float8_e4m3fn
|
83 |
+
|
84 |
+
@classmethod
|
85 |
+
def is_fp8_fnuz(cls) -> bool:
|
86 |
+
# only device 0 is checked, this assumes MI300 platforms are homogeneous
|
87 |
+
return "gfx94" in torch.cuda.get_device_properties(0).gcnArchName
|
88 |
+
|
89 |
@classmethod
|
90 |
@lru_cache(maxsize=8)
|
91 |
def get_device_capability(cls, device_id: int = 0) -> DeviceCapability:
|
build/torch26-cxx98-cu118-x86_64-linux/quantization/__init__.py
CHANGED
@@ -19,6 +19,11 @@ from .scalar_type import (
|
|
19 |
)
|
20 |
from ._ops import ops
|
21 |
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
__all__ = [
|
24 |
"ScalarType",
|
@@ -32,7 +37,11 @@ __all__ = [
|
|
32 |
"gptq_marlin_repack",
|
33 |
"marlin_gemm",
|
34 |
"marlin_qqq_gemm",
|
|
|
|
|
|
|
35 |
"ops",
|
|
|
36 |
"scalar_types",
|
37 |
"scaled_fp8_quant",
|
38 |
"scaled_int8_quant",
|
|
|
19 |
)
|
20 |
from ._ops import ops
|
21 |
|
22 |
+
from .utils import marlin_utils
|
23 |
+
from .utils import marlin_utils_fp4
|
24 |
+
from .utils import marlin_utils_fp8
|
25 |
+
from .utils import quant_utils
|
26 |
+
|
27 |
|
28 |
__all__ = [
|
29 |
"ScalarType",
|
|
|
37 |
"gptq_marlin_repack",
|
38 |
"marlin_gemm",
|
39 |
"marlin_qqq_gemm",
|
40 |
+
"marlin_utils",
|
41 |
+
"marlin_utils_fp4",
|
42 |
+
"marlin_utils_fp8",
|
43 |
"ops",
|
44 |
+
"quant_utils",
|
45 |
"scalar_types",
|
46 |
"scaled_fp8_quant",
|
47 |
"scaled_int8_quant",
|
build/torch26-cxx98-cu118-x86_64-linux/quantization/_ops.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
import torch
|
2 |
-
from . import
|
3 |
-
ops = torch.ops.
|
4 |
|
5 |
def add_op_namespace_prefix(op_name: str):
|
6 |
"""
|
7 |
Prefix op by namespace.
|
8 |
"""
|
9 |
-
return f"
|
|
|
1 |
import torch
|
2 |
+
from . import _quantization_dfa7d18
|
3 |
+
ops = torch.ops._quantization_dfa7d18
|
4 |
|
5 |
def add_op_namespace_prefix(op_name: str):
|
6 |
"""
|
7 |
Prefix op by namespace.
|
8 |
"""
|
9 |
+
return f"_quantization_dfa7d18::{op_name}"
|
build/torch26-cxx98-cu118-x86_64-linux/quantization/{_quantization_e8730d8_dirty.abi3.so → _quantization_dfa7d18.abi3.so}
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9736b3b73f06d4fd9881fd417dbe72aa7e5e4cbc2845ca247b9427b2b7f2b858
|
3 |
+
size 155739832
|
build/torch26-cxx98-cu118-x86_64-linux/quantization/compressed_tensors.py
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
-
from typing import Optional,
|
2 |
|
3 |
import torch
|
4 |
|
5 |
from ._ops import ops
|
|
|
|
|
6 |
|
7 |
# fp8
|
8 |
def scaled_fp8_quant(
|
|
|
1 |
+
from typing import Optional, Union
|
2 |
|
3 |
import torch
|
4 |
|
5 |
from ._ops import ops
|
6 |
+
from .platforms import current_platform
|
7 |
+
|
8 |
|
9 |
# fp8
|
10 |
def scaled_fp8_quant(
|
build/torch26-cxx98-cu118-x86_64-linux/quantization/platforms.py
CHANGED
@@ -27,6 +27,29 @@ class DeviceCapability(NamedTuple):
|
|
27 |
class Platform(ABC):
|
28 |
simple_compile_backend: str = "inductor"
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
@classmethod
|
31 |
@abstractmethod
|
32 |
def get_device_name(cls, device_id: int = 0) -> str: ...
|
@@ -51,6 +74,18 @@ class CudaPlatform(Platform):
|
|
51 |
|
52 |
|
53 |
class RocmPlatform(Platform):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
@classmethod
|
55 |
@lru_cache(maxsize=8)
|
56 |
def get_device_capability(cls, device_id: int = 0) -> DeviceCapability:
|
|
|
27 |
class Platform(ABC):
|
28 |
simple_compile_backend: str = "inductor"
|
29 |
|
30 |
+
@classmethod
|
31 |
+
def fp8_dtype(cls) -> torch.dtype:
|
32 |
+
"""
|
33 |
+
Returns the preferred FP8 type on the current platform.
|
34 |
+
|
35 |
+
See the documentation for is_fp8_fnuz for details.
|
36 |
+
"""
|
37 |
+
return torch.float8_e4m3fn
|
38 |
+
|
39 |
+
@classmethod
|
40 |
+
def is_fp8_fnuz(cls) -> bool:
|
41 |
+
"""
|
42 |
+
Returns whether the preferred FP8 type is FNUZ on the current platform.
|
43 |
+
|
44 |
+
There are two representations of FP8, OCP FP8 and FNUZ FP8.
|
45 |
+
The OCP specification can be found at https://tinyurl.com/b7jvwpft.
|
46 |
+
The FNUZ specification can be found at https://tinyurl.com/5n6hwwu5.
|
47 |
+
|
48 |
+
AMD's MI300 and MI325 have native hardware support for FNUZ. All other
|
49 |
+
hardware has converged on the OCP FP8 standard.
|
50 |
+
"""
|
51 |
+
return False
|
52 |
+
|
53 |
@classmethod
|
54 |
@abstractmethod
|
55 |
def get_device_name(cls, device_id: int = 0) -> str: ...
|
|
|
74 |
|
75 |
|
76 |
class RocmPlatform(Platform):
|
77 |
+
@classmethod
|
78 |
+
def fp8_dtype(cls) -> torch.dtype:
|
79 |
+
if cls.is_fp8_fnuz():
|
80 |
+
return torch.float8_e4m3fnuz
|
81 |
+
else:
|
82 |
+
return torch.float8_e4m3fn
|
83 |
+
|
84 |
+
@classmethod
|
85 |
+
def is_fp8_fnuz(cls) -> bool:
|
86 |
+
# only device 0 is checked, this assumes MI300 platforms are homogeneous
|
87 |
+
return "gfx94" in torch.cuda.get_device_properties(0).gcnArchName
|
88 |
+
|
89 |
@classmethod
|
90 |
@lru_cache(maxsize=8)
|
91 |
def get_device_capability(cls, device_id: int = 0) -> DeviceCapability:
|
build/torch26-cxx98-cu124-x86_64-linux/quantization/__init__.py
CHANGED
@@ -19,6 +19,11 @@ from .scalar_type import (
|
|
19 |
)
|
20 |
from ._ops import ops
|
21 |
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
__all__ = [
|
24 |
"ScalarType",
|
@@ -32,7 +37,11 @@ __all__ = [
|
|
32 |
"gptq_marlin_repack",
|
33 |
"marlin_gemm",
|
34 |
"marlin_qqq_gemm",
|
|
|
|
|
|
|
35 |
"ops",
|
|
|
36 |
"scalar_types",
|
37 |
"scaled_fp8_quant",
|
38 |
"scaled_int8_quant",
|
|
|
19 |
)
|
20 |
from ._ops import ops
|
21 |
|
22 |
+
from .utils import marlin_utils
|
23 |
+
from .utils import marlin_utils_fp4
|
24 |
+
from .utils import marlin_utils_fp8
|
25 |
+
from .utils import quant_utils
|
26 |
+
|
27 |
|
28 |
__all__ = [
|
29 |
"ScalarType",
|
|
|
37 |
"gptq_marlin_repack",
|
38 |
"marlin_gemm",
|
39 |
"marlin_qqq_gemm",
|
40 |
+
"marlin_utils",
|
41 |
+
"marlin_utils_fp4",
|
42 |
+
"marlin_utils_fp8",
|
43 |
"ops",
|
44 |
+
"quant_utils",
|
45 |
"scalar_types",
|
46 |
"scaled_fp8_quant",
|
47 |
"scaled_int8_quant",
|
build/torch26-cxx98-cu124-x86_64-linux/quantization/_ops.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
import torch
|
2 |
-
from . import
|
3 |
-
ops = torch.ops.
|
4 |
|
5 |
def add_op_namespace_prefix(op_name: str):
|
6 |
"""
|
7 |
Prefix op by namespace.
|
8 |
"""
|
9 |
-
return f"
|
|
|
1 |
import torch
|
2 |
+
from . import _quantization_dfa7d18
|
3 |
+
ops = torch.ops._quantization_dfa7d18
|
4 |
|
5 |
def add_op_namespace_prefix(op_name: str):
|
6 |
"""
|
7 |
Prefix op by namespace.
|
8 |
"""
|
9 |
+
return f"_quantization_dfa7d18::{op_name}"
|
build/torch26-cxx98-cu124-x86_64-linux/quantization/_quantization_dfa7d18.abi3.so
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3fa6583683394285f5d1c65f808a967b2db197831a097c638400b06a544187ba
|
3 |
+
size 159570240
|
build/torch26-cxx98-cu124-x86_64-linux/quantization/_quantization_e8730d8_dirty.abi3.so
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:2932ba43dd1ae4848b3077dada99be0088023a56e7b36bac9e863a1977249088
|
3 |
-
size 159578496
|
|
|
|
|
|
|
|
build/torch26-cxx98-cu124-x86_64-linux/quantization/compressed_tensors.py
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
-
from typing import Optional,
|
2 |
|
3 |
import torch
|
4 |
|
5 |
from ._ops import ops
|
|
|
|
|
6 |
|
7 |
# fp8
|
8 |
def scaled_fp8_quant(
|
|
|
1 |
+
from typing import Optional, Union
|
2 |
|
3 |
import torch
|
4 |
|
5 |
from ._ops import ops
|
6 |
+
from .platforms import current_platform
|
7 |
+
|
8 |
|
9 |
# fp8
|
10 |
def scaled_fp8_quant(
|
build/torch26-cxx98-cu124-x86_64-linux/quantization/platforms.py
CHANGED
@@ -27,6 +27,29 @@ class DeviceCapability(NamedTuple):
|
|
27 |
class Platform(ABC):
|
28 |
simple_compile_backend: str = "inductor"
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
@classmethod
|
31 |
@abstractmethod
|
32 |
def get_device_name(cls, device_id: int = 0) -> str: ...
|
@@ -51,6 +74,18 @@ class CudaPlatform(Platform):
|
|
51 |
|
52 |
|
53 |
class RocmPlatform(Platform):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
@classmethod
|
55 |
@lru_cache(maxsize=8)
|
56 |
def get_device_capability(cls, device_id: int = 0) -> DeviceCapability:
|
|
|
27 |
class Platform(ABC):
|
28 |
simple_compile_backend: str = "inductor"
|
29 |
|
30 |
+
@classmethod
|
31 |
+
def fp8_dtype(cls) -> torch.dtype:
|
32 |
+
"""
|
33 |
+
Returns the preferred FP8 type on the current platform.
|
34 |
+
|
35 |
+
See the documentation for is_fp8_fnuz for details.
|
36 |
+
"""
|
37 |
+
return torch.float8_e4m3fn
|
38 |
+
|
39 |
+
@classmethod
|
40 |
+
def is_fp8_fnuz(cls) -> bool:
|
41 |
+
"""
|
42 |
+
Returns whether the preferred FP8 type is FNUZ on the current platform.
|
43 |
+
|
44 |
+
There are two representations of FP8, OCP FP8 and FNUZ FP8.
|
45 |
+
The OCP specification can be found at https://tinyurl.com/b7jvwpft.
|
46 |
+
The FNUZ specification can be found at https://tinyurl.com/5n6hwwu5.
|
47 |
+
|
48 |
+
AMD's MI300 and MI325 have native hardware support for FNUZ. All other
|
49 |
+
hardware has converged on the OCP FP8 standard.
|
50 |
+
"""
|
51 |
+
return False
|
52 |
+
|
53 |
@classmethod
|
54 |
@abstractmethod
|
55 |
def get_device_name(cls, device_id: int = 0) -> str: ...
|
|
|
74 |
|
75 |
|
76 |
class RocmPlatform(Platform):
|
77 |
+
@classmethod
|
78 |
+
def fp8_dtype(cls) -> torch.dtype:
|
79 |
+
if cls.is_fp8_fnuz():
|
80 |
+
return torch.float8_e4m3fnuz
|
81 |
+
else:
|
82 |
+
return torch.float8_e4m3fn
|
83 |
+
|
84 |
+
@classmethod
|
85 |
+
def is_fp8_fnuz(cls) -> bool:
|
86 |
+
# only device 0 is checked, this assumes MI300 platforms are homogeneous
|
87 |
+
return "gfx94" in torch.cuda.get_device_properties(0).gcnArchName
|
88 |
+
|
89 |
@classmethod
|
90 |
@lru_cache(maxsize=8)
|
91 |
def get_device_capability(cls, device_id: int = 0) -> DeviceCapability:
|
build/torch26-cxx98-cu126-x86_64-linux/quantization/__init__.py
CHANGED
@@ -19,6 +19,11 @@ from .scalar_type import (
|
|
19 |
)
|
20 |
from ._ops import ops
|
21 |
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
__all__ = [
|
24 |
"ScalarType",
|
@@ -32,7 +37,11 @@ __all__ = [
|
|
32 |
"gptq_marlin_repack",
|
33 |
"marlin_gemm",
|
34 |
"marlin_qqq_gemm",
|
|
|
|
|
|
|
35 |
"ops",
|
|
|
36 |
"scalar_types",
|
37 |
"scaled_fp8_quant",
|
38 |
"scaled_int8_quant",
|
|
|
19 |
)
|
20 |
from ._ops import ops
|
21 |
|
22 |
+
from .utils import marlin_utils
|
23 |
+
from .utils import marlin_utils_fp4
|
24 |
+
from .utils import marlin_utils_fp8
|
25 |
+
from .utils import quant_utils
|
26 |
+
|
27 |
|
28 |
__all__ = [
|
29 |
"ScalarType",
|
|
|
37 |
"gptq_marlin_repack",
|
38 |
"marlin_gemm",
|
39 |
"marlin_qqq_gemm",
|
40 |
+
"marlin_utils",
|
41 |
+
"marlin_utils_fp4",
|
42 |
+
"marlin_utils_fp8",
|
43 |
"ops",
|
44 |
+
"quant_utils",
|
45 |
"scalar_types",
|
46 |
"scaled_fp8_quant",
|
47 |
"scaled_int8_quant",
|
build/torch26-cxx98-cu126-x86_64-linux/quantization/_ops.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
import torch
|
2 |
-
from . import
|
3 |
-
ops = torch.ops.
|
4 |
|
5 |
def add_op_namespace_prefix(op_name: str):
|
6 |
"""
|
7 |
Prefix op by namespace.
|
8 |
"""
|
9 |
-
return f"
|
|
|
1 |
import torch
|
2 |
+
from . import _quantization_dfa7d18
|
3 |
+
ops = torch.ops._quantization_dfa7d18
|
4 |
|
5 |
def add_op_namespace_prefix(op_name: str):
|
6 |
"""
|
7 |
Prefix op by namespace.
|
8 |
"""
|
9 |
+
return f"_quantization_dfa7d18::{op_name}"
|
build/torch26-cxx98-cu126-x86_64-linux/quantization/_quantization_dfa7d18.abi3.so
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:027e39213c07a0d90a7cbd3ea7f7e7415d9a4d561e2d774ab6212512e0452007
|
3 |
+
size 160278472
|
build/torch26-cxx98-cu126-x86_64-linux/quantization/_quantization_e8730d8_dirty.abi3.so
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:1dcf28c2d636d90cd8af8bc7b44a3b7d5f5a1a599e7e1c03b06f3800d40f5a60
|
3 |
-
size 160274448
|
|
|
|
|
|
|
|
build/torch26-cxx98-cu126-x86_64-linux/quantization/compressed_tensors.py
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
-
from typing import Optional,
|
2 |
|
3 |
import torch
|
4 |
|
5 |
from ._ops import ops
|
|
|
|
|
6 |
|
7 |
# fp8
|
8 |
def scaled_fp8_quant(
|
|
|
1 |
+
from typing import Optional, Union
|
2 |
|
3 |
import torch
|
4 |
|
5 |
from ._ops import ops
|
6 |
+
from .platforms import current_platform
|
7 |
+
|
8 |
|
9 |
# fp8
|
10 |
def scaled_fp8_quant(
|
build/torch26-cxx98-cu126-x86_64-linux/quantization/platforms.py
CHANGED
@@ -27,6 +27,29 @@ class DeviceCapability(NamedTuple):
|
|
27 |
class Platform(ABC):
|
28 |
simple_compile_backend: str = "inductor"
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
@classmethod
|
31 |
@abstractmethod
|
32 |
def get_device_name(cls, device_id: int = 0) -> str: ...
|
@@ -51,6 +74,18 @@ class CudaPlatform(Platform):
|
|
51 |
|
52 |
|
53 |
class RocmPlatform(Platform):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
@classmethod
|
55 |
@lru_cache(maxsize=8)
|
56 |
def get_device_capability(cls, device_id: int = 0) -> DeviceCapability:
|
|
|
27 |
class Platform(ABC):
|
28 |
simple_compile_backend: str = "inductor"
|
29 |
|
30 |
+
@classmethod
|
31 |
+
def fp8_dtype(cls) -> torch.dtype:
|
32 |
+
"""
|
33 |
+
Returns the preferred FP8 type on the current platform.
|
34 |
+
|
35 |
+
See the documentation for is_fp8_fnuz for details.
|
36 |
+
"""
|
37 |
+
return torch.float8_e4m3fn
|
38 |
+
|
39 |
+
@classmethod
|
40 |
+
def is_fp8_fnuz(cls) -> bool:
|
41 |
+
"""
|
42 |
+
Returns whether the preferred FP8 type is FNUZ on the current platform.
|
43 |
+
|
44 |
+
There are two representations of FP8, OCP FP8 and FNUZ FP8.
|
45 |
+
The OCP specification can be found at https://tinyurl.com/b7jvwpft.
|
46 |
+
The FNUZ specification can be found at https://tinyurl.com/5n6hwwu5.
|
47 |
+
|
48 |
+
AMD's MI300 and MI325 have native hardware support for FNUZ. All other
|
49 |
+
hardware has converged on the OCP FP8 standard.
|
50 |
+
"""
|
51 |
+
return False
|
52 |
+
|
53 |
@classmethod
|
54 |
@abstractmethod
|
55 |
def get_device_name(cls, device_id: int = 0) -> str: ...
|
|
|
74 |
|
75 |
|
76 |
class RocmPlatform(Platform):
|
77 |
+
@classmethod
|
78 |
+
def fp8_dtype(cls) -> torch.dtype:
|
79 |
+
if cls.is_fp8_fnuz():
|
80 |
+
return torch.float8_e4m3fnuz
|
81 |
+
else:
|
82 |
+
return torch.float8_e4m3fn
|
83 |
+
|
84 |
+
@classmethod
|
85 |
+
def is_fp8_fnuz(cls) -> bool:
|
86 |
+
# only device 0 is checked, this assumes MI300 platforms are homogeneous
|
87 |
+
return "gfx94" in torch.cuda.get_device_properties(0).gcnArchName
|
88 |
+
|
89 |
@classmethod
|
90 |
@lru_cache(maxsize=8)
|
91 |
def get_device_capability(cls, device_id: int = 0) -> DeviceCapability:
|
build/torch27-cxx11-cu118-x86_64-linux/quantization/__init__.py
CHANGED
@@ -19,6 +19,11 @@ from .scalar_type import (
|
|
19 |
)
|
20 |
from ._ops import ops
|
21 |
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
__all__ = [
|
24 |
"ScalarType",
|
@@ -32,7 +37,11 @@ __all__ = [
|
|
32 |
"gptq_marlin_repack",
|
33 |
"marlin_gemm",
|
34 |
"marlin_qqq_gemm",
|
|
|
|
|
|
|
35 |
"ops",
|
|
|
36 |
"scalar_types",
|
37 |
"scaled_fp8_quant",
|
38 |
"scaled_int8_quant",
|
|
|
19 |
)
|
20 |
from ._ops import ops
|
21 |
|
22 |
+
from .utils import marlin_utils
|
23 |
+
from .utils import marlin_utils_fp4
|
24 |
+
from .utils import marlin_utils_fp8
|
25 |
+
from .utils import quant_utils
|
26 |
+
|
27 |
|
28 |
__all__ = [
|
29 |
"ScalarType",
|
|
|
37 |
"gptq_marlin_repack",
|
38 |
"marlin_gemm",
|
39 |
"marlin_qqq_gemm",
|
40 |
+
"marlin_utils",
|
41 |
+
"marlin_utils_fp4",
|
42 |
+
"marlin_utils_fp8",
|
43 |
"ops",
|
44 |
+
"quant_utils",
|
45 |
"scalar_types",
|
46 |
"scaled_fp8_quant",
|
47 |
"scaled_int8_quant",
|
build/torch27-cxx11-cu118-x86_64-linux/quantization/_ops.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
import torch
|
2 |
-
from . import
|
3 |
-
ops = torch.ops.
|
4 |
|
5 |
def add_op_namespace_prefix(op_name: str):
|
6 |
"""
|
7 |
Prefix op by namespace.
|
8 |
"""
|
9 |
-
return f"
|
|
|
1 |
import torch
|
2 |
+
from . import _quantization_dfa7d18
|
3 |
+
ops = torch.ops._quantization_dfa7d18
|
4 |
|
5 |
def add_op_namespace_prefix(op_name: str):
|
6 |
"""
|
7 |
Prefix op by namespace.
|
8 |
"""
|
9 |
+
return f"_quantization_dfa7d18::{op_name}"
|
build/torch27-cxx11-cu118-x86_64-linux/quantization/_quantization_dfa7d18.abi3.so
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:18dc876a3fd8d78af10311486db850cfa1905b6d5cc308a72f44bc0704bc91e6
|
3 |
+
size 155752576
|
build/torch27-cxx11-cu118-x86_64-linux/quantization/_quantization_e8730d8_dirty.abi3.so
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:dfeeef0e0e812038c52f838b994c631faa236af0d360246951dfc3e07ab0a461
|
3 |
-
size 155756888
|
|
|
|
|
|
|
|
build/torch27-cxx11-cu118-x86_64-linux/quantization/compressed_tensors.py
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
-
from typing import Optional,
|
2 |
|
3 |
import torch
|
4 |
|
5 |
from ._ops import ops
|
|
|
|
|
6 |
|
7 |
# fp8
|
8 |
def scaled_fp8_quant(
|
|
|
1 |
+
from typing import Optional, Union
|
2 |
|
3 |
import torch
|
4 |
|
5 |
from ._ops import ops
|
6 |
+
from .platforms import current_platform
|
7 |
+
|
8 |
|
9 |
# fp8
|
10 |
def scaled_fp8_quant(
|
build/torch27-cxx11-cu118-x86_64-linux/quantization/platforms.py
CHANGED
@@ -27,6 +27,29 @@ class DeviceCapability(NamedTuple):
|
|
27 |
class Platform(ABC):
|
28 |
simple_compile_backend: str = "inductor"
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
@classmethod
|
31 |
@abstractmethod
|
32 |
def get_device_name(cls, device_id: int = 0) -> str: ...
|
@@ -51,6 +74,18 @@ class CudaPlatform(Platform):
|
|
51 |
|
52 |
|
53 |
class RocmPlatform(Platform):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
@classmethod
|
55 |
@lru_cache(maxsize=8)
|
56 |
def get_device_capability(cls, device_id: int = 0) -> DeviceCapability:
|
|
|
27 |
class Platform(ABC):
|
28 |
simple_compile_backend: str = "inductor"
|
29 |
|
30 |
+
@classmethod
|
31 |
+
def fp8_dtype(cls) -> torch.dtype:
|
32 |
+
"""
|
33 |
+
Returns the preferred FP8 type on the current platform.
|
34 |
+
|
35 |
+
See the documentation for is_fp8_fnuz for details.
|
36 |
+
"""
|
37 |
+
return torch.float8_e4m3fn
|
38 |
+
|
39 |
+
@classmethod
|
40 |
+
def is_fp8_fnuz(cls) -> bool:
|
41 |
+
"""
|
42 |
+
Returns whether the preferred FP8 type is FNUZ on the current platform.
|
43 |
+
|
44 |
+
There are two representations of FP8, OCP FP8 and FNUZ FP8.
|
45 |
+
The OCP specification can be found at https://tinyurl.com/b7jvwpft.
|
46 |
+
The FNUZ specification can be found at https://tinyurl.com/5n6hwwu5.
|
47 |
+
|
48 |
+
AMD's MI300 and MI325 have native hardware support for FNUZ. All other
|
49 |
+
hardware has converged on the OCP FP8 standard.
|
50 |
+
"""
|
51 |
+
return False
|
52 |
+
|
53 |
@classmethod
|
54 |
@abstractmethod
|
55 |
def get_device_name(cls, device_id: int = 0) -> str: ...
|
|
|
74 |
|
75 |
|
76 |
class RocmPlatform(Platform):
|
77 |
+
@classmethod
|
78 |
+
def fp8_dtype(cls) -> torch.dtype:
|
79 |
+
if cls.is_fp8_fnuz():
|
80 |
+
return torch.float8_e4m3fnuz
|
81 |
+
else:
|
82 |
+
return torch.float8_e4m3fn
|
83 |
+
|
84 |
+
@classmethod
|
85 |
+
def is_fp8_fnuz(cls) -> bool:
|
86 |
+
# only device 0 is checked, this assumes MI300 platforms are homogeneous
|
87 |
+
return "gfx94" in torch.cuda.get_device_properties(0).gcnArchName
|
88 |
+
|
89 |
@classmethod
|
90 |
@lru_cache(maxsize=8)
|
91 |
def get_device_capability(cls, device_id: int = 0) -> DeviceCapability:
|
build/torch27-cxx11-cu126-x86_64-linux/quantization/__init__.py
CHANGED
@@ -19,6 +19,11 @@ from .scalar_type import (
|
|
19 |
)
|
20 |
from ._ops import ops
|
21 |
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
__all__ = [
|
24 |
"ScalarType",
|
@@ -32,7 +37,11 @@ __all__ = [
|
|
32 |
"gptq_marlin_repack",
|
33 |
"marlin_gemm",
|
34 |
"marlin_qqq_gemm",
|
|
|
|
|
|
|
35 |
"ops",
|
|
|
36 |
"scalar_types",
|
37 |
"scaled_fp8_quant",
|
38 |
"scaled_int8_quant",
|
|
|
19 |
)
|
20 |
from ._ops import ops
|
21 |
|
22 |
+
from .utils import marlin_utils
|
23 |
+
from .utils import marlin_utils_fp4
|
24 |
+
from .utils import marlin_utils_fp8
|
25 |
+
from .utils import quant_utils
|
26 |
+
|
27 |
|
28 |
__all__ = [
|
29 |
"ScalarType",
|
|
|
37 |
"gptq_marlin_repack",
|
38 |
"marlin_gemm",
|
39 |
"marlin_qqq_gemm",
|
40 |
+
"marlin_utils",
|
41 |
+
"marlin_utils_fp4",
|
42 |
+
"marlin_utils_fp8",
|
43 |
"ops",
|
44 |
+
"quant_utils",
|
45 |
"scalar_types",
|
46 |
"scaled_fp8_quant",
|
47 |
"scaled_int8_quant",
|
build/torch27-cxx11-cu126-x86_64-linux/quantization/_ops.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
import torch
|
2 |
-
from . import
|
3 |
-
ops = torch.ops.
|
4 |
|
5 |
def add_op_namespace_prefix(op_name: str):
|
6 |
"""
|
7 |
Prefix op by namespace.
|
8 |
"""
|
9 |
-
return f"
|
|
|
1 |
import torch
|
2 |
+
from . import _quantization_dfa7d18
|
3 |
+
ops = torch.ops._quantization_dfa7d18
|
4 |
|
5 |
def add_op_namespace_prefix(op_name: str):
|
6 |
"""
|
7 |
Prefix op by namespace.
|
8 |
"""
|
9 |
+
return f"_quantization_dfa7d18::{op_name}"
|
build/torch27-cxx11-cu126-x86_64-linux/quantization/_quantization_dfa7d18.abi3.so
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4e49acf1fe6df71b16edbf8cafc8ba41dbbda45e569b20b867bd8404a8f34db9
|
3 |
+
size 160284752
|
build/torch27-cxx11-cu126-x86_64-linux/quantization/_quantization_e8730d8_dirty.abi3.so
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:2d6c023d7381396997b58ff6bdaa002db2ab94a0c0eb17d09512a1a9f8e888d2
|
3 |
-
size 160280720
|
|
|
|
|
|
|
|
build/torch27-cxx11-cu126-x86_64-linux/quantization/compressed_tensors.py
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
-
from typing import Optional,
|
2 |
|
3 |
import torch
|
4 |
|
5 |
from ._ops import ops
|
|
|
|
|
6 |
|
7 |
# fp8
|
8 |
def scaled_fp8_quant(
|
|
|
1 |
+
from typing import Optional, Union
|
2 |
|
3 |
import torch
|
4 |
|
5 |
from ._ops import ops
|
6 |
+
from .platforms import current_platform
|
7 |
+
|
8 |
|
9 |
# fp8
|
10 |
def scaled_fp8_quant(
|
build/torch27-cxx11-cu126-x86_64-linux/quantization/platforms.py
CHANGED
@@ -27,6 +27,29 @@ class DeviceCapability(NamedTuple):
|
|
27 |
class Platform(ABC):
|
28 |
simple_compile_backend: str = "inductor"
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
@classmethod
|
31 |
@abstractmethod
|
32 |
def get_device_name(cls, device_id: int = 0) -> str: ...
|
@@ -51,6 +74,18 @@ class CudaPlatform(Platform):
|
|
51 |
|
52 |
|
53 |
class RocmPlatform(Platform):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
@classmethod
|
55 |
@lru_cache(maxsize=8)
|
56 |
def get_device_capability(cls, device_id: int = 0) -> DeviceCapability:
|
|
|
27 |
class Platform(ABC):
|
28 |
simple_compile_backend: str = "inductor"
|
29 |
|
30 |
+
@classmethod
|
31 |
+
def fp8_dtype(cls) -> torch.dtype:
|
32 |
+
"""
|
33 |
+
Returns the preferred FP8 type on the current platform.
|
34 |
+
|
35 |
+
See the documentation for is_fp8_fnuz for details.
|
36 |
+
"""
|
37 |
+
return torch.float8_e4m3fn
|
38 |
+
|
39 |
+
@classmethod
|
40 |
+
def is_fp8_fnuz(cls) -> bool:
|
41 |
+
"""
|
42 |
+
Returns whether the preferred FP8 type is FNUZ on the current platform.
|
43 |
+
|
44 |
+
There are two representations of FP8, OCP FP8 and FNUZ FP8.
|
45 |
+
The OCP specification can be found at https://tinyurl.com/b7jvwpft.
|
46 |
+
The FNUZ specification can be found at https://tinyurl.com/5n6hwwu5.
|
47 |
+
|
48 |
+
AMD's MI300 and MI325 have native hardware support for FNUZ. All other
|
49 |
+
hardware has converged on the OCP FP8 standard.
|
50 |
+
"""
|
51 |
+
return False
|
52 |
+
|
53 |
@classmethod
|
54 |
@abstractmethod
|
55 |
def get_device_name(cls, device_id: int = 0) -> str: ...
|
|
|
74 |
|
75 |
|
76 |
class RocmPlatform(Platform):
|
77 |
+
@classmethod
|
78 |
+
def fp8_dtype(cls) -> torch.dtype:
|
79 |
+
if cls.is_fp8_fnuz():
|
80 |
+
return torch.float8_e4m3fnuz
|
81 |
+
else:
|
82 |
+
return torch.float8_e4m3fn
|
83 |
+
|
84 |
+
@classmethod
|
85 |
+
def is_fp8_fnuz(cls) -> bool:
|
86 |
+
# only device 0 is checked, this assumes MI300 platforms are homogeneous
|
87 |
+
return "gfx94" in torch.cuda.get_device_properties(0).gcnArchName
|
88 |
+
|
89 |
@classmethod
|
90 |
@lru_cache(maxsize=8)
|
91 |
def get_device_capability(cls, device_id: int = 0) -> DeviceCapability:
|
build/torch27-cxx11-cu128-x86_64-linux/quantization/__init__.py
CHANGED
@@ -19,6 +19,11 @@ from .scalar_type import (
|
|
19 |
)
|
20 |
from ._ops import ops
|
21 |
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
__all__ = [
|
24 |
"ScalarType",
|
@@ -32,7 +37,11 @@ __all__ = [
|
|
32 |
"gptq_marlin_repack",
|
33 |
"marlin_gemm",
|
34 |
"marlin_qqq_gemm",
|
|
|
|
|
|
|
35 |
"ops",
|
|
|
36 |
"scalar_types",
|
37 |
"scaled_fp8_quant",
|
38 |
"scaled_int8_quant",
|
|
|
19 |
)
|
20 |
from ._ops import ops
|
21 |
|
22 |
+
from .utils import marlin_utils
|
23 |
+
from .utils import marlin_utils_fp4
|
24 |
+
from .utils import marlin_utils_fp8
|
25 |
+
from .utils import quant_utils
|
26 |
+
|
27 |
|
28 |
__all__ = [
|
29 |
"ScalarType",
|
|
|
37 |
"gptq_marlin_repack",
|
38 |
"marlin_gemm",
|
39 |
"marlin_qqq_gemm",
|
40 |
+
"marlin_utils",
|
41 |
+
"marlin_utils_fp4",
|
42 |
+
"marlin_utils_fp8",
|
43 |
"ops",
|
44 |
+
"quant_utils",
|
45 |
"scalar_types",
|
46 |
"scaled_fp8_quant",
|
47 |
"scaled_int8_quant",
|
build/torch27-cxx11-cu128-x86_64-linux/quantization/_ops.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
import torch
|
2 |
-
from . import
|
3 |
-
ops = torch.ops.
|
4 |
|
5 |
def add_op_namespace_prefix(op_name: str):
|
6 |
"""
|
7 |
Prefix op by namespace.
|
8 |
"""
|
9 |
-
return f"
|
|
|
1 |
import torch
|
2 |
+
from . import _quantization_dfa7d18
|
3 |
+
ops = torch.ops._quantization_dfa7d18
|
4 |
|
5 |
def add_op_namespace_prefix(op_name: str):
|
6 |
"""
|
7 |
Prefix op by namespace.
|
8 |
"""
|
9 |
+
return f"_quantization_dfa7d18::{op_name}"
|
build/torch27-cxx11-cu128-x86_64-linux/quantization/_quantization_dfa7d18.abi3.so
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7c5b228ee9c669189c71da56a54be02d116cb733e17139b02344423fb768a4db
|
3 |
+
size 297102992
|
build/torch27-cxx11-cu128-x86_64-linux/quantization/_quantization_e8730d8_dirty.abi3.so
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:718b7895b3e802aee133dcdbdbfd4aafa1dfed30a7a2b08547d97ec738b29c6e
|
3 |
-
size 297107160
|
|
|
|
|
|
|
|
build/torch27-cxx11-cu128-x86_64-linux/quantization/compressed_tensors.py
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
-
from typing import Optional,
|
2 |
|
3 |
import torch
|
4 |
|
5 |
from ._ops import ops
|
|
|
|
|
6 |
|
7 |
# fp8
|
8 |
def scaled_fp8_quant(
|
|
|
1 |
+
from typing import Optional, Union
|
2 |
|
3 |
import torch
|
4 |
|
5 |
from ._ops import ops
|
6 |
+
from .platforms import current_platform
|
7 |
+
|
8 |
|
9 |
# fp8
|
10 |
def scaled_fp8_quant(
|
build/torch27-cxx11-cu128-x86_64-linux/quantization/platforms.py
CHANGED
@@ -27,6 +27,29 @@ class DeviceCapability(NamedTuple):
|
|
27 |
class Platform(ABC):
|
28 |
simple_compile_backend: str = "inductor"
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
@classmethod
|
31 |
@abstractmethod
|
32 |
def get_device_name(cls, device_id: int = 0) -> str: ...
|
@@ -51,6 +74,18 @@ class CudaPlatform(Platform):
|
|
51 |
|
52 |
|
53 |
class RocmPlatform(Platform):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
@classmethod
|
55 |
@lru_cache(maxsize=8)
|
56 |
def get_device_capability(cls, device_id: int = 0) -> DeviceCapability:
|
|
|
27 |
class Platform(ABC):
|
28 |
simple_compile_backend: str = "inductor"
|
29 |
|
30 |
+
@classmethod
|
31 |
+
def fp8_dtype(cls) -> torch.dtype:
|
32 |
+
"""
|
33 |
+
Returns the preferred FP8 type on the current platform.
|
34 |
+
|
35 |
+
See the documentation for is_fp8_fnuz for details.
|
36 |
+
"""
|
37 |
+
return torch.float8_e4m3fn
|
38 |
+
|
39 |
+
@classmethod
|
40 |
+
def is_fp8_fnuz(cls) -> bool:
|
41 |
+
"""
|
42 |
+
Returns whether the preferred FP8 type is FNUZ on the current platform.
|
43 |
+
|
44 |
+
There are two representations of FP8, OCP FP8 and FNUZ FP8.
|
45 |
+
The OCP specification can be found at https://tinyurl.com/b7jvwpft.
|
46 |
+
The FNUZ specification can be found at https://tinyurl.com/5n6hwwu5.
|
47 |
+
|
48 |
+
AMD's MI300 and MI325 have native hardware support for FNUZ. All other
|
49 |
+
hardware has converged on the OCP FP8 standard.
|
50 |
+
"""
|
51 |
+
return False
|
52 |
+
|
53 |
@classmethod
|
54 |
@abstractmethod
|
55 |
def get_device_name(cls, device_id: int = 0) -> str: ...
|
|
|
74 |
|
75 |
|
76 |
class RocmPlatform(Platform):
|
77 |
+
@classmethod
|
78 |
+
def fp8_dtype(cls) -> torch.dtype:
|
79 |
+
if cls.is_fp8_fnuz():
|
80 |
+
return torch.float8_e4m3fnuz
|
81 |
+
else:
|
82 |
+
return torch.float8_e4m3fn
|
83 |
+
|
84 |
+
@classmethod
|
85 |
+
def is_fp8_fnuz(cls) -> bool:
|
86 |
+
# only device 0 is checked, this assumes MI300 platforms are homogeneous
|
87 |
+
return "gfx94" in torch.cuda.get_device_properties(0).gcnArchName
|
88 |
+
|
89 |
@classmethod
|
90 |
@lru_cache(maxsize=8)
|
91 |
def get_device_capability(cls, device_id: int = 0) -> DeviceCapability:
|