diff --git a/.gitattributes b/.gitattributes index c25a8b83d70e5778cffa287f2bb485a1a747beb7..553a1e81ad2f5b9c4f668efb1c5d34cc44c85e03 100644 --- a/.gitattributes +++ b/.gitattributes @@ -42,3 +42,12 @@ build/torch28-cxx11-cu129-x86_64-linux/yoso/_yoso_3173620_dirty.abi3.so filter=l build/torch29-cxx11-cu126-x86_64-linux/yoso/_yoso_3173620_dirty.abi3.so filter=lfs diff=lfs merge=lfs -text build/torch29-cxx11-cu128-x86_64-linux/yoso/_yoso_3173620_dirty.abi3.so filter=lfs diff=lfs merge=lfs -text build/torch29-cxx11-cu130-x86_64-linux/yoso/_yoso_3173620_dirty.abi3.so filter=lfs diff=lfs merge=lfs -text +build/torch210-cxx11-cu126-x86_64-linux/_yoso_ea085fb.abi3.so filter=lfs diff=lfs merge=lfs -text +build/torch210-cxx11-cu128-x86_64-linux/_yoso_ea085fb.abi3.so filter=lfs diff=lfs merge=lfs -text +build/torch210-cxx11-cu130-x86_64-linux/_yoso_ea085fb.abi3.so filter=lfs diff=lfs merge=lfs -text +build/torch28-cxx11-cu126-x86_64-linux/_yoso_ea085fb.abi3.so filter=lfs diff=lfs merge=lfs -text +build/torch28-cxx11-cu128-x86_64-linux/_yoso_ea085fb.abi3.so filter=lfs diff=lfs merge=lfs -text +build/torch28-cxx11-cu129-x86_64-linux/_yoso_ea085fb.abi3.so filter=lfs diff=lfs merge=lfs -text +build/torch29-cxx11-cu126-x86_64-linux/_yoso_ea085fb.abi3.so filter=lfs diff=lfs merge=lfs -text +build/torch29-cxx11-cu128-x86_64-linux/_yoso_ea085fb.abi3.so filter=lfs diff=lfs merge=lfs -text +build/torch29-cxx11-cu130-x86_64-linux/_yoso_ea085fb.abi3.so filter=lfs diff=lfs merge=lfs -text 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..b1738b47b313effeb7568d78344fdfd30fefca3e --- /dev/null +++ b/build/torch210-cxx11-cu126-x86_64-linux/__init__.py @@ -0,0 +1,11 @@ +from ._ops import ops + +fast_hash = ops.fast_hash +lsh_cumulation = ops.lsh_cumulation +lsh_weighted_cumulation = ops.lsh_weighted_cumulation + +__all__ = [ + "fast_hash", + "lsh_cumulation", + "lsh_weighted_cumulation", +] \ No newline at end of file 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..650bfbe865b7c006f1a38580c8a3d6a264be2072 --- /dev/null +++ b/build/torch210-cxx11-cu126-x86_64-linux/_ops.py @@ -0,0 +1,9 @@ +import torch +from . import _yoso_ea085fb +ops = torch.ops._yoso_ea085fb + +def add_op_namespace_prefix(op_name: str): + """ + Prefix op by namespace. + """ + return f"_yoso_ea085fb::{op_name}" \ No newline at end of file diff --git a/build/torch210-cxx11-cu126-x86_64-linux/_yoso_ea085fb.abi3.so b/build/torch210-cxx11-cu126-x86_64-linux/_yoso_ea085fb.abi3.so new file mode 100644 index 0000000000000000000000000000000000000000..2d4c11f00f3d9f7e740d2466f3bc3e397adefdf2 --- /dev/null +++ b/build/torch210-cxx11-cu126-x86_64-linux/_yoso_ea085fb.abi3.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d67a5fe972f9bfbe797586e35d41852f6028d8edb1105a8dc3b81af86174754 +size 2498232 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/yoso/__init__.py b/build/torch210-cxx11-cu126-x86_64-linux/yoso/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..03dbc1afe1cf156661a2b1b22003cd5f599a0309 --- /dev/null +++ b/build/torch210-cxx11-cu126-x86_64-linux/yoso/__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..b1738b47b313effeb7568d78344fdfd30fefca3e --- /dev/null +++ b/build/torch210-cxx11-cu128-x86_64-linux/__init__.py @@ -0,0 +1,11 @@ +from ._ops import ops + +fast_hash = ops.fast_hash +lsh_cumulation = ops.lsh_cumulation +lsh_weighted_cumulation = ops.lsh_weighted_cumulation + +__all__ = [ + "fast_hash", + "lsh_cumulation", + "lsh_weighted_cumulation", +] \ No newline at end of file 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..650bfbe865b7c006f1a38580c8a3d6a264be2072 --- /dev/null +++ b/build/torch210-cxx11-cu128-x86_64-linux/_ops.py @@ -0,0 +1,9 @@ +import torch +from . import _yoso_ea085fb +ops = torch.ops._yoso_ea085fb + +def add_op_namespace_prefix(op_name: str): + """ + Prefix op by namespace. + """ + return f"_yoso_ea085fb::{op_name}" \ No newline at end of file diff --git a/build/torch210-cxx11-cu128-x86_64-linux/_yoso_ea085fb.abi3.so b/build/torch210-cxx11-cu128-x86_64-linux/_yoso_ea085fb.abi3.so new file mode 100644 index 0000000000000000000000000000000000000000..924fe779eb260bab83bffd7761e3984dc4ccb1f3 --- /dev/null +++ b/build/torch210-cxx11-cu128-x86_64-linux/_yoso_ea085fb.abi3.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b30eadca70267e31f9448b4294771ac3319bb7035996afd17c72b8e63a1bdcd +size 3040808 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/yoso/__init__.py b/build/torch210-cxx11-cu128-x86_64-linux/yoso/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..03dbc1afe1cf156661a2b1b22003cd5f599a0309 --- /dev/null +++ b/build/torch210-cxx11-cu128-x86_64-linux/yoso/__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-cu130-x86_64-linux/__init__.py b/build/torch210-cxx11-cu130-x86_64-linux/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b1738b47b313effeb7568d78344fdfd30fefca3e --- /dev/null +++ b/build/torch210-cxx11-cu130-x86_64-linux/__init__.py @@ -0,0 +1,11 @@ +from ._ops import ops + +fast_hash = ops.fast_hash +lsh_cumulation = ops.lsh_cumulation +lsh_weighted_cumulation = ops.lsh_weighted_cumulation + +__all__ = [ + "fast_hash", + "lsh_cumulation", + "lsh_weighted_cumulation", +] \ No newline at end of file diff --git a/build/torch210-cxx11-cu130-x86_64-linux/_ops.py b/build/torch210-cxx11-cu130-x86_64-linux/_ops.py new file mode 100644 index 0000000000000000000000000000000000000000..650bfbe865b7c006f1a38580c8a3d6a264be2072 --- /dev/null +++ b/build/torch210-cxx11-cu130-x86_64-linux/_ops.py @@ -0,0 +1,9 @@ +import torch +from . import _yoso_ea085fb +ops = torch.ops._yoso_ea085fb + +def add_op_namespace_prefix(op_name: str): + """ + Prefix op by namespace. + """ + return f"_yoso_ea085fb::{op_name}" \ No newline at end of file diff --git a/build/torch210-cxx11-cu130-x86_64-linux/_yoso_ea085fb.abi3.so b/build/torch210-cxx11-cu130-x86_64-linux/_yoso_ea085fb.abi3.so new file mode 100644 index 0000000000000000000000000000000000000000..e1e77a0e9f99e032d59e220fdb598fda517a6398 --- /dev/null +++ b/build/torch210-cxx11-cu130-x86_64-linux/_yoso_ea085fb.abi3.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b02a6437eb1de04c6e1239cd1abce5b1450a596271ab87f71e9dd9da86487d40 +size 3102152 diff --git a/build/torch210-cxx11-cu130-x86_64-linux/metadata.json b/build/torch210-cxx11-cu130-x86_64-linux/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..76bafa5f33b6818aa6bb4cab04be811b87519b44 --- /dev/null +++ b/build/torch210-cxx11-cu130-x86_64-linux/metadata.json @@ -0,0 +1 @@ +{"python-depends":[]} \ No newline at end of file diff --git a/build/torch210-cxx11-cu130-x86_64-linux/yoso/__init__.py b/build/torch210-cxx11-cu130-x86_64-linux/yoso/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..03dbc1afe1cf156661a2b1b22003cd5f599a0309 --- /dev/null +++ b/build/torch210-cxx11-cu130-x86_64-linux/yoso/__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..b1738b47b313effeb7568d78344fdfd30fefca3e --- /dev/null +++ b/build/torch28-cxx11-cu126-x86_64-linux/__init__.py @@ -0,0 +1,11 @@ +from ._ops import ops + +fast_hash = ops.fast_hash +lsh_cumulation = ops.lsh_cumulation +lsh_weighted_cumulation = ops.lsh_weighted_cumulation + +__all__ = [ + "fast_hash", + "lsh_cumulation", + "lsh_weighted_cumulation", +] \ No newline at end of file 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..650bfbe865b7c006f1a38580c8a3d6a264be2072 --- /dev/null +++ b/build/torch28-cxx11-cu126-x86_64-linux/_ops.py @@ -0,0 +1,9 @@ +import torch +from . import _yoso_ea085fb +ops = torch.ops._yoso_ea085fb + +def add_op_namespace_prefix(op_name: str): + """ + Prefix op by namespace. + """ + return f"_yoso_ea085fb::{op_name}" \ No newline at end of file diff --git a/build/torch28-cxx11-cu126-x86_64-linux/_yoso_ea085fb.abi3.so b/build/torch28-cxx11-cu126-x86_64-linux/_yoso_ea085fb.abi3.so new file mode 100644 index 0000000000000000000000000000000000000000..e48fe7656d6ef5d2019ac5f39083b4b922b4dc41 --- /dev/null +++ b/build/torch28-cxx11-cu126-x86_64-linux/_yoso_ea085fb.abi3.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ddd7f08af087a0616554e6f1de8beb02a9eb34ba8bfd59e12fde5a0fda99f8b0 +size 2504360 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/yoso/__init__.py b/build/torch28-cxx11-cu126-x86_64-linux/yoso/__init__.py index b1738b47b313effeb7568d78344fdfd30fefca3e..03dbc1afe1cf156661a2b1b22003cd5f599a0309 100644 --- a/build/torch28-cxx11-cu126-x86_64-linux/yoso/__init__.py +++ b/build/torch28-cxx11-cu126-x86_64-linux/yoso/__init__.py @@ -1,11 +1,26 @@ -from ._ops import ops +import ctypes +import sys -fast_hash = ops.fast_hash -lsh_cumulation = ops.lsh_cumulation -lsh_weighted_cumulation = ops.lsh_weighted_cumulation +import importlib +from pathlib import Path +from types import ModuleType -__all__ = [ - "fast_hash", - "lsh_cumulation", - "lsh_weighted_cumulation", -] \ No newline at end of file +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/yoso/__pycache__/__init__.cpython-313.pyc b/build/torch28-cxx11-cu126-x86_64-linux/yoso/__pycache__/__init__.cpython-313.pyc deleted file mode 100644 index c93b521b8d93c75dcae575b40619747998ab41d1..0000000000000000000000000000000000000000 Binary files a/build/torch28-cxx11-cu126-x86_64-linux/yoso/__pycache__/__init__.cpython-313.pyc and /dev/null differ diff --git a/build/torch28-cxx11-cu126-x86_64-linux/yoso/__pycache__/_ops.cpython-313.pyc b/build/torch28-cxx11-cu126-x86_64-linux/yoso/__pycache__/_ops.cpython-313.pyc deleted file mode 100644 index b3bb980bd93b45d41801d3b836285617d1e7edf3..0000000000000000000000000000000000000000 Binary files a/build/torch28-cxx11-cu126-x86_64-linux/yoso/__pycache__/_ops.cpython-313.pyc and /dev/null differ diff --git a/build/torch28-cxx11-cu126-x86_64-linux/yoso/_ops.py b/build/torch28-cxx11-cu126-x86_64-linux/yoso/_ops.py deleted file mode 100644 index 31d4d73ddbe7bbf56bfa857eabc15341bc736cf5..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu126-x86_64-linux/yoso/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _yoso_3173620_dirty -ops = torch.ops._yoso_3173620_dirty - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_yoso_3173620_dirty::{op_name}" \ No newline at end of file diff --git a/build/torch28-cxx11-cu126-x86_64-linux/yoso/_yoso_3173620_dirty.abi3.so b/build/torch28-cxx11-cu126-x86_64-linux/yoso/_yoso_3173620_dirty.abi3.so deleted file mode 100644 index 0b1a318326bdce76952b45199491df5eae47efd3..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu126-x86_64-linux/yoso/_yoso_3173620_dirty.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b232acaeb039ea7c2476dcf1d4618f90ff5d8af726126ed7d80deef4d8195cef -size 2499304 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..b1738b47b313effeb7568d78344fdfd30fefca3e --- /dev/null +++ b/build/torch28-cxx11-cu128-x86_64-linux/__init__.py @@ -0,0 +1,11 @@ +from ._ops import ops + +fast_hash = ops.fast_hash +lsh_cumulation = ops.lsh_cumulation +lsh_weighted_cumulation = ops.lsh_weighted_cumulation + +__all__ = [ + "fast_hash", + "lsh_cumulation", + "lsh_weighted_cumulation", +] \ No newline at end of file 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..650bfbe865b7c006f1a38580c8a3d6a264be2072 --- /dev/null +++ b/build/torch28-cxx11-cu128-x86_64-linux/_ops.py @@ -0,0 +1,9 @@ +import torch +from . import _yoso_ea085fb +ops = torch.ops._yoso_ea085fb + +def add_op_namespace_prefix(op_name: str): + """ + Prefix op by namespace. + """ + return f"_yoso_ea085fb::{op_name}" \ No newline at end of file diff --git a/build/torch28-cxx11-cu128-x86_64-linux/_yoso_ea085fb.abi3.so b/build/torch28-cxx11-cu128-x86_64-linux/_yoso_ea085fb.abi3.so new file mode 100644 index 0000000000000000000000000000000000000000..be6bac8301a2c94e2768f67b0646a96cf45be12d --- /dev/null +++ b/build/torch28-cxx11-cu128-x86_64-linux/_yoso_ea085fb.abi3.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c02e539bee2cff2520ef6bda1e532c0287a3f94f01ac1dc4305ea667bd3dfc60 +size 3051032 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/yoso/__init__.py b/build/torch28-cxx11-cu128-x86_64-linux/yoso/__init__.py index b1738b47b313effeb7568d78344fdfd30fefca3e..03dbc1afe1cf156661a2b1b22003cd5f599a0309 100644 --- a/build/torch28-cxx11-cu128-x86_64-linux/yoso/__init__.py +++ b/build/torch28-cxx11-cu128-x86_64-linux/yoso/__init__.py @@ -1,11 +1,26 @@ -from ._ops import ops +import ctypes +import sys -fast_hash = ops.fast_hash -lsh_cumulation = ops.lsh_cumulation -lsh_weighted_cumulation = ops.lsh_weighted_cumulation +import importlib +from pathlib import Path +from types import ModuleType -__all__ = [ - "fast_hash", - "lsh_cumulation", - "lsh_weighted_cumulation", -] \ No newline at end of file +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/yoso/__pycache__/__init__.cpython-313.pyc b/build/torch28-cxx11-cu128-x86_64-linux/yoso/__pycache__/__init__.cpython-313.pyc deleted file mode 100644 index 0b79f92bfe837f076b6dce96e8b41b4b9bdee847..0000000000000000000000000000000000000000 Binary files a/build/torch28-cxx11-cu128-x86_64-linux/yoso/__pycache__/__init__.cpython-313.pyc and /dev/null differ diff --git a/build/torch28-cxx11-cu128-x86_64-linux/yoso/__pycache__/_ops.cpython-313.pyc b/build/torch28-cxx11-cu128-x86_64-linux/yoso/__pycache__/_ops.cpython-313.pyc deleted file mode 100644 index 541222626d37477894af35ab3aa80a66f5797f1c..0000000000000000000000000000000000000000 Binary files a/build/torch28-cxx11-cu128-x86_64-linux/yoso/__pycache__/_ops.cpython-313.pyc and /dev/null differ diff --git a/build/torch28-cxx11-cu128-x86_64-linux/yoso/_ops.py b/build/torch28-cxx11-cu128-x86_64-linux/yoso/_ops.py deleted file mode 100644 index 31d4d73ddbe7bbf56bfa857eabc15341bc736cf5..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu128-x86_64-linux/yoso/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _yoso_3173620_dirty -ops = torch.ops._yoso_3173620_dirty - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_yoso_3173620_dirty::{op_name}" \ No newline at end of file diff --git a/build/torch28-cxx11-cu128-x86_64-linux/yoso/_yoso_3173620_dirty.abi3.so b/build/torch28-cxx11-cu128-x86_64-linux/yoso/_yoso_3173620_dirty.abi3.so deleted file mode 100644 index b6ad1947343dd300d552b3467e35bba981c7ba1f..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu128-x86_64-linux/yoso/_yoso_3173620_dirty.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bd27666f9ad974f958ffeb0279e54973aa4b7fa26a94ca855371ebd54de57ece -size 3045960 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..b1738b47b313effeb7568d78344fdfd30fefca3e --- /dev/null +++ b/build/torch28-cxx11-cu129-x86_64-linux/__init__.py @@ -0,0 +1,11 @@ +from ._ops import ops + +fast_hash = ops.fast_hash +lsh_cumulation = ops.lsh_cumulation +lsh_weighted_cumulation = ops.lsh_weighted_cumulation + +__all__ = [ + "fast_hash", + "lsh_cumulation", + "lsh_weighted_cumulation", +] \ No newline at end of file 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..650bfbe865b7c006f1a38580c8a3d6a264be2072 --- /dev/null +++ b/build/torch28-cxx11-cu129-x86_64-linux/_ops.py @@ -0,0 +1,9 @@ +import torch +from . import _yoso_ea085fb +ops = torch.ops._yoso_ea085fb + +def add_op_namespace_prefix(op_name: str): + """ + Prefix op by namespace. + """ + return f"_yoso_ea085fb::{op_name}" \ No newline at end of file diff --git a/build/torch28-cxx11-cu129-x86_64-linux/_yoso_ea085fb.abi3.so b/build/torch28-cxx11-cu129-x86_64-linux/_yoso_ea085fb.abi3.so new file mode 100644 index 0000000000000000000000000000000000000000..3993e969923ca43641fe5e487d05fff8abfa0c32 --- /dev/null +++ b/build/torch28-cxx11-cu129-x86_64-linux/_yoso_ea085fb.abi3.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9ecabefe91f4b70e64f81232d6fd0cc386a06c7b6f9360c45c96f264145e37db +size 3060240 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/yoso/__init__.py b/build/torch28-cxx11-cu129-x86_64-linux/yoso/__init__.py index b1738b47b313effeb7568d78344fdfd30fefca3e..03dbc1afe1cf156661a2b1b22003cd5f599a0309 100644 --- a/build/torch28-cxx11-cu129-x86_64-linux/yoso/__init__.py +++ b/build/torch28-cxx11-cu129-x86_64-linux/yoso/__init__.py @@ -1,11 +1,26 @@ -from ._ops import ops +import ctypes +import sys -fast_hash = ops.fast_hash -lsh_cumulation = ops.lsh_cumulation -lsh_weighted_cumulation = ops.lsh_weighted_cumulation +import importlib +from pathlib import Path +from types import ModuleType -__all__ = [ - "fast_hash", - "lsh_cumulation", - "lsh_weighted_cumulation", -] \ No newline at end of file +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/yoso/__pycache__/__init__.cpython-313.pyc b/build/torch28-cxx11-cu129-x86_64-linux/yoso/__pycache__/__init__.cpython-313.pyc deleted file mode 100644 index 13e84f926d8fa9286658110599e0a72833ed6454..0000000000000000000000000000000000000000 Binary files a/build/torch28-cxx11-cu129-x86_64-linux/yoso/__pycache__/__init__.cpython-313.pyc and /dev/null differ diff --git a/build/torch28-cxx11-cu129-x86_64-linux/yoso/__pycache__/_ops.cpython-313.pyc b/build/torch28-cxx11-cu129-x86_64-linux/yoso/__pycache__/_ops.cpython-313.pyc deleted file mode 100644 index 60cec13bd1e60a856a887dcd35241156b36b8ff3..0000000000000000000000000000000000000000 Binary files a/build/torch28-cxx11-cu129-x86_64-linux/yoso/__pycache__/_ops.cpython-313.pyc and /dev/null differ diff --git a/build/torch28-cxx11-cu129-x86_64-linux/yoso/_ops.py b/build/torch28-cxx11-cu129-x86_64-linux/yoso/_ops.py deleted file mode 100644 index 31d4d73ddbe7bbf56bfa857eabc15341bc736cf5..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu129-x86_64-linux/yoso/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _yoso_3173620_dirty -ops = torch.ops._yoso_3173620_dirty - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_yoso_3173620_dirty::{op_name}" \ No newline at end of file diff --git a/build/torch28-cxx11-cu129-x86_64-linux/yoso/_yoso_3173620_dirty.abi3.so b/build/torch28-cxx11-cu129-x86_64-linux/yoso/_yoso_3173620_dirty.abi3.so deleted file mode 100644 index f61763e8a9f25312c80442c9cde9e5342a0aaf46..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu129-x86_64-linux/yoso/_yoso_3173620_dirty.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:67cfb08278e43598e473113ac2a67522b922a0859d008e18ad5137a112ea4df7 -size 3055168 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..b1738b47b313effeb7568d78344fdfd30fefca3e --- /dev/null +++ b/build/torch29-cxx11-cu126-x86_64-linux/__init__.py @@ -0,0 +1,11 @@ +from ._ops import ops + +fast_hash = ops.fast_hash +lsh_cumulation = ops.lsh_cumulation +lsh_weighted_cumulation = ops.lsh_weighted_cumulation + +__all__ = [ + "fast_hash", + "lsh_cumulation", + "lsh_weighted_cumulation", +] \ No newline at end of file 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..650bfbe865b7c006f1a38580c8a3d6a264be2072 --- /dev/null +++ b/build/torch29-cxx11-cu126-x86_64-linux/_ops.py @@ -0,0 +1,9 @@ +import torch +from . import _yoso_ea085fb +ops = torch.ops._yoso_ea085fb + +def add_op_namespace_prefix(op_name: str): + """ + Prefix op by namespace. + """ + return f"_yoso_ea085fb::{op_name}" \ No newline at end of file diff --git a/build/torch29-cxx11-cu126-x86_64-linux/_yoso_ea085fb.abi3.so b/build/torch29-cxx11-cu126-x86_64-linux/_yoso_ea085fb.abi3.so new file mode 100644 index 0000000000000000000000000000000000000000..cf8d76f0a6fac5e62e02362603523b55129b2764 --- /dev/null +++ b/build/torch29-cxx11-cu126-x86_64-linux/_yoso_ea085fb.abi3.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c1839c25df7d88b1bfd3cc78f4dacce3ca5871a07540bc7e2f84b3988f556113 +size 2504336 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/yoso/__init__.py b/build/torch29-cxx11-cu126-x86_64-linux/yoso/__init__.py index b1738b47b313effeb7568d78344fdfd30fefca3e..03dbc1afe1cf156661a2b1b22003cd5f599a0309 100644 --- a/build/torch29-cxx11-cu126-x86_64-linux/yoso/__init__.py +++ b/build/torch29-cxx11-cu126-x86_64-linux/yoso/__init__.py @@ -1,11 +1,26 @@ -from ._ops import ops +import ctypes +import sys -fast_hash = ops.fast_hash -lsh_cumulation = ops.lsh_cumulation -lsh_weighted_cumulation = ops.lsh_weighted_cumulation +import importlib +from pathlib import Path +from types import ModuleType -__all__ = [ - "fast_hash", - "lsh_cumulation", - "lsh_weighted_cumulation", -] \ No newline at end of file +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/yoso/__pycache__/__init__.cpython-313.pyc b/build/torch29-cxx11-cu126-x86_64-linux/yoso/__pycache__/__init__.cpython-313.pyc deleted file mode 100644 index 714d07a8101d6486ddeba30d930c9804aa0cbb15..0000000000000000000000000000000000000000 Binary files a/build/torch29-cxx11-cu126-x86_64-linux/yoso/__pycache__/__init__.cpython-313.pyc and /dev/null differ diff --git a/build/torch29-cxx11-cu126-x86_64-linux/yoso/__pycache__/_ops.cpython-313.pyc b/build/torch29-cxx11-cu126-x86_64-linux/yoso/__pycache__/_ops.cpython-313.pyc deleted file mode 100644 index 20e09a034c94c4d6d4a1672e58f67b7c7ae6d6fb..0000000000000000000000000000000000000000 Binary files a/build/torch29-cxx11-cu126-x86_64-linux/yoso/__pycache__/_ops.cpython-313.pyc and /dev/null differ diff --git a/build/torch29-cxx11-cu126-x86_64-linux/yoso/_ops.py b/build/torch29-cxx11-cu126-x86_64-linux/yoso/_ops.py deleted file mode 100644 index 31d4d73ddbe7bbf56bfa857eabc15341bc736cf5..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu126-x86_64-linux/yoso/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _yoso_3173620_dirty -ops = torch.ops._yoso_3173620_dirty - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_yoso_3173620_dirty::{op_name}" \ No newline at end of file diff --git a/build/torch29-cxx11-cu126-x86_64-linux/yoso/_yoso_3173620_dirty.abi3.so b/build/torch29-cxx11-cu126-x86_64-linux/yoso/_yoso_3173620_dirty.abi3.so deleted file mode 100644 index e0be7c2ae8513c2eaa6c7d4b5db3987724bbc859..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu126-x86_64-linux/yoso/_yoso_3173620_dirty.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:59b2e7ead396d2c977cc0523a5f5f112d9fbc85b637cca5e4fd07c1062accbdf -size 2499280 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..b1738b47b313effeb7568d78344fdfd30fefca3e --- /dev/null +++ b/build/torch29-cxx11-cu128-x86_64-linux/__init__.py @@ -0,0 +1,11 @@ +from ._ops import ops + +fast_hash = ops.fast_hash +lsh_cumulation = ops.lsh_cumulation +lsh_weighted_cumulation = ops.lsh_weighted_cumulation + +__all__ = [ + "fast_hash", + "lsh_cumulation", + "lsh_weighted_cumulation", +] \ No newline at end of file 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..650bfbe865b7c006f1a38580c8a3d6a264be2072 --- /dev/null +++ b/build/torch29-cxx11-cu128-x86_64-linux/_ops.py @@ -0,0 +1,9 @@ +import torch +from . import _yoso_ea085fb +ops = torch.ops._yoso_ea085fb + +def add_op_namespace_prefix(op_name: str): + """ + Prefix op by namespace. + """ + return f"_yoso_ea085fb::{op_name}" \ No newline at end of file diff --git a/build/torch29-cxx11-cu128-x86_64-linux/_yoso_ea085fb.abi3.so b/build/torch29-cxx11-cu128-x86_64-linux/_yoso_ea085fb.abi3.so new file mode 100644 index 0000000000000000000000000000000000000000..b59918d8f890a4f78dd40828dde626e4fc0ec849 --- /dev/null +++ b/build/torch29-cxx11-cu128-x86_64-linux/_yoso_ea085fb.abi3.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:969f74ffb81516c2aa9750bf44e5b3cebe94559c4233b1a29381eef4f3ecb47e +size 3051000 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/yoso/__init__.py b/build/torch29-cxx11-cu128-x86_64-linux/yoso/__init__.py index b1738b47b313effeb7568d78344fdfd30fefca3e..03dbc1afe1cf156661a2b1b22003cd5f599a0309 100644 --- a/build/torch29-cxx11-cu128-x86_64-linux/yoso/__init__.py +++ b/build/torch29-cxx11-cu128-x86_64-linux/yoso/__init__.py @@ -1,11 +1,26 @@ -from ._ops import ops +import ctypes +import sys -fast_hash = ops.fast_hash -lsh_cumulation = ops.lsh_cumulation -lsh_weighted_cumulation = ops.lsh_weighted_cumulation +import importlib +from pathlib import Path +from types import ModuleType -__all__ = [ - "fast_hash", - "lsh_cumulation", - "lsh_weighted_cumulation", -] \ No newline at end of file +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/yoso/__pycache__/__init__.cpython-313.pyc b/build/torch29-cxx11-cu128-x86_64-linux/yoso/__pycache__/__init__.cpython-313.pyc deleted file mode 100644 index 294679a8debcab7daf62a2d755682f77a75f37f7..0000000000000000000000000000000000000000 Binary files a/build/torch29-cxx11-cu128-x86_64-linux/yoso/__pycache__/__init__.cpython-313.pyc and /dev/null differ diff --git a/build/torch29-cxx11-cu128-x86_64-linux/yoso/__pycache__/_ops.cpython-313.pyc b/build/torch29-cxx11-cu128-x86_64-linux/yoso/__pycache__/_ops.cpython-313.pyc deleted file mode 100644 index 85621da218a07866c5c0339dbfff158a10d225eb..0000000000000000000000000000000000000000 Binary files a/build/torch29-cxx11-cu128-x86_64-linux/yoso/__pycache__/_ops.cpython-313.pyc and /dev/null differ diff --git a/build/torch29-cxx11-cu128-x86_64-linux/yoso/_ops.py b/build/torch29-cxx11-cu128-x86_64-linux/yoso/_ops.py deleted file mode 100644 index 31d4d73ddbe7bbf56bfa857eabc15341bc736cf5..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu128-x86_64-linux/yoso/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _yoso_3173620_dirty -ops = torch.ops._yoso_3173620_dirty - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_yoso_3173620_dirty::{op_name}" \ No newline at end of file diff --git a/build/torch29-cxx11-cu128-x86_64-linux/yoso/_yoso_3173620_dirty.abi3.so b/build/torch29-cxx11-cu128-x86_64-linux/yoso/_yoso_3173620_dirty.abi3.so deleted file mode 100644 index 4bb82dbaff048ce863dbcfc7969aa27f796e99cd..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu128-x86_64-linux/yoso/_yoso_3173620_dirty.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d1079a87dca1bb50c85509094efa36b42a717375a2a2e795ae917c1b47f51b43 -size 3045936 diff --git a/build/torch29-cxx11-cu130-x86_64-linux/__init__.py b/build/torch29-cxx11-cu130-x86_64-linux/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..b1738b47b313effeb7568d78344fdfd30fefca3e --- /dev/null +++ b/build/torch29-cxx11-cu130-x86_64-linux/__init__.py @@ -0,0 +1,11 @@ +from ._ops import ops + +fast_hash = ops.fast_hash +lsh_cumulation = ops.lsh_cumulation +lsh_weighted_cumulation = ops.lsh_weighted_cumulation + +__all__ = [ + "fast_hash", + "lsh_cumulation", + "lsh_weighted_cumulation", +] \ No newline at end of file diff --git a/build/torch29-cxx11-cu130-x86_64-linux/_ops.py b/build/torch29-cxx11-cu130-x86_64-linux/_ops.py new file mode 100644 index 0000000000000000000000000000000000000000..650bfbe865b7c006f1a38580c8a3d6a264be2072 --- /dev/null +++ b/build/torch29-cxx11-cu130-x86_64-linux/_ops.py @@ -0,0 +1,9 @@ +import torch +from . import _yoso_ea085fb +ops = torch.ops._yoso_ea085fb + +def add_op_namespace_prefix(op_name: str): + """ + Prefix op by namespace. + """ + return f"_yoso_ea085fb::{op_name}" \ No newline at end of file diff --git a/build/torch29-cxx11-cu130-x86_64-linux/_yoso_ea085fb.abi3.so b/build/torch29-cxx11-cu130-x86_64-linux/_yoso_ea085fb.abi3.so new file mode 100644 index 0000000000000000000000000000000000000000..b411ae021b87eae722d1bdaece6f555508c77408 --- /dev/null +++ b/build/torch29-cxx11-cu130-x86_64-linux/_yoso_ea085fb.abi3.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd5f35339ee5a1cfbbaec42b2a40e69ceaf42d518155d228718376bb852d31dd +size 3104152 diff --git a/build/torch29-cxx11-cu130-x86_64-linux/metadata.json b/build/torch29-cxx11-cu130-x86_64-linux/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..76bafa5f33b6818aa6bb4cab04be811b87519b44 --- /dev/null +++ b/build/torch29-cxx11-cu130-x86_64-linux/metadata.json @@ -0,0 +1 @@ +{"python-depends":[]} \ No newline at end of file diff --git a/build/torch29-cxx11-cu130-x86_64-linux/yoso/__init__.py b/build/torch29-cxx11-cu130-x86_64-linux/yoso/__init__.py index b1738b47b313effeb7568d78344fdfd30fefca3e..03dbc1afe1cf156661a2b1b22003cd5f599a0309 100644 --- a/build/torch29-cxx11-cu130-x86_64-linux/yoso/__init__.py +++ b/build/torch29-cxx11-cu130-x86_64-linux/yoso/__init__.py @@ -1,11 +1,26 @@ -from ._ops import ops +import ctypes +import sys -fast_hash = ops.fast_hash -lsh_cumulation = ops.lsh_cumulation -lsh_weighted_cumulation = ops.lsh_weighted_cumulation +import importlib +from pathlib import Path +from types import ModuleType -__all__ = [ - "fast_hash", - "lsh_cumulation", - "lsh_weighted_cumulation", -] \ No newline at end of file +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-cu130-x86_64-linux/yoso/__pycache__/__init__.cpython-313.pyc b/build/torch29-cxx11-cu130-x86_64-linux/yoso/__pycache__/__init__.cpython-313.pyc deleted file mode 100644 index 0a5d1831e85ccb093c813f3185184ae0b38bcd2e..0000000000000000000000000000000000000000 Binary files a/build/torch29-cxx11-cu130-x86_64-linux/yoso/__pycache__/__init__.cpython-313.pyc and /dev/null differ diff --git a/build/torch29-cxx11-cu130-x86_64-linux/yoso/__pycache__/_ops.cpython-313.pyc b/build/torch29-cxx11-cu130-x86_64-linux/yoso/__pycache__/_ops.cpython-313.pyc deleted file mode 100644 index cc55948bcf9e3765f0f10a52eabd0582a57cf1d5..0000000000000000000000000000000000000000 Binary files a/build/torch29-cxx11-cu130-x86_64-linux/yoso/__pycache__/_ops.cpython-313.pyc and /dev/null differ diff --git a/build/torch29-cxx11-cu130-x86_64-linux/yoso/_ops.py b/build/torch29-cxx11-cu130-x86_64-linux/yoso/_ops.py deleted file mode 100644 index 31d4d73ddbe7bbf56bfa857eabc15341bc736cf5..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu130-x86_64-linux/yoso/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _yoso_3173620_dirty -ops = torch.ops._yoso_3173620_dirty - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_yoso_3173620_dirty::{op_name}" \ No newline at end of file diff --git a/build/torch29-cxx11-cu130-x86_64-linux/yoso/_yoso_3173620_dirty.abi3.so b/build/torch29-cxx11-cu130-x86_64-linux/yoso/_yoso_3173620_dirty.abi3.so deleted file mode 100644 index 5c52294329204bb7386028b0b0100a2cc43f0805..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu130-x86_64-linux/yoso/_yoso_3173620_dirty.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:298f1c5374518a1d6497e22171492ce0113a6b367cb40beb20782005b93a9745 -size 3099592