Instructions to use kernels-community/deformable-detr with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use kernels-community/deformable-detr with Kernels:
# !pip install kernels from kernels import get_kernel # a version (or an explicit revision) is required; see the "Files and versions" tab for the available ones kernel = get_kernel("kernels-community/deformable-detr", version=1) - Notebooks
- Google Colab
- Kaggle
Build uploaded using `kernels`.
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- build/torch210-cxx11-cu126-x86_64-linux/__init__.py +46 -0
- build/{torch28-cxx11-cu128-x86_64-linux/deformable_detr/_deformable_detr_57c3d32.abi3.so → torch210-cxx11-cu126-x86_64-linux/_deformable_detr_7ba5e9c.abi3.so} +2 -2
- build/{torch28-cxx11-cu126-x86_64-linux/deformable_detr → torch210-cxx11-cu126-x86_64-linux}/_ops.py +3 -3
- build/torch210-cxx11-cu126-x86_64-linux/deformable_detr/__init__.py +26 -0
- build/{torch28-cxx11-cu126-x86_64-linux/deformable_detr → torch210-cxx11-cu126-x86_64-linux}/layers.py +0 -0
- build/torch210-cxx11-cu126-x86_64-linux/metadata.json +1 -0
- build/torch210-cxx11-cu128-x86_64-linux/__init__.py +46 -0
- build/torch210-cxx11-cu128-x86_64-linux/_deformable_detr_7ba5e9c.abi3.so +3 -0
- build/{torch28-cxx11-cu128-x86_64-linux/deformable_detr → torch210-cxx11-cu128-x86_64-linux}/_ops.py +3 -3
- build/torch210-cxx11-cu128-x86_64-linux/deformable_detr/__init__.py +26 -0
- build/{torch28-cxx11-cu128-x86_64-linux/deformable_detr → torch210-cxx11-cu128-x86_64-linux}/layers.py +0 -0
- build/torch210-cxx11-cu128-x86_64-linux/metadata.json +1 -0
- build/torch210-cxx11-cu130-x86_64-linux/__init__.py +46 -0
- build/{torch28-cxx11-cu129-x86_64-linux/deformable_detr/_deformable_detr_57c3d32.abi3.so → torch210-cxx11-cu130-x86_64-linux/_deformable_detr_7ba5e9c.abi3.so} +2 -2
- build/{torch28-cxx11-cu129-x86_64-linux/deformable_detr → torch210-cxx11-cu130-x86_64-linux}/_ops.py +3 -3
- build/torch210-cxx11-cu130-x86_64-linux/deformable_detr/__init__.py +26 -0
- build/{torch28-cxx11-cu129-x86_64-linux/deformable_detr → torch210-cxx11-cu130-x86_64-linux}/layers.py +0 -0
- build/torch210-cxx11-cu130-x86_64-linux/metadata.json +1 -0
- build/torch28-cxx11-cu126-x86_64-linux/__init__.py +46 -0
- build/{torch29-cxx11-cu126-x86_64-linux/deformable_detr/_deformable_detr_57c3d32.abi3.so → torch28-cxx11-cu126-x86_64-linux/_deformable_detr_7ba5e9c.abi3.so} +2 -2
- build/{torch29-cxx11-cu126-x86_64-linux/deformable_detr → torch28-cxx11-cu126-x86_64-linux}/_ops.py +3 -3
- build/torch28-cxx11-cu126-x86_64-linux/deformable_detr/__init__.py +22 -42
- build/torch28-cxx11-cu126-x86_64-linux/deformable_detr/__pycache__/__init__.cpython-313.pyc +0 -0
- build/torch28-cxx11-cu126-x86_64-linux/deformable_detr/__pycache__/_ops.cpython-313.pyc +0 -0
- build/torch28-cxx11-cu126-x86_64-linux/deformable_detr/__pycache__/layers.cpython-313.pyc +0 -0
- build/{torch29-cxx11-cu126-x86_64-linux/deformable_detr → torch28-cxx11-cu126-x86_64-linux}/layers.py +0 -0
- build/torch28-cxx11-cu126-x86_64-linux/metadata.json +1 -0
- build/torch28-cxx11-cu128-x86_64-linux/__init__.py +46 -0
- build/torch28-cxx11-cu128-x86_64-linux/_deformable_detr_7ba5e9c.abi3.so +3 -0
- build/torch28-cxx11-cu128-x86_64-linux/_ops.py +9 -0
- build/torch28-cxx11-cu128-x86_64-linux/deformable_detr/__init__.py +22 -42
- build/torch28-cxx11-cu128-x86_64-linux/deformable_detr/__pycache__/__init__.cpython-313.pyc +0 -0
- build/torch28-cxx11-cu128-x86_64-linux/deformable_detr/__pycache__/_ops.cpython-313.pyc +0 -0
- build/torch28-cxx11-cu128-x86_64-linux/deformable_detr/__pycache__/layers.cpython-313.pyc +0 -0
- build/{torch29-cxx11-cu128-x86_64-linux/deformable_detr → torch28-cxx11-cu128-x86_64-linux}/layers.py +0 -0
- build/torch28-cxx11-cu128-x86_64-linux/metadata.json +1 -0
- build/torch28-cxx11-cu129-x86_64-linux/__init__.py +46 -0
- build/torch28-cxx11-cu129-x86_64-linux/_deformable_detr_7ba5e9c.abi3.so +3 -0
- build/torch28-cxx11-cu129-x86_64-linux/_ops.py +9 -0
- build/torch28-cxx11-cu129-x86_64-linux/deformable_detr/__init__.py +22 -42
- build/torch28-cxx11-cu129-x86_64-linux/deformable_detr/__pycache__/__init__.cpython-313.pyc +0 -0
- build/torch28-cxx11-cu129-x86_64-linux/deformable_detr/__pycache__/_ops.cpython-313.pyc +0 -0
- build/torch28-cxx11-cu129-x86_64-linux/deformable_detr/__pycache__/layers.cpython-313.pyc +0 -0
- build/{torch29-cxx11-cu130-x86_64-linux/deformable_detr → torch28-cxx11-cu129-x86_64-linux}/layers.py +0 -0
- build/torch28-cxx11-cu129-x86_64-linux/metadata.json +1 -0
- build/torch29-cxx11-cu126-x86_64-linux/__init__.py +46 -0
- build/{torch28-cxx11-cu126-x86_64-linux/deformable_detr/_deformable_detr_57c3d32.abi3.so → torch29-cxx11-cu126-x86_64-linux/_deformable_detr_7ba5e9c.abi3.so} +2 -2
- build/torch29-cxx11-cu126-x86_64-linux/_ops.py +9 -0
- build/torch29-cxx11-cu126-x86_64-linux/deformable_detr/__init__.py +22 -42
- build/torch29-cxx11-cu126-x86_64-linux/deformable_detr/__pycache__/__init__.cpython-313.pyc +0 -0
build/torch210-cxx11-cu126-x86_64-linux/__init__.py
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import List
|
| 2 |
+
import torch
|
| 3 |
+
|
| 4 |
+
from ._ops import ops
|
| 5 |
+
from . import layers
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
def ms_deform_attn_backward(
|
| 9 |
+
value: torch.Tensor,
|
| 10 |
+
spatial_shapes: torch.Tensor,
|
| 11 |
+
level_start_index: torch.Tensor,
|
| 12 |
+
sampling_loc: torch.Tensor,
|
| 13 |
+
attn_weight: torch.Tensor,
|
| 14 |
+
grad_output: torch.Tensor,
|
| 15 |
+
im2col_step: int,
|
| 16 |
+
) -> List[torch.Tensor]:
|
| 17 |
+
return ops.ms_deform_attn_backward(
|
| 18 |
+
value,
|
| 19 |
+
spatial_shapes,
|
| 20 |
+
level_start_index,
|
| 21 |
+
sampling_loc,
|
| 22 |
+
attn_weight,
|
| 23 |
+
grad_output,
|
| 24 |
+
im2col_step,
|
| 25 |
+
)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
def ms_deform_attn_forward(
|
| 29 |
+
value: torch.Tensor,
|
| 30 |
+
spatial_shapes: torch.Tensor,
|
| 31 |
+
level_start_index: torch.Tensor,
|
| 32 |
+
sampling_loc: torch.Tensor,
|
| 33 |
+
attn_weight: torch.Tensor,
|
| 34 |
+
im2col_step: int,
|
| 35 |
+
) -> torch.Tensor:
|
| 36 |
+
return ops.ms_deform_attn_forward(
|
| 37 |
+
value,
|
| 38 |
+
spatial_shapes,
|
| 39 |
+
level_start_index,
|
| 40 |
+
sampling_loc,
|
| 41 |
+
attn_weight,
|
| 42 |
+
im2col_step,
|
| 43 |
+
)
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"]
|
build/{torch28-cxx11-cu128-x86_64-linux/deformable_detr/_deformable_detr_57c3d32.abi3.so → torch210-cxx11-cu126-x86_64-linux/_deformable_detr_7ba5e9c.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:983865cafc6b57fb51e47143078b330f21ceb02c4f0a0a4408cdca2c96d6bb72
|
| 3 |
+
size 8541064
|
build/{torch28-cxx11-cu126-x86_64-linux/deformable_detr → torch210-cxx11-cu126-x86_64-linux}/_ops.py
RENAMED
|
@@ -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 _deformable_detr_7ba5e9c
|
| 3 |
+
ops = torch.ops._deformable_detr_7ba5e9c
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_deformable_detr_7ba5e9c::{op_name}"
|
build/torch210-cxx11-cu126-x86_64-linux/deformable_detr/__init__.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import ctypes
|
| 2 |
+
import sys
|
| 3 |
+
|
| 4 |
+
import importlib
|
| 5 |
+
from pathlib import Path
|
| 6 |
+
from types import ModuleType
|
| 7 |
+
|
| 8 |
+
def _import_from_path(file_path: Path) -> ModuleType:
|
| 9 |
+
# We cannot use the module name as-is, after adding it to `sys.modules`,
|
| 10 |
+
# it would also be used for other imports. So, we make a module name that
|
| 11 |
+
# depends on the path for it to be unique using the hex-encoded hash of
|
| 12 |
+
# the path.
|
| 13 |
+
path_hash = "{:x}".format(ctypes.c_size_t(hash(file_path.absolute())).value)
|
| 14 |
+
module_name = path_hash
|
| 15 |
+
spec = importlib.util.spec_from_file_location(module_name, file_path)
|
| 16 |
+
if spec is None:
|
| 17 |
+
raise ImportError(f"Cannot load spec for {module_name} from {file_path}")
|
| 18 |
+
module = importlib.util.module_from_spec(spec)
|
| 19 |
+
if module is None:
|
| 20 |
+
raise ImportError(f"Cannot load module {module_name} from spec")
|
| 21 |
+
sys.modules[module_name] = module
|
| 22 |
+
spec.loader.exec_module(module) # type: ignore
|
| 23 |
+
return module
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
globals().update(vars(_import_from_path(Path(__file__).parent.parent / "__init__.py")))
|
build/{torch28-cxx11-cu126-x86_64-linux/deformable_detr → torch210-cxx11-cu126-x86_64-linux}/layers.py
RENAMED
|
File without changes
|
build/torch210-cxx11-cu126-x86_64-linux/metadata.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"python-depends":[]}
|
build/torch210-cxx11-cu128-x86_64-linux/__init__.py
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import List
|
| 2 |
+
import torch
|
| 3 |
+
|
| 4 |
+
from ._ops import ops
|
| 5 |
+
from . import layers
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
def ms_deform_attn_backward(
|
| 9 |
+
value: torch.Tensor,
|
| 10 |
+
spatial_shapes: torch.Tensor,
|
| 11 |
+
level_start_index: torch.Tensor,
|
| 12 |
+
sampling_loc: torch.Tensor,
|
| 13 |
+
attn_weight: torch.Tensor,
|
| 14 |
+
grad_output: torch.Tensor,
|
| 15 |
+
im2col_step: int,
|
| 16 |
+
) -> List[torch.Tensor]:
|
| 17 |
+
return ops.ms_deform_attn_backward(
|
| 18 |
+
value,
|
| 19 |
+
spatial_shapes,
|
| 20 |
+
level_start_index,
|
| 21 |
+
sampling_loc,
|
| 22 |
+
attn_weight,
|
| 23 |
+
grad_output,
|
| 24 |
+
im2col_step,
|
| 25 |
+
)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
def ms_deform_attn_forward(
|
| 29 |
+
value: torch.Tensor,
|
| 30 |
+
spatial_shapes: torch.Tensor,
|
| 31 |
+
level_start_index: torch.Tensor,
|
| 32 |
+
sampling_loc: torch.Tensor,
|
| 33 |
+
attn_weight: torch.Tensor,
|
| 34 |
+
im2col_step: int,
|
| 35 |
+
) -> torch.Tensor:
|
| 36 |
+
return ops.ms_deform_attn_forward(
|
| 37 |
+
value,
|
| 38 |
+
spatial_shapes,
|
| 39 |
+
level_start_index,
|
| 40 |
+
sampling_loc,
|
| 41 |
+
attn_weight,
|
| 42 |
+
im2col_step,
|
| 43 |
+
)
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"]
|
build/torch210-cxx11-cu128-x86_64-linux/_deformable_detr_7ba5e9c.abi3.so
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5622c742bb45a864c22f78340b820f45651868ea8e34e6e4fa5f11ae99421901
|
| 3 |
+
size 11524544
|
build/{torch28-cxx11-cu128-x86_64-linux/deformable_detr → torch210-cxx11-cu128-x86_64-linux}/_ops.py
RENAMED
|
@@ -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 _deformable_detr_7ba5e9c
|
| 3 |
+
ops = torch.ops._deformable_detr_7ba5e9c
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_deformable_detr_7ba5e9c::{op_name}"
|
build/torch210-cxx11-cu128-x86_64-linux/deformable_detr/__init__.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import ctypes
|
| 2 |
+
import sys
|
| 3 |
+
|
| 4 |
+
import importlib
|
| 5 |
+
from pathlib import Path
|
| 6 |
+
from types import ModuleType
|
| 7 |
+
|
| 8 |
+
def _import_from_path(file_path: Path) -> ModuleType:
|
| 9 |
+
# We cannot use the module name as-is, after adding it to `sys.modules`,
|
| 10 |
+
# it would also be used for other imports. So, we make a module name that
|
| 11 |
+
# depends on the path for it to be unique using the hex-encoded hash of
|
| 12 |
+
# the path.
|
| 13 |
+
path_hash = "{:x}".format(ctypes.c_size_t(hash(file_path.absolute())).value)
|
| 14 |
+
module_name = path_hash
|
| 15 |
+
spec = importlib.util.spec_from_file_location(module_name, file_path)
|
| 16 |
+
if spec is None:
|
| 17 |
+
raise ImportError(f"Cannot load spec for {module_name} from {file_path}")
|
| 18 |
+
module = importlib.util.module_from_spec(spec)
|
| 19 |
+
if module is None:
|
| 20 |
+
raise ImportError(f"Cannot load module {module_name} from spec")
|
| 21 |
+
sys.modules[module_name] = module
|
| 22 |
+
spec.loader.exec_module(module) # type: ignore
|
| 23 |
+
return module
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
globals().update(vars(_import_from_path(Path(__file__).parent.parent / "__init__.py")))
|
build/{torch28-cxx11-cu128-x86_64-linux/deformable_detr → torch210-cxx11-cu128-x86_64-linux}/layers.py
RENAMED
|
File without changes
|
build/torch210-cxx11-cu128-x86_64-linux/metadata.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"python-depends":[]}
|
build/torch210-cxx11-cu130-x86_64-linux/__init__.py
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import List
|
| 2 |
+
import torch
|
| 3 |
+
|
| 4 |
+
from ._ops import ops
|
| 5 |
+
from . import layers
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
def ms_deform_attn_backward(
|
| 9 |
+
value: torch.Tensor,
|
| 10 |
+
spatial_shapes: torch.Tensor,
|
| 11 |
+
level_start_index: torch.Tensor,
|
| 12 |
+
sampling_loc: torch.Tensor,
|
| 13 |
+
attn_weight: torch.Tensor,
|
| 14 |
+
grad_output: torch.Tensor,
|
| 15 |
+
im2col_step: int,
|
| 16 |
+
) -> List[torch.Tensor]:
|
| 17 |
+
return ops.ms_deform_attn_backward(
|
| 18 |
+
value,
|
| 19 |
+
spatial_shapes,
|
| 20 |
+
level_start_index,
|
| 21 |
+
sampling_loc,
|
| 22 |
+
attn_weight,
|
| 23 |
+
grad_output,
|
| 24 |
+
im2col_step,
|
| 25 |
+
)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
def ms_deform_attn_forward(
|
| 29 |
+
value: torch.Tensor,
|
| 30 |
+
spatial_shapes: torch.Tensor,
|
| 31 |
+
level_start_index: torch.Tensor,
|
| 32 |
+
sampling_loc: torch.Tensor,
|
| 33 |
+
attn_weight: torch.Tensor,
|
| 34 |
+
im2col_step: int,
|
| 35 |
+
) -> torch.Tensor:
|
| 36 |
+
return ops.ms_deform_attn_forward(
|
| 37 |
+
value,
|
| 38 |
+
spatial_shapes,
|
| 39 |
+
level_start_index,
|
| 40 |
+
sampling_loc,
|
| 41 |
+
attn_weight,
|
| 42 |
+
im2col_step,
|
| 43 |
+
)
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"]
|
build/{torch28-cxx11-cu129-x86_64-linux/deformable_detr/_deformable_detr_57c3d32.abi3.so → torch210-cxx11-cu130-x86_64-linux/_deformable_detr_7ba5e9c.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:cc258c88b7ebdaa8ab9027b34b111677b6d19fef02d4db23cf7d9f05139ecdd6
|
| 3 |
+
size 9808352
|
build/{torch28-cxx11-cu129-x86_64-linux/deformable_detr → torch210-cxx11-cu130-x86_64-linux}/_ops.py
RENAMED
|
@@ -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 _deformable_detr_7ba5e9c
|
| 3 |
+
ops = torch.ops._deformable_detr_7ba5e9c
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_deformable_detr_7ba5e9c::{op_name}"
|
build/torch210-cxx11-cu130-x86_64-linux/deformable_detr/__init__.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import ctypes
|
| 2 |
+
import sys
|
| 3 |
+
|
| 4 |
+
import importlib
|
| 5 |
+
from pathlib import Path
|
| 6 |
+
from types import ModuleType
|
| 7 |
+
|
| 8 |
+
def _import_from_path(file_path: Path) -> ModuleType:
|
| 9 |
+
# We cannot use the module name as-is, after adding it to `sys.modules`,
|
| 10 |
+
# it would also be used for other imports. So, we make a module name that
|
| 11 |
+
# depends on the path for it to be unique using the hex-encoded hash of
|
| 12 |
+
# the path.
|
| 13 |
+
path_hash = "{:x}".format(ctypes.c_size_t(hash(file_path.absolute())).value)
|
| 14 |
+
module_name = path_hash
|
| 15 |
+
spec = importlib.util.spec_from_file_location(module_name, file_path)
|
| 16 |
+
if spec is None:
|
| 17 |
+
raise ImportError(f"Cannot load spec for {module_name} from {file_path}")
|
| 18 |
+
module = importlib.util.module_from_spec(spec)
|
| 19 |
+
if module is None:
|
| 20 |
+
raise ImportError(f"Cannot load module {module_name} from spec")
|
| 21 |
+
sys.modules[module_name] = module
|
| 22 |
+
spec.loader.exec_module(module) # type: ignore
|
| 23 |
+
return module
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
globals().update(vars(_import_from_path(Path(__file__).parent.parent / "__init__.py")))
|
build/{torch28-cxx11-cu129-x86_64-linux/deformable_detr → torch210-cxx11-cu130-x86_64-linux}/layers.py
RENAMED
|
File without changes
|
build/torch210-cxx11-cu130-x86_64-linux/metadata.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"python-depends":[]}
|
build/torch28-cxx11-cu126-x86_64-linux/__init__.py
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import List
|
| 2 |
+
import torch
|
| 3 |
+
|
| 4 |
+
from ._ops import ops
|
| 5 |
+
from . import layers
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
def ms_deform_attn_backward(
|
| 9 |
+
value: torch.Tensor,
|
| 10 |
+
spatial_shapes: torch.Tensor,
|
| 11 |
+
level_start_index: torch.Tensor,
|
| 12 |
+
sampling_loc: torch.Tensor,
|
| 13 |
+
attn_weight: torch.Tensor,
|
| 14 |
+
grad_output: torch.Tensor,
|
| 15 |
+
im2col_step: int,
|
| 16 |
+
) -> List[torch.Tensor]:
|
| 17 |
+
return ops.ms_deform_attn_backward(
|
| 18 |
+
value,
|
| 19 |
+
spatial_shapes,
|
| 20 |
+
level_start_index,
|
| 21 |
+
sampling_loc,
|
| 22 |
+
attn_weight,
|
| 23 |
+
grad_output,
|
| 24 |
+
im2col_step,
|
| 25 |
+
)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
def ms_deform_attn_forward(
|
| 29 |
+
value: torch.Tensor,
|
| 30 |
+
spatial_shapes: torch.Tensor,
|
| 31 |
+
level_start_index: torch.Tensor,
|
| 32 |
+
sampling_loc: torch.Tensor,
|
| 33 |
+
attn_weight: torch.Tensor,
|
| 34 |
+
im2col_step: int,
|
| 35 |
+
) -> torch.Tensor:
|
| 36 |
+
return ops.ms_deform_attn_forward(
|
| 37 |
+
value,
|
| 38 |
+
spatial_shapes,
|
| 39 |
+
level_start_index,
|
| 40 |
+
sampling_loc,
|
| 41 |
+
attn_weight,
|
| 42 |
+
im2col_step,
|
| 43 |
+
)
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"]
|
build/{torch29-cxx11-cu126-x86_64-linux/deformable_detr/_deformable_detr_57c3d32.abi3.so → torch28-cxx11-cu126-x86_64-linux/_deformable_detr_7ba5e9c.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:9e7f8052b26751544b2a4c8aab8af4ab90628823b85a64dcd79f6405de428361
|
| 3 |
+
size 8535712
|
build/{torch29-cxx11-cu126-x86_64-linux/deformable_detr → torch28-cxx11-cu126-x86_64-linux}/_ops.py
RENAMED
|
@@ -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 _deformable_detr_7ba5e9c
|
| 3 |
+
ops = torch.ops._deformable_detr_7ba5e9c
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_deformable_detr_7ba5e9c::{op_name}"
|
build/torch28-cxx11-cu126-x86_64-linux/deformable_detr/__init__.py
CHANGED
|
@@ -1,46 +1,26 @@
|
|
| 1 |
-
|
| 2 |
-
import
|
| 3 |
|
| 4 |
-
|
| 5 |
-
from
|
|
|
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
-
def ms_deform_attn_backward(
|
| 9 |
-
value: torch.Tensor,
|
| 10 |
-
spatial_shapes: torch.Tensor,
|
| 11 |
-
level_start_index: torch.Tensor,
|
| 12 |
-
sampling_loc: torch.Tensor,
|
| 13 |
-
attn_weight: torch.Tensor,
|
| 14 |
-
grad_output: torch.Tensor,
|
| 15 |
-
im2col_step: int,
|
| 16 |
-
) -> List[torch.Tensor]:
|
| 17 |
-
return ops.ms_deform_attn_backward(
|
| 18 |
-
value,
|
| 19 |
-
spatial_shapes,
|
| 20 |
-
level_start_index,
|
| 21 |
-
sampling_loc,
|
| 22 |
-
attn_weight,
|
| 23 |
-
grad_output,
|
| 24 |
-
im2col_step,
|
| 25 |
-
)
|
| 26 |
|
| 27 |
-
|
| 28 |
-
def ms_deform_attn_forward(
|
| 29 |
-
value: torch.Tensor,
|
| 30 |
-
spatial_shapes: torch.Tensor,
|
| 31 |
-
level_start_index: torch.Tensor,
|
| 32 |
-
sampling_loc: torch.Tensor,
|
| 33 |
-
attn_weight: torch.Tensor,
|
| 34 |
-
im2col_step: int,
|
| 35 |
-
) -> torch.Tensor:
|
| 36 |
-
return ops.ms_deform_attn_forward(
|
| 37 |
-
value,
|
| 38 |
-
spatial_shapes,
|
| 39 |
-
level_start_index,
|
| 40 |
-
sampling_loc,
|
| 41 |
-
attn_weight,
|
| 42 |
-
im2col_step,
|
| 43 |
-
)
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"]
|
|
|
|
| 1 |
+
import ctypes
|
| 2 |
+
import sys
|
| 3 |
|
| 4 |
+
import importlib
|
| 5 |
+
from pathlib import Path
|
| 6 |
+
from types import ModuleType
|
| 7 |
|
| 8 |
+
def _import_from_path(file_path: Path) -> ModuleType:
|
| 9 |
+
# We cannot use the module name as-is, after adding it to `sys.modules`,
|
| 10 |
+
# it would also be used for other imports. So, we make a module name that
|
| 11 |
+
# depends on the path for it to be unique using the hex-encoded hash of
|
| 12 |
+
# the path.
|
| 13 |
+
path_hash = "{:x}".format(ctypes.c_size_t(hash(file_path.absolute())).value)
|
| 14 |
+
module_name = path_hash
|
| 15 |
+
spec = importlib.util.spec_from_file_location(module_name, file_path)
|
| 16 |
+
if spec is None:
|
| 17 |
+
raise ImportError(f"Cannot load spec for {module_name} from {file_path}")
|
| 18 |
+
module = importlib.util.module_from_spec(spec)
|
| 19 |
+
if module is None:
|
| 20 |
+
raise ImportError(f"Cannot load module {module_name} from spec")
|
| 21 |
+
sys.modules[module_name] = module
|
| 22 |
+
spec.loader.exec_module(module) # type: ignore
|
| 23 |
+
return module
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
+
globals().update(vars(_import_from_path(Path(__file__).parent.parent / "__init__.py")))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
build/torch28-cxx11-cu126-x86_64-linux/deformable_detr/__pycache__/__init__.cpython-313.pyc
DELETED
|
Binary file (1.5 kB)
|
|
|
build/torch28-cxx11-cu126-x86_64-linux/deformable_detr/__pycache__/_ops.cpython-313.pyc
DELETED
|
Binary file (541 Bytes)
|
|
|
build/torch28-cxx11-cu126-x86_64-linux/deformable_detr/__pycache__/layers.cpython-313.pyc
DELETED
|
Binary file (2.74 kB)
|
|
|
build/{torch29-cxx11-cu126-x86_64-linux/deformable_detr → torch28-cxx11-cu126-x86_64-linux}/layers.py
RENAMED
|
File without changes
|
build/torch28-cxx11-cu126-x86_64-linux/metadata.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"python-depends":[]}
|
build/torch28-cxx11-cu128-x86_64-linux/__init__.py
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import List
|
| 2 |
+
import torch
|
| 3 |
+
|
| 4 |
+
from ._ops import ops
|
| 5 |
+
from . import layers
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
def ms_deform_attn_backward(
|
| 9 |
+
value: torch.Tensor,
|
| 10 |
+
spatial_shapes: torch.Tensor,
|
| 11 |
+
level_start_index: torch.Tensor,
|
| 12 |
+
sampling_loc: torch.Tensor,
|
| 13 |
+
attn_weight: torch.Tensor,
|
| 14 |
+
grad_output: torch.Tensor,
|
| 15 |
+
im2col_step: int,
|
| 16 |
+
) -> List[torch.Tensor]:
|
| 17 |
+
return ops.ms_deform_attn_backward(
|
| 18 |
+
value,
|
| 19 |
+
spatial_shapes,
|
| 20 |
+
level_start_index,
|
| 21 |
+
sampling_loc,
|
| 22 |
+
attn_weight,
|
| 23 |
+
grad_output,
|
| 24 |
+
im2col_step,
|
| 25 |
+
)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
def ms_deform_attn_forward(
|
| 29 |
+
value: torch.Tensor,
|
| 30 |
+
spatial_shapes: torch.Tensor,
|
| 31 |
+
level_start_index: torch.Tensor,
|
| 32 |
+
sampling_loc: torch.Tensor,
|
| 33 |
+
attn_weight: torch.Tensor,
|
| 34 |
+
im2col_step: int,
|
| 35 |
+
) -> torch.Tensor:
|
| 36 |
+
return ops.ms_deform_attn_forward(
|
| 37 |
+
value,
|
| 38 |
+
spatial_shapes,
|
| 39 |
+
level_start_index,
|
| 40 |
+
sampling_loc,
|
| 41 |
+
attn_weight,
|
| 42 |
+
im2col_step,
|
| 43 |
+
)
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"]
|
build/torch28-cxx11-cu128-x86_64-linux/_deformable_detr_7ba5e9c.abi3.so
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e81e1303c5583c4bf177b118ae1f32dc8e5c7c21edb5314147ea8f969ea001a0
|
| 3 |
+
size 11523184
|
build/torch28-cxx11-cu128-x86_64-linux/_ops.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
from . import _deformable_detr_7ba5e9c
|
| 3 |
+
ops = torch.ops._deformable_detr_7ba5e9c
|
| 4 |
+
|
| 5 |
+
def add_op_namespace_prefix(op_name: str):
|
| 6 |
+
"""
|
| 7 |
+
Prefix op by namespace.
|
| 8 |
+
"""
|
| 9 |
+
return f"_deformable_detr_7ba5e9c::{op_name}"
|
build/torch28-cxx11-cu128-x86_64-linux/deformable_detr/__init__.py
CHANGED
|
@@ -1,46 +1,26 @@
|
|
| 1 |
-
|
| 2 |
-
import
|
| 3 |
|
| 4 |
-
|
| 5 |
-
from
|
|
|
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
-
def ms_deform_attn_backward(
|
| 9 |
-
value: torch.Tensor,
|
| 10 |
-
spatial_shapes: torch.Tensor,
|
| 11 |
-
level_start_index: torch.Tensor,
|
| 12 |
-
sampling_loc: torch.Tensor,
|
| 13 |
-
attn_weight: torch.Tensor,
|
| 14 |
-
grad_output: torch.Tensor,
|
| 15 |
-
im2col_step: int,
|
| 16 |
-
) -> List[torch.Tensor]:
|
| 17 |
-
return ops.ms_deform_attn_backward(
|
| 18 |
-
value,
|
| 19 |
-
spatial_shapes,
|
| 20 |
-
level_start_index,
|
| 21 |
-
sampling_loc,
|
| 22 |
-
attn_weight,
|
| 23 |
-
grad_output,
|
| 24 |
-
im2col_step,
|
| 25 |
-
)
|
| 26 |
|
| 27 |
-
|
| 28 |
-
def ms_deform_attn_forward(
|
| 29 |
-
value: torch.Tensor,
|
| 30 |
-
spatial_shapes: torch.Tensor,
|
| 31 |
-
level_start_index: torch.Tensor,
|
| 32 |
-
sampling_loc: torch.Tensor,
|
| 33 |
-
attn_weight: torch.Tensor,
|
| 34 |
-
im2col_step: int,
|
| 35 |
-
) -> torch.Tensor:
|
| 36 |
-
return ops.ms_deform_attn_forward(
|
| 37 |
-
value,
|
| 38 |
-
spatial_shapes,
|
| 39 |
-
level_start_index,
|
| 40 |
-
sampling_loc,
|
| 41 |
-
attn_weight,
|
| 42 |
-
im2col_step,
|
| 43 |
-
)
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"]
|
|
|
|
| 1 |
+
import ctypes
|
| 2 |
+
import sys
|
| 3 |
|
| 4 |
+
import importlib
|
| 5 |
+
from pathlib import Path
|
| 6 |
+
from types import ModuleType
|
| 7 |
|
| 8 |
+
def _import_from_path(file_path: Path) -> ModuleType:
|
| 9 |
+
# We cannot use the module name as-is, after adding it to `sys.modules`,
|
| 10 |
+
# it would also be used for other imports. So, we make a module name that
|
| 11 |
+
# depends on the path for it to be unique using the hex-encoded hash of
|
| 12 |
+
# the path.
|
| 13 |
+
path_hash = "{:x}".format(ctypes.c_size_t(hash(file_path.absolute())).value)
|
| 14 |
+
module_name = path_hash
|
| 15 |
+
spec = importlib.util.spec_from_file_location(module_name, file_path)
|
| 16 |
+
if spec is None:
|
| 17 |
+
raise ImportError(f"Cannot load spec for {module_name} from {file_path}")
|
| 18 |
+
module = importlib.util.module_from_spec(spec)
|
| 19 |
+
if module is None:
|
| 20 |
+
raise ImportError(f"Cannot load module {module_name} from spec")
|
| 21 |
+
sys.modules[module_name] = module
|
| 22 |
+
spec.loader.exec_module(module) # type: ignore
|
| 23 |
+
return module
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
+
globals().update(vars(_import_from_path(Path(__file__).parent.parent / "__init__.py")))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
build/torch28-cxx11-cu128-x86_64-linux/deformable_detr/__pycache__/__init__.cpython-313.pyc
DELETED
|
Binary file (1.5 kB)
|
|
|
build/torch28-cxx11-cu128-x86_64-linux/deformable_detr/__pycache__/_ops.cpython-313.pyc
DELETED
|
Binary file (541 Bytes)
|
|
|
build/torch28-cxx11-cu128-x86_64-linux/deformable_detr/__pycache__/layers.cpython-313.pyc
DELETED
|
Binary file (2.74 kB)
|
|
|
build/{torch29-cxx11-cu128-x86_64-linux/deformable_detr → torch28-cxx11-cu128-x86_64-linux}/layers.py
RENAMED
|
File without changes
|
build/torch28-cxx11-cu128-x86_64-linux/metadata.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"python-depends":[]}
|
build/torch28-cxx11-cu129-x86_64-linux/__init__.py
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import List
|
| 2 |
+
import torch
|
| 3 |
+
|
| 4 |
+
from ._ops import ops
|
| 5 |
+
from . import layers
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
def ms_deform_attn_backward(
|
| 9 |
+
value: torch.Tensor,
|
| 10 |
+
spatial_shapes: torch.Tensor,
|
| 11 |
+
level_start_index: torch.Tensor,
|
| 12 |
+
sampling_loc: torch.Tensor,
|
| 13 |
+
attn_weight: torch.Tensor,
|
| 14 |
+
grad_output: torch.Tensor,
|
| 15 |
+
im2col_step: int,
|
| 16 |
+
) -> List[torch.Tensor]:
|
| 17 |
+
return ops.ms_deform_attn_backward(
|
| 18 |
+
value,
|
| 19 |
+
spatial_shapes,
|
| 20 |
+
level_start_index,
|
| 21 |
+
sampling_loc,
|
| 22 |
+
attn_weight,
|
| 23 |
+
grad_output,
|
| 24 |
+
im2col_step,
|
| 25 |
+
)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
def ms_deform_attn_forward(
|
| 29 |
+
value: torch.Tensor,
|
| 30 |
+
spatial_shapes: torch.Tensor,
|
| 31 |
+
level_start_index: torch.Tensor,
|
| 32 |
+
sampling_loc: torch.Tensor,
|
| 33 |
+
attn_weight: torch.Tensor,
|
| 34 |
+
im2col_step: int,
|
| 35 |
+
) -> torch.Tensor:
|
| 36 |
+
return ops.ms_deform_attn_forward(
|
| 37 |
+
value,
|
| 38 |
+
spatial_shapes,
|
| 39 |
+
level_start_index,
|
| 40 |
+
sampling_loc,
|
| 41 |
+
attn_weight,
|
| 42 |
+
im2col_step,
|
| 43 |
+
)
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"]
|
build/torch28-cxx11-cu129-x86_64-linux/_deformable_detr_7ba5e9c.abi3.so
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:86846cc3da17baceee74f2a1420fb466e4a2120447760b3898e99ac6aaf34683
|
| 3 |
+
size 11581544
|
build/torch28-cxx11-cu129-x86_64-linux/_ops.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
from . import _deformable_detr_7ba5e9c
|
| 3 |
+
ops = torch.ops._deformable_detr_7ba5e9c
|
| 4 |
+
|
| 5 |
+
def add_op_namespace_prefix(op_name: str):
|
| 6 |
+
"""
|
| 7 |
+
Prefix op by namespace.
|
| 8 |
+
"""
|
| 9 |
+
return f"_deformable_detr_7ba5e9c::{op_name}"
|
build/torch28-cxx11-cu129-x86_64-linux/deformable_detr/__init__.py
CHANGED
|
@@ -1,46 +1,26 @@
|
|
| 1 |
-
|
| 2 |
-
import
|
| 3 |
|
| 4 |
-
|
| 5 |
-
from
|
|
|
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
-
def ms_deform_attn_backward(
|
| 9 |
-
value: torch.Tensor,
|
| 10 |
-
spatial_shapes: torch.Tensor,
|
| 11 |
-
level_start_index: torch.Tensor,
|
| 12 |
-
sampling_loc: torch.Tensor,
|
| 13 |
-
attn_weight: torch.Tensor,
|
| 14 |
-
grad_output: torch.Tensor,
|
| 15 |
-
im2col_step: int,
|
| 16 |
-
) -> List[torch.Tensor]:
|
| 17 |
-
return ops.ms_deform_attn_backward(
|
| 18 |
-
value,
|
| 19 |
-
spatial_shapes,
|
| 20 |
-
level_start_index,
|
| 21 |
-
sampling_loc,
|
| 22 |
-
attn_weight,
|
| 23 |
-
grad_output,
|
| 24 |
-
im2col_step,
|
| 25 |
-
)
|
| 26 |
|
| 27 |
-
|
| 28 |
-
def ms_deform_attn_forward(
|
| 29 |
-
value: torch.Tensor,
|
| 30 |
-
spatial_shapes: torch.Tensor,
|
| 31 |
-
level_start_index: torch.Tensor,
|
| 32 |
-
sampling_loc: torch.Tensor,
|
| 33 |
-
attn_weight: torch.Tensor,
|
| 34 |
-
im2col_step: int,
|
| 35 |
-
) -> torch.Tensor:
|
| 36 |
-
return ops.ms_deform_attn_forward(
|
| 37 |
-
value,
|
| 38 |
-
spatial_shapes,
|
| 39 |
-
level_start_index,
|
| 40 |
-
sampling_loc,
|
| 41 |
-
attn_weight,
|
| 42 |
-
im2col_step,
|
| 43 |
-
)
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"]
|
|
|
|
| 1 |
+
import ctypes
|
| 2 |
+
import sys
|
| 3 |
|
| 4 |
+
import importlib
|
| 5 |
+
from pathlib import Path
|
| 6 |
+
from types import ModuleType
|
| 7 |
|
| 8 |
+
def _import_from_path(file_path: Path) -> ModuleType:
|
| 9 |
+
# We cannot use the module name as-is, after adding it to `sys.modules`,
|
| 10 |
+
# it would also be used for other imports. So, we make a module name that
|
| 11 |
+
# depends on the path for it to be unique using the hex-encoded hash of
|
| 12 |
+
# the path.
|
| 13 |
+
path_hash = "{:x}".format(ctypes.c_size_t(hash(file_path.absolute())).value)
|
| 14 |
+
module_name = path_hash
|
| 15 |
+
spec = importlib.util.spec_from_file_location(module_name, file_path)
|
| 16 |
+
if spec is None:
|
| 17 |
+
raise ImportError(f"Cannot load spec for {module_name} from {file_path}")
|
| 18 |
+
module = importlib.util.module_from_spec(spec)
|
| 19 |
+
if module is None:
|
| 20 |
+
raise ImportError(f"Cannot load module {module_name} from spec")
|
| 21 |
+
sys.modules[module_name] = module
|
| 22 |
+
spec.loader.exec_module(module) # type: ignore
|
| 23 |
+
return module
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
+
globals().update(vars(_import_from_path(Path(__file__).parent.parent / "__init__.py")))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
build/torch28-cxx11-cu129-x86_64-linux/deformable_detr/__pycache__/__init__.cpython-313.pyc
DELETED
|
Binary file (1.5 kB)
|
|
|
build/torch28-cxx11-cu129-x86_64-linux/deformable_detr/__pycache__/_ops.cpython-313.pyc
DELETED
|
Binary file (541 Bytes)
|
|
|
build/torch28-cxx11-cu129-x86_64-linux/deformable_detr/__pycache__/layers.cpython-313.pyc
DELETED
|
Binary file (2.74 kB)
|
|
|
build/{torch29-cxx11-cu130-x86_64-linux/deformable_detr → torch28-cxx11-cu129-x86_64-linux}/layers.py
RENAMED
|
File without changes
|
build/torch28-cxx11-cu129-x86_64-linux/metadata.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"python-depends":[]}
|
build/torch29-cxx11-cu126-x86_64-linux/__init__.py
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import List
|
| 2 |
+
import torch
|
| 3 |
+
|
| 4 |
+
from ._ops import ops
|
| 5 |
+
from . import layers
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
def ms_deform_attn_backward(
|
| 9 |
+
value: torch.Tensor,
|
| 10 |
+
spatial_shapes: torch.Tensor,
|
| 11 |
+
level_start_index: torch.Tensor,
|
| 12 |
+
sampling_loc: torch.Tensor,
|
| 13 |
+
attn_weight: torch.Tensor,
|
| 14 |
+
grad_output: torch.Tensor,
|
| 15 |
+
im2col_step: int,
|
| 16 |
+
) -> List[torch.Tensor]:
|
| 17 |
+
return ops.ms_deform_attn_backward(
|
| 18 |
+
value,
|
| 19 |
+
spatial_shapes,
|
| 20 |
+
level_start_index,
|
| 21 |
+
sampling_loc,
|
| 22 |
+
attn_weight,
|
| 23 |
+
grad_output,
|
| 24 |
+
im2col_step,
|
| 25 |
+
)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
def ms_deform_attn_forward(
|
| 29 |
+
value: torch.Tensor,
|
| 30 |
+
spatial_shapes: torch.Tensor,
|
| 31 |
+
level_start_index: torch.Tensor,
|
| 32 |
+
sampling_loc: torch.Tensor,
|
| 33 |
+
attn_weight: torch.Tensor,
|
| 34 |
+
im2col_step: int,
|
| 35 |
+
) -> torch.Tensor:
|
| 36 |
+
return ops.ms_deform_attn_forward(
|
| 37 |
+
value,
|
| 38 |
+
spatial_shapes,
|
| 39 |
+
level_start_index,
|
| 40 |
+
sampling_loc,
|
| 41 |
+
attn_weight,
|
| 42 |
+
im2col_step,
|
| 43 |
+
)
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"]
|
build/{torch28-cxx11-cu126-x86_64-linux/deformable_detr/_deformable_detr_57c3d32.abi3.so → torch29-cxx11-cu126-x86_64-linux/_deformable_detr_7ba5e9c.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:ef56a6b25a1798b09cb41bf7f0e5afd3ac1681edff68e0a576f83b6cef9dea1d
|
| 3 |
+
size 8535872
|
build/torch29-cxx11-cu126-x86_64-linux/_ops.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
from . import _deformable_detr_7ba5e9c
|
| 3 |
+
ops = torch.ops._deformable_detr_7ba5e9c
|
| 4 |
+
|
| 5 |
+
def add_op_namespace_prefix(op_name: str):
|
| 6 |
+
"""
|
| 7 |
+
Prefix op by namespace.
|
| 8 |
+
"""
|
| 9 |
+
return f"_deformable_detr_7ba5e9c::{op_name}"
|
build/torch29-cxx11-cu126-x86_64-linux/deformable_detr/__init__.py
CHANGED
|
@@ -1,46 +1,26 @@
|
|
| 1 |
-
|
| 2 |
-
import
|
| 3 |
|
| 4 |
-
|
| 5 |
-
from
|
|
|
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
-
def ms_deform_attn_backward(
|
| 9 |
-
value: torch.Tensor,
|
| 10 |
-
spatial_shapes: torch.Tensor,
|
| 11 |
-
level_start_index: torch.Tensor,
|
| 12 |
-
sampling_loc: torch.Tensor,
|
| 13 |
-
attn_weight: torch.Tensor,
|
| 14 |
-
grad_output: torch.Tensor,
|
| 15 |
-
im2col_step: int,
|
| 16 |
-
) -> List[torch.Tensor]:
|
| 17 |
-
return ops.ms_deform_attn_backward(
|
| 18 |
-
value,
|
| 19 |
-
spatial_shapes,
|
| 20 |
-
level_start_index,
|
| 21 |
-
sampling_loc,
|
| 22 |
-
attn_weight,
|
| 23 |
-
grad_output,
|
| 24 |
-
im2col_step,
|
| 25 |
-
)
|
| 26 |
|
| 27 |
-
|
| 28 |
-
def ms_deform_attn_forward(
|
| 29 |
-
value: torch.Tensor,
|
| 30 |
-
spatial_shapes: torch.Tensor,
|
| 31 |
-
level_start_index: torch.Tensor,
|
| 32 |
-
sampling_loc: torch.Tensor,
|
| 33 |
-
attn_weight: torch.Tensor,
|
| 34 |
-
im2col_step: int,
|
| 35 |
-
) -> torch.Tensor:
|
| 36 |
-
return ops.ms_deform_attn_forward(
|
| 37 |
-
value,
|
| 38 |
-
spatial_shapes,
|
| 39 |
-
level_start_index,
|
| 40 |
-
sampling_loc,
|
| 41 |
-
attn_weight,
|
| 42 |
-
im2col_step,
|
| 43 |
-
)
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"]
|
|
|
|
| 1 |
+
import ctypes
|
| 2 |
+
import sys
|
| 3 |
|
| 4 |
+
import importlib
|
| 5 |
+
from pathlib import Path
|
| 6 |
+
from types import ModuleType
|
| 7 |
|
| 8 |
+
def _import_from_path(file_path: Path) -> ModuleType:
|
| 9 |
+
# We cannot use the module name as-is, after adding it to `sys.modules`,
|
| 10 |
+
# it would also be used for other imports. So, we make a module name that
|
| 11 |
+
# depends on the path for it to be unique using the hex-encoded hash of
|
| 12 |
+
# the path.
|
| 13 |
+
path_hash = "{:x}".format(ctypes.c_size_t(hash(file_path.absolute())).value)
|
| 14 |
+
module_name = path_hash
|
| 15 |
+
spec = importlib.util.spec_from_file_location(module_name, file_path)
|
| 16 |
+
if spec is None:
|
| 17 |
+
raise ImportError(f"Cannot load spec for {module_name} from {file_path}")
|
| 18 |
+
module = importlib.util.module_from_spec(spec)
|
| 19 |
+
if module is None:
|
| 20 |
+
raise ImportError(f"Cannot load module {module_name} from spec")
|
| 21 |
+
sys.modules[module_name] = module
|
| 22 |
+
spec.loader.exec_module(module) # type: ignore
|
| 23 |
+
return module
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
+
globals().update(vars(_import_from_path(Path(__file__).parent.parent / "__init__.py")))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
build/torch29-cxx11-cu126-x86_64-linux/deformable_detr/__pycache__/__init__.cpython-313.pyc
DELETED
|
Binary file (1.5 kB)
|
|
|