diff --git a/build/torch210-cxx11-cu126-x86_64-linux/__init__.py b/build/torch210-cxx11-cu126-x86_64-linux/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c65d0601c655d7acf1a12e61b6549618b46a70d7 --- /dev/null +++ b/build/torch210-cxx11-cu126-x86_64-linux/__init__.py @@ -0,0 +1,3 @@ +from .custom_ops import w8_a16_gemm, w8_a16_gemm_, preprocess_weights, quant_weights + +__all__ = ["w8_a16_gemm", "w8_a16_gemm_", "preprocess_weights", "quant_weights"] diff --git a/build/torch210-cxx11-cu126-x86_64-linux/_ops.py b/build/torch210-cxx11-cu126-x86_64-linux/_ops.py new file mode 100644 index 0000000000000000000000000000000000000000..319850742d4433e69a42ab606a5f69369dcd11db --- /dev/null +++ b/build/torch210-cxx11-cu126-x86_64-linux/_ops.py @@ -0,0 +1,9 @@ +import torch +from . import _quantization_eetq_2019ec2 +ops = torch.ops._quantization_eetq_2019ec2 + +def add_op_namespace_prefix(op_name: str): + """ + Prefix op by namespace. + """ + return f"_quantization_eetq_2019ec2::{op_name}" \ No newline at end of file diff --git a/build/torch210-cxx11-cu126-x86_64-linux/_quantization_eetq_2019ec2.abi3.so b/build/torch210-cxx11-cu126-x86_64-linux/_quantization_eetq_2019ec2.abi3.so new file mode 100644 index 0000000000000000000000000000000000000000..0a4a440534510a46dde4fa727e2d9f7fe1064546 --- /dev/null +++ b/build/torch210-cxx11-cu126-x86_64-linux/_quantization_eetq_2019ec2.abi3.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7ddd95d6bd5fa005afb8ca1cca98f8e666888437a7b21faa044d7e3180aa0902 +size 39060392 diff --git a/build/torch28-cxx11-cu126-x86_64-linux/quantization_eetq/custom_ops.py b/build/torch210-cxx11-cu126-x86_64-linux/custom_ops.py similarity index 100% rename from build/torch28-cxx11-cu126-x86_64-linux/quantization_eetq/custom_ops.py rename to build/torch210-cxx11-cu126-x86_64-linux/custom_ops.py diff --git a/build/torch210-cxx11-cu126-x86_64-linux/metadata.json b/build/torch210-cxx11-cu126-x86_64-linux/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..76bafa5f33b6818aa6bb4cab04be811b87519b44 --- /dev/null +++ b/build/torch210-cxx11-cu126-x86_64-linux/metadata.json @@ -0,0 +1 @@ +{"python-depends":[]} \ No newline at end of file diff --git a/build/torch210-cxx11-cu126-x86_64-linux/quantization_eetq/__init__.py b/build/torch210-cxx11-cu126-x86_64-linux/quantization_eetq/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..03dbc1afe1cf156661a2b1b22003cd5f599a0309 --- /dev/null +++ b/build/torch210-cxx11-cu126-x86_64-linux/quantization_eetq/__init__.py @@ -0,0 +1,26 @@ +import ctypes +import sys + +import importlib +from pathlib import Path +from types import ModuleType + +def _import_from_path(file_path: Path) -> ModuleType: + # We cannot use the module name as-is, after adding it to `sys.modules`, + # it would also be used for other imports. So, we make a module name that + # depends on the path for it to be unique using the hex-encoded hash of + # the path. + path_hash = "{:x}".format(ctypes.c_size_t(hash(file_path.absolute())).value) + module_name = path_hash + spec = importlib.util.spec_from_file_location(module_name, file_path) + if spec is None: + raise ImportError(f"Cannot load spec for {module_name} from {file_path}") + module = importlib.util.module_from_spec(spec) + if module is None: + raise ImportError(f"Cannot load module {module_name} from spec") + sys.modules[module_name] = module + spec.loader.exec_module(module) # type: ignore + return module + + +globals().update(vars(_import_from_path(Path(__file__).parent.parent / "__init__.py"))) diff --git a/build/torch210-cxx11-cu128-x86_64-linux/__init__.py b/build/torch210-cxx11-cu128-x86_64-linux/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c65d0601c655d7acf1a12e61b6549618b46a70d7 --- /dev/null +++ b/build/torch210-cxx11-cu128-x86_64-linux/__init__.py @@ -0,0 +1,3 @@ +from .custom_ops import w8_a16_gemm, w8_a16_gemm_, preprocess_weights, quant_weights + +__all__ = ["w8_a16_gemm", "w8_a16_gemm_", "preprocess_weights", "quant_weights"] diff --git a/build/torch210-cxx11-cu128-x86_64-linux/_ops.py b/build/torch210-cxx11-cu128-x86_64-linux/_ops.py new file mode 100644 index 0000000000000000000000000000000000000000..319850742d4433e69a42ab606a5f69369dcd11db --- /dev/null +++ b/build/torch210-cxx11-cu128-x86_64-linux/_ops.py @@ -0,0 +1,9 @@ +import torch +from . import _quantization_eetq_2019ec2 +ops = torch.ops._quantization_eetq_2019ec2 + +def add_op_namespace_prefix(op_name: str): + """ + Prefix op by namespace. + """ + return f"_quantization_eetq_2019ec2::{op_name}" \ No newline at end of file diff --git a/build/torch210-cxx11-cu128-x86_64-linux/_quantization_eetq_2019ec2.abi3.so b/build/torch210-cxx11-cu128-x86_64-linux/_quantization_eetq_2019ec2.abi3.so new file mode 100644 index 0000000000000000000000000000000000000000..854970095e53eef9c0b83c5683549a8a0d5539e1 --- /dev/null +++ b/build/torch210-cxx11-cu128-x86_64-linux/_quantization_eetq_2019ec2.abi3.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6026ada25ff3b5a4eb532b0e8a6825ef353d4c507f36817020557c68b22db2f8 +size 45393976 diff --git a/build/torch28-cxx11-cu128-x86_64-linux/quantization_eetq/custom_ops.py b/build/torch210-cxx11-cu128-x86_64-linux/custom_ops.py similarity index 100% rename from build/torch28-cxx11-cu128-x86_64-linux/quantization_eetq/custom_ops.py rename to build/torch210-cxx11-cu128-x86_64-linux/custom_ops.py diff --git a/build/torch210-cxx11-cu128-x86_64-linux/metadata.json b/build/torch210-cxx11-cu128-x86_64-linux/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..76bafa5f33b6818aa6bb4cab04be811b87519b44 --- /dev/null +++ b/build/torch210-cxx11-cu128-x86_64-linux/metadata.json @@ -0,0 +1 @@ +{"python-depends":[]} \ No newline at end of file diff --git a/build/torch210-cxx11-cu128-x86_64-linux/quantization_eetq/__init__.py b/build/torch210-cxx11-cu128-x86_64-linux/quantization_eetq/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..03dbc1afe1cf156661a2b1b22003cd5f599a0309 --- /dev/null +++ b/build/torch210-cxx11-cu128-x86_64-linux/quantization_eetq/__init__.py @@ -0,0 +1,26 @@ +import ctypes +import sys + +import importlib +from pathlib import Path +from types import ModuleType + +def _import_from_path(file_path: Path) -> ModuleType: + # We cannot use the module name as-is, after adding it to `sys.modules`, + # it would also be used for other imports. So, we make a module name that + # depends on the path for it to be unique using the hex-encoded hash of + # the path. + path_hash = "{:x}".format(ctypes.c_size_t(hash(file_path.absolute())).value) + module_name = path_hash + spec = importlib.util.spec_from_file_location(module_name, file_path) + if spec is None: + raise ImportError(f"Cannot load spec for {module_name} from {file_path}") + module = importlib.util.module_from_spec(spec) + if module is None: + raise ImportError(f"Cannot load module {module_name} from spec") + sys.modules[module_name] = module + spec.loader.exec_module(module) # type: ignore + return module + + +globals().update(vars(_import_from_path(Path(__file__).parent.parent / "__init__.py"))) diff --git a/build/torch28-cxx11-cu126-x86_64-linux/__init__.py b/build/torch28-cxx11-cu126-x86_64-linux/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c65d0601c655d7acf1a12e61b6549618b46a70d7 --- /dev/null +++ b/build/torch28-cxx11-cu126-x86_64-linux/__init__.py @@ -0,0 +1,3 @@ +from .custom_ops import w8_a16_gemm, w8_a16_gemm_, preprocess_weights, quant_weights + +__all__ = ["w8_a16_gemm", "w8_a16_gemm_", "preprocess_weights", "quant_weights"] diff --git a/build/torch28-cxx11-cu126-x86_64-linux/_ops.py b/build/torch28-cxx11-cu126-x86_64-linux/_ops.py new file mode 100644 index 0000000000000000000000000000000000000000..319850742d4433e69a42ab606a5f69369dcd11db --- /dev/null +++ b/build/torch28-cxx11-cu126-x86_64-linux/_ops.py @@ -0,0 +1,9 @@ +import torch +from . import _quantization_eetq_2019ec2 +ops = torch.ops._quantization_eetq_2019ec2 + +def add_op_namespace_prefix(op_name: str): + """ + Prefix op by namespace. + """ + return f"_quantization_eetq_2019ec2::{op_name}" \ No newline at end of file diff --git a/build/torch28-cxx11-cu126-x86_64-linux/_quantization_eetq_2019ec2.abi3.so b/build/torch28-cxx11-cu126-x86_64-linux/_quantization_eetq_2019ec2.abi3.so new file mode 100644 index 0000000000000000000000000000000000000000..f1abbe506bf176670b9921b11aa3ad998072d371 --- /dev/null +++ b/build/torch28-cxx11-cu126-x86_64-linux/_quantization_eetq_2019ec2.abi3.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a97b47d38cf622b58973de106d9b36fa9f41400c0de74a98c67b39d916d10410 +size 39045544 diff --git a/build/torch28-cxx11-cu129-x86_64-linux/quantization_eetq/custom_ops.py b/build/torch28-cxx11-cu126-x86_64-linux/custom_ops.py similarity index 100% rename from build/torch28-cxx11-cu129-x86_64-linux/quantization_eetq/custom_ops.py rename to build/torch28-cxx11-cu126-x86_64-linux/custom_ops.py diff --git a/build/torch28-cxx11-cu126-x86_64-linux/metadata.json b/build/torch28-cxx11-cu126-x86_64-linux/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..76bafa5f33b6818aa6bb4cab04be811b87519b44 --- /dev/null +++ b/build/torch28-cxx11-cu126-x86_64-linux/metadata.json @@ -0,0 +1 @@ +{"python-depends":[]} \ No newline at end of file diff --git a/build/torch28-cxx11-cu126-x86_64-linux/quantization_eetq/__init__.py b/build/torch28-cxx11-cu126-x86_64-linux/quantization_eetq/__init__.py index c65d0601c655d7acf1a12e61b6549618b46a70d7..03dbc1afe1cf156661a2b1b22003cd5f599a0309 100644 --- a/build/torch28-cxx11-cu126-x86_64-linux/quantization_eetq/__init__.py +++ b/build/torch28-cxx11-cu126-x86_64-linux/quantization_eetq/__init__.py @@ -1,3 +1,26 @@ -from .custom_ops import w8_a16_gemm, w8_a16_gemm_, preprocess_weights, quant_weights +import ctypes +import sys -__all__ = ["w8_a16_gemm", "w8_a16_gemm_", "preprocess_weights", "quant_weights"] +import importlib +from pathlib import Path +from types import ModuleType + +def _import_from_path(file_path: Path) -> ModuleType: + # We cannot use the module name as-is, after adding it to `sys.modules`, + # it would also be used for other imports. So, we make a module name that + # depends on the path for it to be unique using the hex-encoded hash of + # the path. + path_hash = "{:x}".format(ctypes.c_size_t(hash(file_path.absolute())).value) + module_name = path_hash + spec = importlib.util.spec_from_file_location(module_name, file_path) + if spec is None: + raise ImportError(f"Cannot load spec for {module_name} from {file_path}") + module = importlib.util.module_from_spec(spec) + if module is None: + raise ImportError(f"Cannot load module {module_name} from spec") + sys.modules[module_name] = module + spec.loader.exec_module(module) # type: ignore + return module + + +globals().update(vars(_import_from_path(Path(__file__).parent.parent / "__init__.py"))) diff --git a/build/torch28-cxx11-cu126-x86_64-linux/quantization_eetq/__pycache__/__init__.cpython-313.pyc b/build/torch28-cxx11-cu126-x86_64-linux/quantization_eetq/__pycache__/__init__.cpython-313.pyc deleted file mode 100644 index a2466de0939af4c77705bdce31031711b9531f28..0000000000000000000000000000000000000000 Binary files a/build/torch28-cxx11-cu126-x86_64-linux/quantization_eetq/__pycache__/__init__.cpython-313.pyc and /dev/null differ diff --git a/build/torch28-cxx11-cu126-x86_64-linux/quantization_eetq/__pycache__/_ops.cpython-313.pyc b/build/torch28-cxx11-cu126-x86_64-linux/quantization_eetq/__pycache__/_ops.cpython-313.pyc deleted file mode 100644 index 99f160819e72e80d81baad34a9ff4e95aefa8d08..0000000000000000000000000000000000000000 Binary files a/build/torch28-cxx11-cu126-x86_64-linux/quantization_eetq/__pycache__/_ops.cpython-313.pyc and /dev/null differ diff --git a/build/torch28-cxx11-cu126-x86_64-linux/quantization_eetq/__pycache__/custom_ops.cpython-313.pyc b/build/torch28-cxx11-cu126-x86_64-linux/quantization_eetq/__pycache__/custom_ops.cpython-313.pyc deleted file mode 100644 index 6c7ced1bf4fcd5765122745e3b3c791d0615950a..0000000000000000000000000000000000000000 Binary files a/build/torch28-cxx11-cu126-x86_64-linux/quantization_eetq/__pycache__/custom_ops.cpython-313.pyc and /dev/null differ diff --git a/build/torch28-cxx11-cu126-x86_64-linux/quantization_eetq/_ops.py b/build/torch28-cxx11-cu126-x86_64-linux/quantization_eetq/_ops.py deleted file mode 100644 index 7ca134cca31c3e4f6dbc2bda32496668ed8061bb..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu126-x86_64-linux/quantization_eetq/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _quantization_eetq_92f3139 -ops = torch.ops._quantization_eetq_92f3139 - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_quantization_eetq_92f3139::{op_name}" \ No newline at end of file diff --git a/build/torch28-cxx11-cu126-x86_64-linux/quantization_eetq/_quantization_eetq_92f3139.abi3.so b/build/torch28-cxx11-cu126-x86_64-linux/quantization_eetq/_quantization_eetq_92f3139.abi3.so deleted file mode 100644 index ed4d731bddbd8294e0449864044c23e5248f3534..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu126-x86_64-linux/quantization_eetq/_quantization_eetq_92f3139.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:12d4712f6937fc8abaf1c30461318ac52913e3b836430b28e60b8ee07bd5490b -size 31593848 diff --git a/build/torch28-cxx11-cu128-x86_64-linux/__init__.py b/build/torch28-cxx11-cu128-x86_64-linux/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c65d0601c655d7acf1a12e61b6549618b46a70d7 --- /dev/null +++ b/build/torch28-cxx11-cu128-x86_64-linux/__init__.py @@ -0,0 +1,3 @@ +from .custom_ops import w8_a16_gemm, w8_a16_gemm_, preprocess_weights, quant_weights + +__all__ = ["w8_a16_gemm", "w8_a16_gemm_", "preprocess_weights", "quant_weights"] diff --git a/build/torch28-cxx11-cu128-x86_64-linux/_ops.py b/build/torch28-cxx11-cu128-x86_64-linux/_ops.py new file mode 100644 index 0000000000000000000000000000000000000000..319850742d4433e69a42ab606a5f69369dcd11db --- /dev/null +++ b/build/torch28-cxx11-cu128-x86_64-linux/_ops.py @@ -0,0 +1,9 @@ +import torch +from . import _quantization_eetq_2019ec2 +ops = torch.ops._quantization_eetq_2019ec2 + +def add_op_namespace_prefix(op_name: str): + """ + Prefix op by namespace. + """ + return f"_quantization_eetq_2019ec2::{op_name}" \ No newline at end of file diff --git a/build/torch28-cxx11-cu128-x86_64-linux/_quantization_eetq_2019ec2.abi3.so b/build/torch28-cxx11-cu128-x86_64-linux/_quantization_eetq_2019ec2.abi3.so new file mode 100644 index 0000000000000000000000000000000000000000..a4b747e3bf9f13ac99292075c49e34f50243243b --- /dev/null +++ b/build/torch28-cxx11-cu128-x86_64-linux/_quantization_eetq_2019ec2.abi3.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fdfe703aa8a570bb3589ec89aeca00af0a983b968700933127f2762f50c47686 +size 45378576 diff --git a/build/torch29-cxx11-cu126-x86_64-linux/quantization_eetq/custom_ops.py b/build/torch28-cxx11-cu128-x86_64-linux/custom_ops.py similarity index 100% rename from build/torch29-cxx11-cu126-x86_64-linux/quantization_eetq/custom_ops.py rename to build/torch28-cxx11-cu128-x86_64-linux/custom_ops.py diff --git a/build/torch28-cxx11-cu128-x86_64-linux/metadata.json b/build/torch28-cxx11-cu128-x86_64-linux/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..76bafa5f33b6818aa6bb4cab04be811b87519b44 --- /dev/null +++ b/build/torch28-cxx11-cu128-x86_64-linux/metadata.json @@ -0,0 +1 @@ +{"python-depends":[]} \ No newline at end of file diff --git a/build/torch28-cxx11-cu128-x86_64-linux/quantization_eetq/__init__.py b/build/torch28-cxx11-cu128-x86_64-linux/quantization_eetq/__init__.py index c65d0601c655d7acf1a12e61b6549618b46a70d7..03dbc1afe1cf156661a2b1b22003cd5f599a0309 100644 --- a/build/torch28-cxx11-cu128-x86_64-linux/quantization_eetq/__init__.py +++ b/build/torch28-cxx11-cu128-x86_64-linux/quantization_eetq/__init__.py @@ -1,3 +1,26 @@ -from .custom_ops import w8_a16_gemm, w8_a16_gemm_, preprocess_weights, quant_weights +import ctypes +import sys -__all__ = ["w8_a16_gemm", "w8_a16_gemm_", "preprocess_weights", "quant_weights"] +import importlib +from pathlib import Path +from types import ModuleType + +def _import_from_path(file_path: Path) -> ModuleType: + # We cannot use the module name as-is, after adding it to `sys.modules`, + # it would also be used for other imports. So, we make a module name that + # depends on the path for it to be unique using the hex-encoded hash of + # the path. + path_hash = "{:x}".format(ctypes.c_size_t(hash(file_path.absolute())).value) + module_name = path_hash + spec = importlib.util.spec_from_file_location(module_name, file_path) + if spec is None: + raise ImportError(f"Cannot load spec for {module_name} from {file_path}") + module = importlib.util.module_from_spec(spec) + if module is None: + raise ImportError(f"Cannot load module {module_name} from spec") + sys.modules[module_name] = module + spec.loader.exec_module(module) # type: ignore + return module + + +globals().update(vars(_import_from_path(Path(__file__).parent.parent / "__init__.py"))) diff --git a/build/torch28-cxx11-cu128-x86_64-linux/quantization_eetq/__pycache__/__init__.cpython-313.pyc b/build/torch28-cxx11-cu128-x86_64-linux/quantization_eetq/__pycache__/__init__.cpython-313.pyc deleted file mode 100644 index 9cff5d96b0d56315ab93bdd97d65953f7fdbca33..0000000000000000000000000000000000000000 Binary files a/build/torch28-cxx11-cu128-x86_64-linux/quantization_eetq/__pycache__/__init__.cpython-313.pyc and /dev/null differ diff --git a/build/torch28-cxx11-cu128-x86_64-linux/quantization_eetq/__pycache__/_ops.cpython-313.pyc b/build/torch28-cxx11-cu128-x86_64-linux/quantization_eetq/__pycache__/_ops.cpython-313.pyc deleted file mode 100644 index ae7804730c87a159c06f64fab090c685bb78679f..0000000000000000000000000000000000000000 Binary files a/build/torch28-cxx11-cu128-x86_64-linux/quantization_eetq/__pycache__/_ops.cpython-313.pyc and /dev/null differ diff --git a/build/torch28-cxx11-cu128-x86_64-linux/quantization_eetq/__pycache__/custom_ops.cpython-313.pyc b/build/torch28-cxx11-cu128-x86_64-linux/quantization_eetq/__pycache__/custom_ops.cpython-313.pyc deleted file mode 100644 index ba62602616af470b1769e8ef8079ffc092f2282f..0000000000000000000000000000000000000000 Binary files a/build/torch28-cxx11-cu128-x86_64-linux/quantization_eetq/__pycache__/custom_ops.cpython-313.pyc and /dev/null differ diff --git a/build/torch28-cxx11-cu128-x86_64-linux/quantization_eetq/_ops.py b/build/torch28-cxx11-cu128-x86_64-linux/quantization_eetq/_ops.py deleted file mode 100644 index 7ca134cca31c3e4f6dbc2bda32496668ed8061bb..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu128-x86_64-linux/quantization_eetq/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _quantization_eetq_92f3139 -ops = torch.ops._quantization_eetq_92f3139 - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_quantization_eetq_92f3139::{op_name}" \ No newline at end of file diff --git a/build/torch28-cxx11-cu128-x86_64-linux/quantization_eetq/_quantization_eetq_92f3139.abi3.so b/build/torch28-cxx11-cu128-x86_64-linux/quantization_eetq/_quantization_eetq_92f3139.abi3.so deleted file mode 100644 index 55f94ba40387373b3d533fd4aab60cb8e142443b..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu128-x86_64-linux/quantization_eetq/_quantization_eetq_92f3139.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6ee78153171588c3a6e34fd000b19cf502b98fcd135f3348562aa77cc0eba4c8 -size 38012880 diff --git a/build/torch28-cxx11-cu129-x86_64-linux/__init__.py b/build/torch28-cxx11-cu129-x86_64-linux/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c65d0601c655d7acf1a12e61b6549618b46a70d7 --- /dev/null +++ b/build/torch28-cxx11-cu129-x86_64-linux/__init__.py @@ -0,0 +1,3 @@ +from .custom_ops import w8_a16_gemm, w8_a16_gemm_, preprocess_weights, quant_weights + +__all__ = ["w8_a16_gemm", "w8_a16_gemm_", "preprocess_weights", "quant_weights"] diff --git a/build/torch28-cxx11-cu129-x86_64-linux/_ops.py b/build/torch28-cxx11-cu129-x86_64-linux/_ops.py new file mode 100644 index 0000000000000000000000000000000000000000..319850742d4433e69a42ab606a5f69369dcd11db --- /dev/null +++ b/build/torch28-cxx11-cu129-x86_64-linux/_ops.py @@ -0,0 +1,9 @@ +import torch +from . import _quantization_eetq_2019ec2 +ops = torch.ops._quantization_eetq_2019ec2 + +def add_op_namespace_prefix(op_name: str): + """ + Prefix op by namespace. + """ + return f"_quantization_eetq_2019ec2::{op_name}" \ No newline at end of file diff --git a/build/torch28-cxx11-cu129-x86_64-linux/_quantization_eetq_2019ec2.abi3.so b/build/torch28-cxx11-cu129-x86_64-linux/_quantization_eetq_2019ec2.abi3.so new file mode 100644 index 0000000000000000000000000000000000000000..76b605ed954d28d783d6df7a58b17fcdc396606c --- /dev/null +++ b/build/torch28-cxx11-cu129-x86_64-linux/_quantization_eetq_2019ec2.abi3.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea1e527ad52b776e108df3ad077a84ec8db233a67630fa8389fa03a641b4a8c8 +size 46492944 diff --git a/build/torch29-cxx11-cu128-x86_64-linux/quantization_eetq/custom_ops.py b/build/torch28-cxx11-cu129-x86_64-linux/custom_ops.py similarity index 100% rename from build/torch29-cxx11-cu128-x86_64-linux/quantization_eetq/custom_ops.py rename to build/torch28-cxx11-cu129-x86_64-linux/custom_ops.py diff --git a/build/torch28-cxx11-cu129-x86_64-linux/metadata.json b/build/torch28-cxx11-cu129-x86_64-linux/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..76bafa5f33b6818aa6bb4cab04be811b87519b44 --- /dev/null +++ b/build/torch28-cxx11-cu129-x86_64-linux/metadata.json @@ -0,0 +1 @@ +{"python-depends":[]} \ No newline at end of file diff --git a/build/torch28-cxx11-cu129-x86_64-linux/quantization_eetq/__init__.py b/build/torch28-cxx11-cu129-x86_64-linux/quantization_eetq/__init__.py index c65d0601c655d7acf1a12e61b6549618b46a70d7..03dbc1afe1cf156661a2b1b22003cd5f599a0309 100644 --- a/build/torch28-cxx11-cu129-x86_64-linux/quantization_eetq/__init__.py +++ b/build/torch28-cxx11-cu129-x86_64-linux/quantization_eetq/__init__.py @@ -1,3 +1,26 @@ -from .custom_ops import w8_a16_gemm, w8_a16_gemm_, preprocess_weights, quant_weights +import ctypes +import sys -__all__ = ["w8_a16_gemm", "w8_a16_gemm_", "preprocess_weights", "quant_weights"] +import importlib +from pathlib import Path +from types import ModuleType + +def _import_from_path(file_path: Path) -> ModuleType: + # We cannot use the module name as-is, after adding it to `sys.modules`, + # it would also be used for other imports. So, we make a module name that + # depends on the path for it to be unique using the hex-encoded hash of + # the path. + path_hash = "{:x}".format(ctypes.c_size_t(hash(file_path.absolute())).value) + module_name = path_hash + spec = importlib.util.spec_from_file_location(module_name, file_path) + if spec is None: + raise ImportError(f"Cannot load spec for {module_name} from {file_path}") + module = importlib.util.module_from_spec(spec) + if module is None: + raise ImportError(f"Cannot load module {module_name} from spec") + sys.modules[module_name] = module + spec.loader.exec_module(module) # type: ignore + return module + + +globals().update(vars(_import_from_path(Path(__file__).parent.parent / "__init__.py"))) diff --git a/build/torch28-cxx11-cu129-x86_64-linux/quantization_eetq/__pycache__/__init__.cpython-313.pyc b/build/torch28-cxx11-cu129-x86_64-linux/quantization_eetq/__pycache__/__init__.cpython-313.pyc deleted file mode 100644 index 661b02f2fb945717e40d0a4ff999b4648aeb420b..0000000000000000000000000000000000000000 Binary files a/build/torch28-cxx11-cu129-x86_64-linux/quantization_eetq/__pycache__/__init__.cpython-313.pyc and /dev/null differ diff --git a/build/torch28-cxx11-cu129-x86_64-linux/quantization_eetq/__pycache__/_ops.cpython-313.pyc b/build/torch28-cxx11-cu129-x86_64-linux/quantization_eetq/__pycache__/_ops.cpython-313.pyc deleted file mode 100644 index 3d0ad37a0802ec622d9d03f8f648ebe4b7ea8dd3..0000000000000000000000000000000000000000 Binary files a/build/torch28-cxx11-cu129-x86_64-linux/quantization_eetq/__pycache__/_ops.cpython-313.pyc and /dev/null differ diff --git a/build/torch28-cxx11-cu129-x86_64-linux/quantization_eetq/__pycache__/custom_ops.cpython-313.pyc b/build/torch28-cxx11-cu129-x86_64-linux/quantization_eetq/__pycache__/custom_ops.cpython-313.pyc deleted file mode 100644 index e76941f4a71d02d3b2a264f1f2b3ae509738a346..0000000000000000000000000000000000000000 Binary files a/build/torch28-cxx11-cu129-x86_64-linux/quantization_eetq/__pycache__/custom_ops.cpython-313.pyc and /dev/null differ diff --git a/build/torch28-cxx11-cu129-x86_64-linux/quantization_eetq/_ops.py b/build/torch28-cxx11-cu129-x86_64-linux/quantization_eetq/_ops.py deleted file mode 100644 index 7ca134cca31c3e4f6dbc2bda32496668ed8061bb..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu129-x86_64-linux/quantization_eetq/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _quantization_eetq_92f3139 -ops = torch.ops._quantization_eetq_92f3139 - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_quantization_eetq_92f3139::{op_name}" \ No newline at end of file diff --git a/build/torch28-cxx11-cu129-x86_64-linux/quantization_eetq/_quantization_eetq_92f3139.abi3.so b/build/torch28-cxx11-cu129-x86_64-linux/quantization_eetq/_quantization_eetq_92f3139.abi3.so deleted file mode 100644 index 08baf973447f653a9d2aef124d2255c9b5cf89c3..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu129-x86_64-linux/quantization_eetq/_quantization_eetq_92f3139.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bda61b1d3844adeff9e030c2bb933b7a6f1a112a95f3a2ca4723bf7c54496476 -size 38775000 diff --git a/build/torch29-cxx11-cu126-x86_64-linux/__init__.py b/build/torch29-cxx11-cu126-x86_64-linux/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c65d0601c655d7acf1a12e61b6549618b46a70d7 --- /dev/null +++ b/build/torch29-cxx11-cu126-x86_64-linux/__init__.py @@ -0,0 +1,3 @@ +from .custom_ops import w8_a16_gemm, w8_a16_gemm_, preprocess_weights, quant_weights + +__all__ = ["w8_a16_gemm", "w8_a16_gemm_", "preprocess_weights", "quant_weights"] diff --git a/build/torch29-cxx11-cu126-x86_64-linux/_ops.py b/build/torch29-cxx11-cu126-x86_64-linux/_ops.py new file mode 100644 index 0000000000000000000000000000000000000000..319850742d4433e69a42ab606a5f69369dcd11db --- /dev/null +++ b/build/torch29-cxx11-cu126-x86_64-linux/_ops.py @@ -0,0 +1,9 @@ +import torch +from . import _quantization_eetq_2019ec2 +ops = torch.ops._quantization_eetq_2019ec2 + +def add_op_namespace_prefix(op_name: str): + """ + Prefix op by namespace. + """ + return f"_quantization_eetq_2019ec2::{op_name}" \ No newline at end of file diff --git a/build/torch29-cxx11-cu126-x86_64-linux/_quantization_eetq_2019ec2.abi3.so b/build/torch29-cxx11-cu126-x86_64-linux/_quantization_eetq_2019ec2.abi3.so new file mode 100644 index 0000000000000000000000000000000000000000..e086df293415e2c0e4e427b16d84151528fac7c2 --- /dev/null +++ b/build/torch29-cxx11-cu126-x86_64-linux/_quantization_eetq_2019ec2.abi3.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:232a741853f62f20c6d4e418644918b2f8c2b11c8ee97bf396d0c9e382656edf +size 39049616 diff --git a/build/torch29-cxx11-cu126-x86_64-linux/custom_ops.py b/build/torch29-cxx11-cu126-x86_64-linux/custom_ops.py new file mode 100644 index 0000000000000000000000000000000000000000..005b5a6e3cd5f7bcfd4aa5d7d80d60a5ed9fab88 --- /dev/null +++ b/build/torch29-cxx11-cu126-x86_64-linux/custom_ops.py @@ -0,0 +1,36 @@ +from typing import List +import torch + +from ._ops import ops + + +def w8_a16_gemm( + input: torch.Tensor, weight: torch.Tensor, scale: torch.Tensor +) -> torch.Tensor: + return ops.w8_a16_gemm(input, weight, scale) + + +def w8_a16_gemm_( + input: torch.Tensor, + weight: torch.Tensor, + scale: torch.Tensor, + output: torch.Tensor, + m: int, + n: int, + k: int, +) -> torch.Tensor: + return ops.w8_a16_gemm_(input, weight, scale, output, m, n, k) + + +def preprocess_weights(origin_weight: torch.Tensor, is_int4: bool) -> torch.Tensor: + return ops.preprocess_weights(origin_weight, is_int4) + + +def quant_weights( + origin_weight: torch.Tensor, + quant_type: torch.dtype, + return_unprocessed_quantized_tensor: bool, +) -> List[torch.Tensor]: + return ops.quant_weights( + origin_weight, quant_type, return_unprocessed_quantized_tensor + ) diff --git a/build/torch29-cxx11-cu126-x86_64-linux/metadata.json b/build/torch29-cxx11-cu126-x86_64-linux/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..76bafa5f33b6818aa6bb4cab04be811b87519b44 --- /dev/null +++ b/build/torch29-cxx11-cu126-x86_64-linux/metadata.json @@ -0,0 +1 @@ +{"python-depends":[]} \ No newline at end of file diff --git a/build/torch29-cxx11-cu126-x86_64-linux/quantization_eetq/__init__.py b/build/torch29-cxx11-cu126-x86_64-linux/quantization_eetq/__init__.py index c65d0601c655d7acf1a12e61b6549618b46a70d7..03dbc1afe1cf156661a2b1b22003cd5f599a0309 100644 --- a/build/torch29-cxx11-cu126-x86_64-linux/quantization_eetq/__init__.py +++ b/build/torch29-cxx11-cu126-x86_64-linux/quantization_eetq/__init__.py @@ -1,3 +1,26 @@ -from .custom_ops import w8_a16_gemm, w8_a16_gemm_, preprocess_weights, quant_weights +import ctypes +import sys -__all__ = ["w8_a16_gemm", "w8_a16_gemm_", "preprocess_weights", "quant_weights"] +import importlib +from pathlib import Path +from types import ModuleType + +def _import_from_path(file_path: Path) -> ModuleType: + # We cannot use the module name as-is, after adding it to `sys.modules`, + # it would also be used for other imports. So, we make a module name that + # depends on the path for it to be unique using the hex-encoded hash of + # the path. + path_hash = "{:x}".format(ctypes.c_size_t(hash(file_path.absolute())).value) + module_name = path_hash + spec = importlib.util.spec_from_file_location(module_name, file_path) + if spec is None: + raise ImportError(f"Cannot load spec for {module_name} from {file_path}") + module = importlib.util.module_from_spec(spec) + if module is None: + raise ImportError(f"Cannot load module {module_name} from spec") + sys.modules[module_name] = module + spec.loader.exec_module(module) # type: ignore + return module + + +globals().update(vars(_import_from_path(Path(__file__).parent.parent / "__init__.py"))) diff --git a/build/torch29-cxx11-cu126-x86_64-linux/quantization_eetq/__pycache__/__init__.cpython-313.pyc b/build/torch29-cxx11-cu126-x86_64-linux/quantization_eetq/__pycache__/__init__.cpython-313.pyc deleted file mode 100644 index 09f719354dc4a4a6b49a441f0579218df52ac328..0000000000000000000000000000000000000000 Binary files a/build/torch29-cxx11-cu126-x86_64-linux/quantization_eetq/__pycache__/__init__.cpython-313.pyc and /dev/null differ diff --git a/build/torch29-cxx11-cu126-x86_64-linux/quantization_eetq/__pycache__/_ops.cpython-313.pyc b/build/torch29-cxx11-cu126-x86_64-linux/quantization_eetq/__pycache__/_ops.cpython-313.pyc deleted file mode 100644 index 4688e947056dc4fd0ff999d35d2e0a287bc38c23..0000000000000000000000000000000000000000 Binary files a/build/torch29-cxx11-cu126-x86_64-linux/quantization_eetq/__pycache__/_ops.cpython-313.pyc and /dev/null differ diff --git a/build/torch29-cxx11-cu126-x86_64-linux/quantization_eetq/__pycache__/custom_ops.cpython-313.pyc b/build/torch29-cxx11-cu126-x86_64-linux/quantization_eetq/__pycache__/custom_ops.cpython-313.pyc deleted file mode 100644 index 77494afc346a4b09f2e9b75a8950c47b9d6cfb3a..0000000000000000000000000000000000000000 Binary files a/build/torch29-cxx11-cu126-x86_64-linux/quantization_eetq/__pycache__/custom_ops.cpython-313.pyc and /dev/null differ diff --git a/build/torch29-cxx11-cu126-x86_64-linux/quantization_eetq/_ops.py b/build/torch29-cxx11-cu126-x86_64-linux/quantization_eetq/_ops.py deleted file mode 100644 index 7ca134cca31c3e4f6dbc2bda32496668ed8061bb..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu126-x86_64-linux/quantization_eetq/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _quantization_eetq_92f3139 -ops = torch.ops._quantization_eetq_92f3139 - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_quantization_eetq_92f3139::{op_name}" \ No newline at end of file diff --git a/build/torch29-cxx11-cu126-x86_64-linux/quantization_eetq/_quantization_eetq_92f3139.abi3.so b/build/torch29-cxx11-cu126-x86_64-linux/quantization_eetq/_quantization_eetq_92f3139.abi3.so deleted file mode 100644 index 9663d4fc546707dcd9212c88781bab4d5a6705fe..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu126-x86_64-linux/quantization_eetq/_quantization_eetq_92f3139.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:17aa5f2536b515fa31541c80daa97fb01422f0ec9f4f4c9cc351c8cfaf3a32e9 -size 31593824 diff --git a/build/torch29-cxx11-cu128-x86_64-linux/__init__.py b/build/torch29-cxx11-cu128-x86_64-linux/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c65d0601c655d7acf1a12e61b6549618b46a70d7 --- /dev/null +++ b/build/torch29-cxx11-cu128-x86_64-linux/__init__.py @@ -0,0 +1,3 @@ +from .custom_ops import w8_a16_gemm, w8_a16_gemm_, preprocess_weights, quant_weights + +__all__ = ["w8_a16_gemm", "w8_a16_gemm_", "preprocess_weights", "quant_weights"] diff --git a/build/torch29-cxx11-cu128-x86_64-linux/_ops.py b/build/torch29-cxx11-cu128-x86_64-linux/_ops.py new file mode 100644 index 0000000000000000000000000000000000000000..319850742d4433e69a42ab606a5f69369dcd11db --- /dev/null +++ b/build/torch29-cxx11-cu128-x86_64-linux/_ops.py @@ -0,0 +1,9 @@ +import torch +from . import _quantization_eetq_2019ec2 +ops = torch.ops._quantization_eetq_2019ec2 + +def add_op_namespace_prefix(op_name: str): + """ + Prefix op by namespace. + """ + return f"_quantization_eetq_2019ec2::{op_name}" \ No newline at end of file diff --git a/build/torch29-cxx11-cu128-x86_64-linux/_quantization_eetq_2019ec2.abi3.so b/build/torch29-cxx11-cu128-x86_64-linux/_quantization_eetq_2019ec2.abi3.so new file mode 100644 index 0000000000000000000000000000000000000000..8f07d82b064fd4317d9bdeda41ea4acddf3e053b --- /dev/null +++ b/build/torch29-cxx11-cu128-x86_64-linux/_quantization_eetq_2019ec2.abi3.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:46ea0f0690cda2b0143842ccfdf0f3beff510ce8666c7c3b802856a4d28197cf +size 45378736 diff --git a/build/torch29-cxx11-cu128-x86_64-linux/custom_ops.py b/build/torch29-cxx11-cu128-x86_64-linux/custom_ops.py new file mode 100644 index 0000000000000000000000000000000000000000..005b5a6e3cd5f7bcfd4aa5d7d80d60a5ed9fab88 --- /dev/null +++ b/build/torch29-cxx11-cu128-x86_64-linux/custom_ops.py @@ -0,0 +1,36 @@ +from typing import List +import torch + +from ._ops import ops + + +def w8_a16_gemm( + input: torch.Tensor, weight: torch.Tensor, scale: torch.Tensor +) -> torch.Tensor: + return ops.w8_a16_gemm(input, weight, scale) + + +def w8_a16_gemm_( + input: torch.Tensor, + weight: torch.Tensor, + scale: torch.Tensor, + output: torch.Tensor, + m: int, + n: int, + k: int, +) -> torch.Tensor: + return ops.w8_a16_gemm_(input, weight, scale, output, m, n, k) + + +def preprocess_weights(origin_weight: torch.Tensor, is_int4: bool) -> torch.Tensor: + return ops.preprocess_weights(origin_weight, is_int4) + + +def quant_weights( + origin_weight: torch.Tensor, + quant_type: torch.dtype, + return_unprocessed_quantized_tensor: bool, +) -> List[torch.Tensor]: + return ops.quant_weights( + origin_weight, quant_type, return_unprocessed_quantized_tensor + ) diff --git a/build/torch29-cxx11-cu128-x86_64-linux/metadata.json b/build/torch29-cxx11-cu128-x86_64-linux/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..76bafa5f33b6818aa6bb4cab04be811b87519b44 --- /dev/null +++ b/build/torch29-cxx11-cu128-x86_64-linux/metadata.json @@ -0,0 +1 @@ +{"python-depends":[]} \ No newline at end of file diff --git a/build/torch29-cxx11-cu128-x86_64-linux/quantization_eetq/__init__.py b/build/torch29-cxx11-cu128-x86_64-linux/quantization_eetq/__init__.py index c65d0601c655d7acf1a12e61b6549618b46a70d7..03dbc1afe1cf156661a2b1b22003cd5f599a0309 100644 --- a/build/torch29-cxx11-cu128-x86_64-linux/quantization_eetq/__init__.py +++ b/build/torch29-cxx11-cu128-x86_64-linux/quantization_eetq/__init__.py @@ -1,3 +1,26 @@ -from .custom_ops import w8_a16_gemm, w8_a16_gemm_, preprocess_weights, quant_weights +import ctypes +import sys -__all__ = ["w8_a16_gemm", "w8_a16_gemm_", "preprocess_weights", "quant_weights"] +import importlib +from pathlib import Path +from types import ModuleType + +def _import_from_path(file_path: Path) -> ModuleType: + # We cannot use the module name as-is, after adding it to `sys.modules`, + # it would also be used for other imports. So, we make a module name that + # depends on the path for it to be unique using the hex-encoded hash of + # the path. + path_hash = "{:x}".format(ctypes.c_size_t(hash(file_path.absolute())).value) + module_name = path_hash + spec = importlib.util.spec_from_file_location(module_name, file_path) + if spec is None: + raise ImportError(f"Cannot load spec for {module_name} from {file_path}") + module = importlib.util.module_from_spec(spec) + if module is None: + raise ImportError(f"Cannot load module {module_name} from spec") + sys.modules[module_name] = module + spec.loader.exec_module(module) # type: ignore + return module + + +globals().update(vars(_import_from_path(Path(__file__).parent.parent / "__init__.py"))) diff --git a/build/torch29-cxx11-cu128-x86_64-linux/quantization_eetq/__pycache__/__init__.cpython-313.pyc b/build/torch29-cxx11-cu128-x86_64-linux/quantization_eetq/__pycache__/__init__.cpython-313.pyc deleted file mode 100644 index 0ee69eefbd30850ffd2beed51c2d7ebcace3095b..0000000000000000000000000000000000000000 Binary files a/build/torch29-cxx11-cu128-x86_64-linux/quantization_eetq/__pycache__/__init__.cpython-313.pyc and /dev/null differ diff --git a/build/torch29-cxx11-cu128-x86_64-linux/quantization_eetq/__pycache__/_ops.cpython-313.pyc b/build/torch29-cxx11-cu128-x86_64-linux/quantization_eetq/__pycache__/_ops.cpython-313.pyc deleted file mode 100644 index 337e00ce7787e58e1bd8599d3b4ac12b65cd701e..0000000000000000000000000000000000000000 Binary files a/build/torch29-cxx11-cu128-x86_64-linux/quantization_eetq/__pycache__/_ops.cpython-313.pyc and /dev/null differ diff --git a/build/torch29-cxx11-cu128-x86_64-linux/quantization_eetq/__pycache__/custom_ops.cpython-313.pyc b/build/torch29-cxx11-cu128-x86_64-linux/quantization_eetq/__pycache__/custom_ops.cpython-313.pyc deleted file mode 100644 index 90a8b5640be446945bb5702eb61d8ebcaf113060..0000000000000000000000000000000000000000 Binary files a/build/torch29-cxx11-cu128-x86_64-linux/quantization_eetq/__pycache__/custom_ops.cpython-313.pyc and /dev/null differ diff --git a/build/torch29-cxx11-cu128-x86_64-linux/quantization_eetq/_ops.py b/build/torch29-cxx11-cu128-x86_64-linux/quantization_eetq/_ops.py deleted file mode 100644 index 7ca134cca31c3e4f6dbc2bda32496668ed8061bb..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu128-x86_64-linux/quantization_eetq/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _quantization_eetq_92f3139 -ops = torch.ops._quantization_eetq_92f3139 - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_quantization_eetq_92f3139::{op_name}" \ No newline at end of file diff --git a/build/torch29-cxx11-cu128-x86_64-linux/quantization_eetq/_quantization_eetq_92f3139.abi3.so b/build/torch29-cxx11-cu128-x86_64-linux/quantization_eetq/_quantization_eetq_92f3139.abi3.so deleted file mode 100644 index d1936b8008fc62a1cf0dd9b2770760b20b90b978..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu128-x86_64-linux/quantization_eetq/_quantization_eetq_92f3139.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f306ef2ea928a866ff679962321a072c186bb7d0dd6ab548d325fd5cb0a48710 -size 38017136