diff --git a/build/torch210-cu128-x86_64-windows/__init__.py b/build/torch210-cu128-x86_64-windows/__init__.py deleted file mode 100644 index 7082e931a91c42eef91df9cfac9d908b919a0443..0000000000000000000000000000000000000000 --- a/build/torch210-cu128-x86_64-windows/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch210-cu128-x86_64-windows/_deformable_detr_cuda_d8a6191.pyd b/build/torch210-cu128-x86_64-windows/_deformable_detr_cuda_d8a6191.pyd deleted file mode 100644 index e190d75a9838ac1220cfa79b38eddf4794533c64..0000000000000000000000000000000000000000 --- a/build/torch210-cu128-x86_64-windows/_deformable_detr_cuda_d8a6191.pyd +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f94825a148a77c630ae4f24f75f65e96dd6e3379653643aa2e81420ba61a9db3 -size 9546240 diff --git a/build/torch210-cu128-x86_64-windows/_ops.py b/build/torch210-cu128-x86_64-windows/_ops.py deleted file mode 100644 index b4d286912955f247852eaaf90a1f579c28c2079f..0000000000000000000000000000000000000000 --- a/build/torch210-cu128-x86_64-windows/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_cuda_d8a6191 -ops = torch.ops._deformable_detr_cuda_d8a6191 - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_cuda_d8a6191::{op_name}" diff --git a/build/torch210-cu128-x86_64-windows/deformable_detr/__init__.py b/build/torch210-cu128-x86_64-windows/deformable_detr/__init__.py deleted file mode 100644 index bc434ef44e63409acb52a8f3fff54a4adc46ed6a..0000000000000000000000000000000000000000 --- a/build/torch210-cu128-x86_64-windows/deformable_detr/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -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-cu128-x86_64-windows/layers.py b/build/torch210-cu128-x86_64-windows/layers.py deleted file mode 100644 index 1e682577b15f8985c02cb017a7a1f501f9d912aa..0000000000000000000000000000000000000000 --- a/build/torch210-cu128-x86_64-windows/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch210-cu128-x86_64-windows/metadata.json b/build/torch210-cu128-x86_64-windows/metadata.json deleted file mode 100644 index 7ddf5ff75a35f315c1398fff49390f17fd4e0ee9..0000000000000000000000000000000000000000 --- a/build/torch210-cu128-x86_64-windows/metadata.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "version": 1, - "license": "Apache-2.0", - "python-depends": [], - "backend": { - "type": "cuda", - "archs": [ - "10.0", - "10.1", - "12.0+PTX", - "7.0", - "7.2", - "7.5", - "8.0", - "8.6", - "8.7", - "8.9", - "9.0" - ] - } -} diff --git a/build/torch211-cu128-x86_64-windows/__init__.py b/build/torch211-cu128-x86_64-windows/__init__.py deleted file mode 100644 index 7082e931a91c42eef91df9cfac9d908b919a0443..0000000000000000000000000000000000000000 --- a/build/torch211-cu128-x86_64-windows/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch211-cu128-x86_64-windows/_deformable_detr_cuda_a4c5c25.pyd b/build/torch211-cu128-x86_64-windows/_deformable_detr_cuda_a4c5c25.pyd deleted file mode 100644 index e79d5439ea738cf223f14115234dc92d0fe14fbf..0000000000000000000000000000000000000000 --- a/build/torch211-cu128-x86_64-windows/_deformable_detr_cuda_a4c5c25.pyd +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6901592b0cde22932ed33bd9357fdbff9747d916c56fc25ffa455d7bb575bef5 -size 9546240 diff --git a/build/torch211-cu128-x86_64-windows/_ops.py b/build/torch211-cu128-x86_64-windows/_ops.py deleted file mode 100644 index c4c3b54981bc3b54a96f0585fe9bb0b91106060b..0000000000000000000000000000000000000000 --- a/build/torch211-cu128-x86_64-windows/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_cuda_a4c5c25 -ops = torch.ops._deformable_detr_cuda_a4c5c25 - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_cuda_a4c5c25::{op_name}" diff --git a/build/torch211-cu128-x86_64-windows/deformable_detr/__init__.py b/build/torch211-cu128-x86_64-windows/deformable_detr/__init__.py deleted file mode 100644 index d259f9535943d5617b4906d784ecd93a9d6dff82..0000000000000000000000000000000000000000 --- a/build/torch211-cu128-x86_64-windows/deformable_detr/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -import ctypes -import importlib.util -import sys -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/torch211-cu128-x86_64-windows/layers.py b/build/torch211-cu128-x86_64-windows/layers.py deleted file mode 100644 index 1e682577b15f8985c02cb017a7a1f501f9d912aa..0000000000000000000000000000000000000000 --- a/build/torch211-cu128-x86_64-windows/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch211-cu128-x86_64-windows/metadata.json b/build/torch211-cu128-x86_64-windows/metadata.json deleted file mode 100644 index 7ddf5ff75a35f315c1398fff49390f17fd4e0ee9..0000000000000000000000000000000000000000 --- a/build/torch211-cu128-x86_64-windows/metadata.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "version": 1, - "license": "Apache-2.0", - "python-depends": [], - "backend": { - "type": "cuda", - "archs": [ - "10.0", - "10.1", - "12.0+PTX", - "7.0", - "7.2", - "7.5", - "8.0", - "8.6", - "8.7", - "8.9", - "9.0" - ] - } -} diff --git a/build/torch25-cxx11-cu118-x86_64-linux/deformable_detr/__init__.py b/build/torch25-cxx11-cu118-x86_64-linux/deformable_detr/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch25-cxx11-cu118-x86_64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch25-cxx11-cu118-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so b/build/torch25-cxx11-cu118-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so deleted file mode 100755 index f622604e89058689647ba41b3c71ccbd3aa68ae7..0000000000000000000000000000000000000000 --- a/build/torch25-cxx11-cu118-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ae00c12295a458e2534149aea16da0289541447123c19fae59baaf6d6d2752f1 -size 6693656 diff --git a/build/torch25-cxx11-cu118-x86_64-linux/deformable_detr/_ops.py b/build/torch25-cxx11-cu118-x86_64-linux/deformable_detr/_ops.py deleted file mode 100644 index 676ee6fea64b714dedb7ccd1d54148dcf75575a6..0000000000000000000000000000000000000000 --- a/build/torch25-cxx11-cu118-x86_64-linux/deformable_detr/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_7c33cbe -ops = torch.ops._deformable_detr_7c33cbe - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_7c33cbe::{op_name}" \ No newline at end of file diff --git a/build/torch25-cxx11-cu118-x86_64-linux/deformable_detr/layers.py b/build/torch25-cxx11-cu118-x86_64-linux/deformable_detr/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch25-cxx11-cu118-x86_64-linux/deformable_detr/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch25-cxx11-cu121-x86_64-linux/deformable_detr/__init__.py b/build/torch25-cxx11-cu121-x86_64-linux/deformable_detr/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch25-cxx11-cu121-x86_64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch25-cxx11-cu121-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so b/build/torch25-cxx11-cu121-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so deleted file mode 100755 index 25768c52fa2f7041778baad9b1beaaee6772e8d3..0000000000000000000000000000000000000000 --- a/build/torch25-cxx11-cu121-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4ab8cf59779b768359df0fa268b6cd52be2f518dd4fafdd61baec31c64f44813 -size 6679440 diff --git a/build/torch25-cxx11-cu121-x86_64-linux/deformable_detr/_ops.py b/build/torch25-cxx11-cu121-x86_64-linux/deformable_detr/_ops.py deleted file mode 100644 index 676ee6fea64b714dedb7ccd1d54148dcf75575a6..0000000000000000000000000000000000000000 --- a/build/torch25-cxx11-cu121-x86_64-linux/deformable_detr/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_7c33cbe -ops = torch.ops._deformable_detr_7c33cbe - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_7c33cbe::{op_name}" \ No newline at end of file diff --git a/build/torch25-cxx11-cu121-x86_64-linux/deformable_detr/layers.py b/build/torch25-cxx11-cu121-x86_64-linux/deformable_detr/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch25-cxx11-cu121-x86_64-linux/deformable_detr/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch25-cxx11-cu124-x86_64-linux/deformable_detr/__init__.py b/build/torch25-cxx11-cu124-x86_64-linux/deformable_detr/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch25-cxx11-cu124-x86_64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch25-cxx11-cu124-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so b/build/torch25-cxx11-cu124-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so deleted file mode 100755 index a574c7a01d734f9f4fb7210058d3064c280c5564..0000000000000000000000000000000000000000 --- a/build/torch25-cxx11-cu124-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5cdcd6902a03140074cff4cd44bf6b47dc27a32e13e0515a93929c66be186cab -size 6652680 diff --git a/build/torch25-cxx11-cu124-x86_64-linux/deformable_detr/_ops.py b/build/torch25-cxx11-cu124-x86_64-linux/deformable_detr/_ops.py deleted file mode 100644 index 676ee6fea64b714dedb7ccd1d54148dcf75575a6..0000000000000000000000000000000000000000 --- a/build/torch25-cxx11-cu124-x86_64-linux/deformable_detr/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_7c33cbe -ops = torch.ops._deformable_detr_7c33cbe - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_7c33cbe::{op_name}" \ No newline at end of file diff --git a/build/torch25-cxx11-cu124-x86_64-linux/deformable_detr/layers.py b/build/torch25-cxx11-cu124-x86_64-linux/deformable_detr/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch25-cxx11-cu124-x86_64-linux/deformable_detr/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch25-cxx98-cu118-x86_64-linux/deformable_detr/__init__.py b/build/torch25-cxx98-cu118-x86_64-linux/deformable_detr/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch25-cxx98-cu118-x86_64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch25-cxx98-cu118-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so b/build/torch25-cxx98-cu118-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so deleted file mode 100755 index 6360ed5a03fd9fbe757e8b7c1816f9935b13764f..0000000000000000000000000000000000000000 --- a/build/torch25-cxx98-cu118-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:82174ec2812ee672a447b94fb5ec907e348eb3d0be338daddf145a1d74969a6f -size 6686592 diff --git a/build/torch25-cxx98-cu118-x86_64-linux/deformable_detr/_ops.py b/build/torch25-cxx98-cu118-x86_64-linux/deformable_detr/_ops.py deleted file mode 100644 index 676ee6fea64b714dedb7ccd1d54148dcf75575a6..0000000000000000000000000000000000000000 --- a/build/torch25-cxx98-cu118-x86_64-linux/deformable_detr/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_7c33cbe -ops = torch.ops._deformable_detr_7c33cbe - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_7c33cbe::{op_name}" \ No newline at end of file diff --git a/build/torch25-cxx98-cu118-x86_64-linux/deformable_detr/layers.py b/build/torch25-cxx98-cu118-x86_64-linux/deformable_detr/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch25-cxx98-cu118-x86_64-linux/deformable_detr/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch25-cxx98-cu121-x86_64-linux/deformable_detr/__init__.py b/build/torch25-cxx98-cu121-x86_64-linux/deformable_detr/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch25-cxx98-cu121-x86_64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch25-cxx98-cu121-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so b/build/torch25-cxx98-cu121-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so deleted file mode 100755 index d23c2f012773987542cbcab34a84e3eb240bdff9..0000000000000000000000000000000000000000 --- a/build/torch25-cxx98-cu121-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c9d8540a4ffa00d331f60204fe6baf543a45667d6bba2c0a0b23aca9202b6233 -size 6672464 diff --git a/build/torch25-cxx98-cu121-x86_64-linux/deformable_detr/_ops.py b/build/torch25-cxx98-cu121-x86_64-linux/deformable_detr/_ops.py deleted file mode 100644 index 676ee6fea64b714dedb7ccd1d54148dcf75575a6..0000000000000000000000000000000000000000 --- a/build/torch25-cxx98-cu121-x86_64-linux/deformable_detr/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_7c33cbe -ops = torch.ops._deformable_detr_7c33cbe - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_7c33cbe::{op_name}" \ No newline at end of file diff --git a/build/torch25-cxx98-cu121-x86_64-linux/deformable_detr/layers.py b/build/torch25-cxx98-cu121-x86_64-linux/deformable_detr/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch25-cxx98-cu121-x86_64-linux/deformable_detr/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch25-cxx98-cu124-x86_64-linux/deformable_detr/__init__.py b/build/torch25-cxx98-cu124-x86_64-linux/deformable_detr/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch25-cxx98-cu124-x86_64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch25-cxx98-cu124-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so b/build/torch25-cxx98-cu124-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so deleted file mode 100755 index aaa5548734ba34766edf646277e25b48752d6b7f..0000000000000000000000000000000000000000 --- a/build/torch25-cxx98-cu124-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fa748a4de72c06de09f46b4af4fec7f23cb2c76eb8683c117fefd20833cd3fd8 -size 6649800 diff --git a/build/torch25-cxx98-cu124-x86_64-linux/deformable_detr/_ops.py b/build/torch25-cxx98-cu124-x86_64-linux/deformable_detr/_ops.py deleted file mode 100644 index 676ee6fea64b714dedb7ccd1d54148dcf75575a6..0000000000000000000000000000000000000000 --- a/build/torch25-cxx98-cu124-x86_64-linux/deformable_detr/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_7c33cbe -ops = torch.ops._deformable_detr_7c33cbe - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_7c33cbe::{op_name}" \ No newline at end of file diff --git a/build/torch25-cxx98-cu124-x86_64-linux/deformable_detr/layers.py b/build/torch25-cxx98-cu124-x86_64-linux/deformable_detr/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch25-cxx98-cu124-x86_64-linux/deformable_detr/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch26-cxx11-cu118-x86_64-linux/deformable_detr/__init__.py b/build/torch26-cxx11-cu118-x86_64-linux/deformable_detr/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch26-cxx11-cu118-x86_64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch26-cxx11-cu118-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so b/build/torch26-cxx11-cu118-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so deleted file mode 100755 index 64ea4bcc2dfb73951fa3315247c594ea5b6aee1c..0000000000000000000000000000000000000000 --- a/build/torch26-cxx11-cu118-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:57e38bac3087c1446307e504b1e22e61ae584d1de7f5b3d15bd7a60780c3431c -size 6693632 diff --git a/build/torch26-cxx11-cu118-x86_64-linux/deformable_detr/_ops.py b/build/torch26-cxx11-cu118-x86_64-linux/deformable_detr/_ops.py deleted file mode 100644 index 676ee6fea64b714dedb7ccd1d54148dcf75575a6..0000000000000000000000000000000000000000 --- a/build/torch26-cxx11-cu118-x86_64-linux/deformable_detr/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_7c33cbe -ops = torch.ops._deformable_detr_7c33cbe - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_7c33cbe::{op_name}" \ No newline at end of file diff --git a/build/torch26-cxx11-cu118-x86_64-linux/deformable_detr/layers.py b/build/torch26-cxx11-cu118-x86_64-linux/deformable_detr/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch26-cxx11-cu118-x86_64-linux/deformable_detr/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch26-cxx11-cu124-x86_64-linux/deformable_detr/__init__.py b/build/torch26-cxx11-cu124-x86_64-linux/deformable_detr/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch26-cxx11-cu124-x86_64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch26-cxx11-cu124-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so b/build/torch26-cxx11-cu124-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so deleted file mode 100755 index 658ac25c98e67be8affb211b20fc2af46efcbca2..0000000000000000000000000000000000000000 --- a/build/torch26-cxx11-cu124-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1d7c09d3bedd89d7119e7023a07784724d3a3f79664b75fce37b778ef3bcfe52 -size 6648656 diff --git a/build/torch26-cxx11-cu124-x86_64-linux/deformable_detr/_ops.py b/build/torch26-cxx11-cu124-x86_64-linux/deformable_detr/_ops.py deleted file mode 100644 index 676ee6fea64b714dedb7ccd1d54148dcf75575a6..0000000000000000000000000000000000000000 --- a/build/torch26-cxx11-cu124-x86_64-linux/deformable_detr/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_7c33cbe -ops = torch.ops._deformable_detr_7c33cbe - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_7c33cbe::{op_name}" \ No newline at end of file diff --git a/build/torch26-cxx11-cu124-x86_64-linux/deformable_detr/layers.py b/build/torch26-cxx11-cu124-x86_64-linux/deformable_detr/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch26-cxx11-cu124-x86_64-linux/deformable_detr/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch26-cxx11-cu126-aarch64-linux/deformable_detr/__init__.py b/build/torch26-cxx11-cu126-aarch64-linux/deformable_detr/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch26-cxx11-cu126-aarch64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch26-cxx11-cu126-aarch64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so b/build/torch26-cxx11-cu126-aarch64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so deleted file mode 100755 index d1b1fe211439d00ca4681305f56e91b4027fe45e..0000000000000000000000000000000000000000 --- a/build/torch26-cxx11-cu126-aarch64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6856b6efe5130f019f6cb7f964d7a2073f1ecc5cd7afc850334e64798f871dae -size 6833224 diff --git a/build/torch26-cxx11-cu126-aarch64-linux/deformable_detr/_ops.py b/build/torch26-cxx11-cu126-aarch64-linux/deformable_detr/_ops.py deleted file mode 100644 index 676ee6fea64b714dedb7ccd1d54148dcf75575a6..0000000000000000000000000000000000000000 --- a/build/torch26-cxx11-cu126-aarch64-linux/deformable_detr/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_7c33cbe -ops = torch.ops._deformable_detr_7c33cbe - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_7c33cbe::{op_name}" \ No newline at end of file diff --git a/build/torch26-cxx11-cu126-aarch64-linux/deformable_detr/layers.py b/build/torch26-cxx11-cu126-aarch64-linux/deformable_detr/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch26-cxx11-cu126-aarch64-linux/deformable_detr/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch26-cxx11-cu126-x86_64-linux/deformable_detr/__init__.py b/build/torch26-cxx11-cu126-x86_64-linux/deformable_detr/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch26-cxx11-cu126-x86_64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch26-cxx11-cu126-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so b/build/torch26-cxx11-cu126-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so deleted file mode 100755 index 10bcc5c4bad459abe354c507166121a5a47d5d74..0000000000000000000000000000000000000000 --- a/build/torch26-cxx11-cu126-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c76ad874b78882d3108a7fdaf49f8c00b6a6a7dceec63912118f8fa7d07e5f30 -size 6800656 diff --git a/build/torch26-cxx11-cu126-x86_64-linux/deformable_detr/_ops.py b/build/torch26-cxx11-cu126-x86_64-linux/deformable_detr/_ops.py deleted file mode 100644 index 676ee6fea64b714dedb7ccd1d54148dcf75575a6..0000000000000000000000000000000000000000 --- a/build/torch26-cxx11-cu126-x86_64-linux/deformable_detr/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_7c33cbe -ops = torch.ops._deformable_detr_7c33cbe - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_7c33cbe::{op_name}" \ No newline at end of file diff --git a/build/torch26-cxx11-cu126-x86_64-linux/deformable_detr/layers.py b/build/torch26-cxx11-cu126-x86_64-linux/deformable_detr/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch26-cxx11-cu126-x86_64-linux/deformable_detr/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch26-cxx98-cu118-x86_64-linux/deformable_detr/__init__.py b/build/torch26-cxx98-cu118-x86_64-linux/deformable_detr/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch26-cxx98-cu118-x86_64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch26-cxx98-cu118-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so b/build/torch26-cxx98-cu118-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so deleted file mode 100755 index a15ec9d8735e3de07ebd3bfaae1b2ded8de87447..0000000000000000000000000000000000000000 --- a/build/torch26-cxx98-cu118-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d1fb3a24fd95c1cc3cba080ae1c9d4217f377435770c7e423de53b11ecc437dc -size 6686600 diff --git a/build/torch26-cxx98-cu118-x86_64-linux/deformable_detr/_ops.py b/build/torch26-cxx98-cu118-x86_64-linux/deformable_detr/_ops.py deleted file mode 100644 index 676ee6fea64b714dedb7ccd1d54148dcf75575a6..0000000000000000000000000000000000000000 --- a/build/torch26-cxx98-cu118-x86_64-linux/deformable_detr/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_7c33cbe -ops = torch.ops._deformable_detr_7c33cbe - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_7c33cbe::{op_name}" \ No newline at end of file diff --git a/build/torch26-cxx98-cu118-x86_64-linux/deformable_detr/layers.py b/build/torch26-cxx98-cu118-x86_64-linux/deformable_detr/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch26-cxx98-cu118-x86_64-linux/deformable_detr/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch26-cxx98-cu124-x86_64-linux/deformable_detr/__init__.py b/build/torch26-cxx98-cu124-x86_64-linux/deformable_detr/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch26-cxx98-cu124-x86_64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch26-cxx98-cu124-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so b/build/torch26-cxx98-cu124-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so deleted file mode 100755 index 63c34c123c4b78349bc1a2bb92b0614c4b689a13..0000000000000000000000000000000000000000 --- a/build/torch26-cxx98-cu124-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d5a455975be5790964cc95c6813d293b1aba581f5c2dc132c9a08690bf6e5cad -size 6649808 diff --git a/build/torch26-cxx98-cu124-x86_64-linux/deformable_detr/_ops.py b/build/torch26-cxx98-cu124-x86_64-linux/deformable_detr/_ops.py deleted file mode 100644 index 676ee6fea64b714dedb7ccd1d54148dcf75575a6..0000000000000000000000000000000000000000 --- a/build/torch26-cxx98-cu124-x86_64-linux/deformable_detr/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_7c33cbe -ops = torch.ops._deformable_detr_7c33cbe - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_7c33cbe::{op_name}" \ No newline at end of file diff --git a/build/torch26-cxx98-cu124-x86_64-linux/deformable_detr/layers.py b/build/torch26-cxx98-cu124-x86_64-linux/deformable_detr/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch26-cxx98-cu124-x86_64-linux/deformable_detr/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch26-cxx98-cu126-aarch64-linux/deformable_detr/__init__.py b/build/torch26-cxx98-cu126-aarch64-linux/deformable_detr/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch26-cxx98-cu126-aarch64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch26-cxx98-cu126-aarch64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so b/build/torch26-cxx98-cu126-aarch64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so deleted file mode 100755 index 6740aef68abf0d71d0756d6b2f78fc2da67c6752..0000000000000000000000000000000000000000 --- a/build/torch26-cxx98-cu126-aarch64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2c13dce2b080676eb192d87ba83df6ef1f6d0f1101727f4b29185d48dec7281d -size 6829872 diff --git a/build/torch26-cxx98-cu126-aarch64-linux/deformable_detr/_ops.py b/build/torch26-cxx98-cu126-aarch64-linux/deformable_detr/_ops.py deleted file mode 100644 index 676ee6fea64b714dedb7ccd1d54148dcf75575a6..0000000000000000000000000000000000000000 --- a/build/torch26-cxx98-cu126-aarch64-linux/deformable_detr/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_7c33cbe -ops = torch.ops._deformable_detr_7c33cbe - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_7c33cbe::{op_name}" \ No newline at end of file diff --git a/build/torch26-cxx98-cu126-aarch64-linux/deformable_detr/layers.py b/build/torch26-cxx98-cu126-aarch64-linux/deformable_detr/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch26-cxx98-cu126-aarch64-linux/deformable_detr/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch26-cxx98-cu126-x86_64-linux/deformable_detr/__init__.py b/build/torch26-cxx98-cu126-x86_64-linux/deformable_detr/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch26-cxx98-cu126-x86_64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch26-cxx98-cu126-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so b/build/torch26-cxx98-cu126-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so deleted file mode 100755 index f3ce58cab856be1f382aa9f3cf1bb0b1ec06d41d..0000000000000000000000000000000000000000 --- a/build/torch26-cxx98-cu126-x86_64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c6ad344319579f0abef7fe1a9d3f479f1c8737994f563a540815a1445020959e -size 6797712 diff --git a/build/torch26-cxx98-cu126-x86_64-linux/deformable_detr/_ops.py b/build/torch26-cxx98-cu126-x86_64-linux/deformable_detr/_ops.py deleted file mode 100644 index 676ee6fea64b714dedb7ccd1d54148dcf75575a6..0000000000000000000000000000000000000000 --- a/build/torch26-cxx98-cu126-x86_64-linux/deformable_detr/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_7c33cbe -ops = torch.ops._deformable_detr_7c33cbe - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_7c33cbe::{op_name}" \ No newline at end of file diff --git a/build/torch26-cxx98-cu126-x86_64-linux/deformable_detr/layers.py b/build/torch26-cxx98-cu126-x86_64-linux/deformable_detr/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch26-cxx98-cu126-x86_64-linux/deformable_detr/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch27-cxx11-cu118-x86_64-linux/deformable_detr/__init__.py b/build/torch27-cxx11-cu118-x86_64-linux/deformable_detr/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch27-cxx11-cu118-x86_64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch27-cxx11-cu118-x86_64-linux/deformable_detr/__pycache__/__init__.cpython-313.pyc b/build/torch27-cxx11-cu118-x86_64-linux/deformable_detr/__pycache__/__init__.cpython-313.pyc deleted file mode 100644 index a18bf078a3920470e28c50b9bc3b7efffad37d72..0000000000000000000000000000000000000000 Binary files a/build/torch27-cxx11-cu118-x86_64-linux/deformable_detr/__pycache__/__init__.cpython-313.pyc and /dev/null differ diff --git a/build/torch27-cxx11-cu118-x86_64-linux/deformable_detr/__pycache__/_ops.cpython-313.pyc b/build/torch27-cxx11-cu118-x86_64-linux/deformable_detr/__pycache__/_ops.cpython-313.pyc deleted file mode 100644 index 8a6f280954dd80fbb6d49390c446f50f2924d3fd..0000000000000000000000000000000000000000 Binary files a/build/torch27-cxx11-cu118-x86_64-linux/deformable_detr/__pycache__/_ops.cpython-313.pyc and /dev/null differ diff --git a/build/torch27-cxx11-cu118-x86_64-linux/deformable_detr/__pycache__/layers.cpython-313.pyc b/build/torch27-cxx11-cu118-x86_64-linux/deformable_detr/__pycache__/layers.cpython-313.pyc deleted file mode 100644 index 097f24d7bc07674acd326d3a99991123d90a5838..0000000000000000000000000000000000000000 Binary files a/build/torch27-cxx11-cu118-x86_64-linux/deformable_detr/__pycache__/layers.cpython-313.pyc and /dev/null differ diff --git a/build/torch27-cxx11-cu118-x86_64-linux/deformable_detr/_deformable_detr_57c3d32.abi3.so b/build/torch27-cxx11-cu118-x86_64-linux/deformable_detr/_deformable_detr_57c3d32.abi3.so deleted file mode 100644 index f7dc97abb0f55df13905e5275d76fa859beb7a30..0000000000000000000000000000000000000000 --- a/build/torch27-cxx11-cu118-x86_64-linux/deformable_detr/_deformable_detr_57c3d32.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9293f97cc6b06bc3ba5e57cfd084abb252c287f4518935208e67e126e7cbd19b -size 6800224 diff --git a/build/torch27-cxx11-cu118-x86_64-linux/deformable_detr/_ops.py b/build/torch27-cxx11-cu118-x86_64-linux/deformable_detr/_ops.py deleted file mode 100644 index 39c2aa7875432779e86612a0e56271fe32133953..0000000000000000000000000000000000000000 --- a/build/torch27-cxx11-cu118-x86_64-linux/deformable_detr/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_57c3d32 -ops = torch.ops._deformable_detr_57c3d32 - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_57c3d32::{op_name}" \ No newline at end of file diff --git a/build/torch27-cxx11-cu118-x86_64-linux/deformable_detr/layers.py b/build/torch27-cxx11-cu118-x86_64-linux/deformable_detr/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch27-cxx11-cu118-x86_64-linux/deformable_detr/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch27-cxx11-cu126-aarch64-linux/deformable_detr/__init__.py b/build/torch27-cxx11-cu126-aarch64-linux/deformable_detr/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch27-cxx11-cu126-aarch64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch27-cxx11-cu126-aarch64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so b/build/torch27-cxx11-cu126-aarch64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so deleted file mode 100755 index 63b666838685ae29d11438e79273b09b38f9df39..0000000000000000000000000000000000000000 --- a/build/torch27-cxx11-cu126-aarch64-linux/deformable_detr/_deformable_detr_7c33cbe.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:af2831b68229a910e8703cae2c9e720ded825e401745d38923548c444e56c37b -size 6833456 diff --git a/build/torch27-cxx11-cu126-aarch64-linux/deformable_detr/_ops.py b/build/torch27-cxx11-cu126-aarch64-linux/deformable_detr/_ops.py deleted file mode 100644 index 676ee6fea64b714dedb7ccd1d54148dcf75575a6..0000000000000000000000000000000000000000 --- a/build/torch27-cxx11-cu126-aarch64-linux/deformable_detr/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_7c33cbe -ops = torch.ops._deformable_detr_7c33cbe - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_7c33cbe::{op_name}" \ No newline at end of file diff --git a/build/torch27-cxx11-cu126-aarch64-linux/deformable_detr/layers.py b/build/torch27-cxx11-cu126-aarch64-linux/deformable_detr/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch27-cxx11-cu126-aarch64-linux/deformable_detr/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch27-cxx11-cu126-x86_64-linux/deformable_detr/__init__.py b/build/torch27-cxx11-cu126-x86_64-linux/deformable_detr/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch27-cxx11-cu126-x86_64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch27-cxx11-cu126-x86_64-linux/deformable_detr/__pycache__/__init__.cpython-313.pyc b/build/torch27-cxx11-cu126-x86_64-linux/deformable_detr/__pycache__/__init__.cpython-313.pyc deleted file mode 100644 index 03f23b4fd38706ba1888acf199b905f851d2b024..0000000000000000000000000000000000000000 Binary files a/build/torch27-cxx11-cu126-x86_64-linux/deformable_detr/__pycache__/__init__.cpython-313.pyc and /dev/null differ diff --git a/build/torch27-cxx11-cu126-x86_64-linux/deformable_detr/__pycache__/_ops.cpython-313.pyc b/build/torch27-cxx11-cu126-x86_64-linux/deformable_detr/__pycache__/_ops.cpython-313.pyc deleted file mode 100644 index cca62822318d51b9dbb51466f3e0a6d5fd388306..0000000000000000000000000000000000000000 Binary files a/build/torch27-cxx11-cu126-x86_64-linux/deformable_detr/__pycache__/_ops.cpython-313.pyc and /dev/null differ diff --git a/build/torch27-cxx11-cu126-x86_64-linux/deformable_detr/__pycache__/layers.cpython-313.pyc b/build/torch27-cxx11-cu126-x86_64-linux/deformable_detr/__pycache__/layers.cpython-313.pyc deleted file mode 100644 index 7dfb8dda54ffc9062a129331374926b1fe104ecd..0000000000000000000000000000000000000000 Binary files a/build/torch27-cxx11-cu126-x86_64-linux/deformable_detr/__pycache__/layers.cpython-313.pyc and /dev/null differ diff --git a/build/torch27-cxx11-cu126-x86_64-linux/deformable_detr/_deformable_detr_57c3d32.abi3.so b/build/torch27-cxx11-cu126-x86_64-linux/deformable_detr/_deformable_detr_57c3d32.abi3.so deleted file mode 100644 index abe151e58a46c02191f11213027731ed26b7a182..0000000000000000000000000000000000000000 --- a/build/torch27-cxx11-cu126-x86_64-linux/deformable_detr/_deformable_detr_57c3d32.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:df54f46f59b5b78b15314cb0825d8f1f34c7a3198e9d62ca2a65a8ca72ea79a4 -size 6911280 diff --git a/build/torch27-cxx11-cu126-x86_64-linux/deformable_detr/_ops.py b/build/torch27-cxx11-cu126-x86_64-linux/deformable_detr/_ops.py deleted file mode 100644 index 39c2aa7875432779e86612a0e56271fe32133953..0000000000000000000000000000000000000000 --- a/build/torch27-cxx11-cu126-x86_64-linux/deformable_detr/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_57c3d32 -ops = torch.ops._deformable_detr_57c3d32 - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_57c3d32::{op_name}" \ No newline at end of file diff --git a/build/torch27-cxx11-cu126-x86_64-linux/deformable_detr/layers.py b/build/torch27-cxx11-cu126-x86_64-linux/deformable_detr/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch27-cxx11-cu126-x86_64-linux/deformable_detr/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch27-cxx11-cu128-aarch64-linux/deformable_detr/__init__.py b/build/torch27-cxx11-cu128-aarch64-linux/deformable_detr/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch27-cxx11-cu128-aarch64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch27-cxx11-cu128-aarch64-linux/deformable_detr/__pycache__/__init__.cpython-313.pyc b/build/torch27-cxx11-cu128-aarch64-linux/deformable_detr/__pycache__/__init__.cpython-313.pyc deleted file mode 100644 index 2c7fa735b9a5720691a5ed6c31e566b5bc81dd77..0000000000000000000000000000000000000000 Binary files a/build/torch27-cxx11-cu128-aarch64-linux/deformable_detr/__pycache__/__init__.cpython-313.pyc and /dev/null differ diff --git a/build/torch27-cxx11-cu128-aarch64-linux/deformable_detr/__pycache__/_ops.cpython-313.pyc b/build/torch27-cxx11-cu128-aarch64-linux/deformable_detr/__pycache__/_ops.cpython-313.pyc deleted file mode 100644 index 499ecc259157bcef7916fea79bdd097407854ba3..0000000000000000000000000000000000000000 Binary files a/build/torch27-cxx11-cu128-aarch64-linux/deformable_detr/__pycache__/_ops.cpython-313.pyc and /dev/null differ diff --git a/build/torch27-cxx11-cu128-aarch64-linux/deformable_detr/__pycache__/layers.cpython-313.pyc b/build/torch27-cxx11-cu128-aarch64-linux/deformable_detr/__pycache__/layers.cpython-313.pyc deleted file mode 100644 index 5483ccd7f0aaaeffd23797fbec5d47f3e8f49080..0000000000000000000000000000000000000000 Binary files a/build/torch27-cxx11-cu128-aarch64-linux/deformable_detr/__pycache__/layers.cpython-313.pyc and /dev/null differ diff --git a/build/torch27-cxx11-cu128-aarch64-linux/deformable_detr/_deformable_detr_320b408.abi3.so b/build/torch27-cxx11-cu128-aarch64-linux/deformable_detr/_deformable_detr_320b408.abi3.so deleted file mode 100644 index 0c564ee29cec2888bffa2ce31732d90efb502625..0000000000000000000000000000000000000000 --- a/build/torch27-cxx11-cu128-aarch64-linux/deformable_detr/_deformable_detr_320b408.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8926ca42814a03cdbac750f3a0cd3e3cbc28614a58e1ca5a77e82b3ad0148043 -size 9979264 diff --git a/build/torch27-cxx11-cu128-aarch64-linux/deformable_detr/_ops.py b/build/torch27-cxx11-cu128-aarch64-linux/deformable_detr/_ops.py deleted file mode 100644 index 155c52bfca54e55425b639314b289e668c5a6ec2..0000000000000000000000000000000000000000 --- a/build/torch27-cxx11-cu128-aarch64-linux/deformable_detr/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_320b408 -ops = torch.ops._deformable_detr_320b408 - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_320b408::{op_name}" \ No newline at end of file diff --git a/build/torch27-cxx11-cu128-aarch64-linux/deformable_detr/layers.py b/build/torch27-cxx11-cu128-aarch64-linux/deformable_detr/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch27-cxx11-cu128-aarch64-linux/deformable_detr/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch27-cxx11-cu128-x86_64-linux/deformable_detr/__init__.py b/build/torch27-cxx11-cu128-x86_64-linux/deformable_detr/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch27-cxx11-cu128-x86_64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch27-cxx11-cu128-x86_64-linux/deformable_detr/__pycache__/__init__.cpython-313.pyc b/build/torch27-cxx11-cu128-x86_64-linux/deformable_detr/__pycache__/__init__.cpython-313.pyc deleted file mode 100644 index 381ef42a3282d0c2787e94f3c29d999e4736d7c8..0000000000000000000000000000000000000000 Binary files a/build/torch27-cxx11-cu128-x86_64-linux/deformable_detr/__pycache__/__init__.cpython-313.pyc and /dev/null differ diff --git a/build/torch27-cxx11-cu128-x86_64-linux/deformable_detr/__pycache__/_ops.cpython-313.pyc b/build/torch27-cxx11-cu128-x86_64-linux/deformable_detr/__pycache__/_ops.cpython-313.pyc deleted file mode 100644 index 9291f79801323c5a3efc995f9c90ffa6cc35a50c..0000000000000000000000000000000000000000 Binary files a/build/torch27-cxx11-cu128-x86_64-linux/deformable_detr/__pycache__/_ops.cpython-313.pyc and /dev/null differ diff --git a/build/torch27-cxx11-cu128-x86_64-linux/deformable_detr/__pycache__/layers.cpython-313.pyc b/build/torch27-cxx11-cu128-x86_64-linux/deformable_detr/__pycache__/layers.cpython-313.pyc deleted file mode 100644 index 94595475894bf15ef880e78d37ec23bca83bed08..0000000000000000000000000000000000000000 Binary files a/build/torch27-cxx11-cu128-x86_64-linux/deformable_detr/__pycache__/layers.cpython-313.pyc and /dev/null differ diff --git a/build/torch27-cxx11-cu128-x86_64-linux/deformable_detr/_deformable_detr_57c3d32.abi3.so b/build/torch27-cxx11-cu128-x86_64-linux/deformable_detr/_deformable_detr_57c3d32.abi3.so deleted file mode 100644 index 2f388366cf92d9a815c26db28ca4a855f8e713ba..0000000000000000000000000000000000000000 --- a/build/torch27-cxx11-cu128-x86_64-linux/deformable_detr/_deformable_detr_57c3d32.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6f389536870cd4acf36ab8f12d3b0bf9f847ec06e2cfc25905420796884b614e -size 9907368 diff --git a/build/torch27-cxx11-cu128-x86_64-linux/deformable_detr/_ops.py b/build/torch27-cxx11-cu128-x86_64-linux/deformable_detr/_ops.py deleted file mode 100644 index 39c2aa7875432779e86612a0e56271fe32133953..0000000000000000000000000000000000000000 --- a/build/torch27-cxx11-cu128-x86_64-linux/deformable_detr/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_57c3d32 -ops = torch.ops._deformable_detr_57c3d32 - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_57c3d32::{op_name}" \ No newline at end of file diff --git a/build/torch27-cxx11-cu128-x86_64-linux/deformable_detr/layers.py b/build/torch27-cxx11-cu128-x86_64-linux/deformable_detr/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch27-cxx11-cu128-x86_64-linux/deformable_detr/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch28-cxx11-cu126-aarch64-linux/deformable_detr/__init__.py b/build/torch28-cxx11-cu126-aarch64-linux/deformable_detr/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu126-aarch64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch28-cxx11-cu126-aarch64-linux/deformable_detr/__pycache__/__init__.cpython-313.pyc b/build/torch28-cxx11-cu126-aarch64-linux/deformable_detr/__pycache__/__init__.cpython-313.pyc deleted file mode 100644 index 664a914e405aa872821d228b552f22a99cb39d97..0000000000000000000000000000000000000000 Binary files a/build/torch28-cxx11-cu126-aarch64-linux/deformable_detr/__pycache__/__init__.cpython-313.pyc and /dev/null differ diff --git a/build/torch28-cxx11-cu126-aarch64-linux/deformable_detr/__pycache__/_ops.cpython-313.pyc b/build/torch28-cxx11-cu126-aarch64-linux/deformable_detr/__pycache__/_ops.cpython-313.pyc deleted file mode 100644 index 273cdfd52347ebcf0e0c050945d37c5dc5094a9a..0000000000000000000000000000000000000000 Binary files a/build/torch28-cxx11-cu126-aarch64-linux/deformable_detr/__pycache__/_ops.cpython-313.pyc and /dev/null differ diff --git a/build/torch28-cxx11-cu126-aarch64-linux/deformable_detr/__pycache__/layers.cpython-313.pyc b/build/torch28-cxx11-cu126-aarch64-linux/deformable_detr/__pycache__/layers.cpython-313.pyc deleted file mode 100644 index 082d05eb36d7ef831ca076e3e7d2eb070130c2ec..0000000000000000000000000000000000000000 Binary files a/build/torch28-cxx11-cu126-aarch64-linux/deformable_detr/__pycache__/layers.cpython-313.pyc and /dev/null differ diff --git a/build/torch28-cxx11-cu126-aarch64-linux/deformable_detr/_deformable_detr_a92c8ea_dirty.abi3.so b/build/torch28-cxx11-cu126-aarch64-linux/deformable_detr/_deformable_detr_a92c8ea_dirty.abi3.so deleted file mode 100755 index 3d206228684c315eb04160dc62c8a7cb6811156a..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu126-aarch64-linux/deformable_detr/_deformable_detr_a92c8ea_dirty.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b4a5665b05309312200ca97a80cc61340c0f5de123ab33254e5307a5ec4ed2a0 -size 6901024 diff --git a/build/torch28-cxx11-cu126-aarch64-linux/deformable_detr/_ops.py b/build/torch28-cxx11-cu126-aarch64-linux/deformable_detr/_ops.py deleted file mode 100644 index 019cf7ce30dc11d9b791075404417b1ac47500e7..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu126-aarch64-linux/deformable_detr/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_a92c8ea_dirty -ops = torch.ops._deformable_detr_a92c8ea_dirty - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_a92c8ea_dirty::{op_name}" \ No newline at end of file diff --git a/build/torch28-cxx11-cu126-aarch64-linux/deformable_detr/layers.py b/build/torch28-cxx11-cu126-aarch64-linux/deformable_detr/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu126-aarch64-linux/deformable_detr/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch28-cxx11-cu126-x86_64-linux/__init__.py b/build/torch28-cxx11-cu126-x86_64-linux/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu126-x86_64-linux/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch28-cxx11-cu126-x86_64-linux/_deformable_detr_d7966ee.abi3.so b/build/torch28-cxx11-cu126-x86_64-linux/_deformable_detr_d7966ee.abi3.so deleted file mode 100644 index 818f37b941ec19250adbb6feb357a0ec81c67b2a..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu126-x86_64-linux/_deformable_detr_d7966ee.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f8e98e8cdd688603d90d9bbc9fc7fd093d7c8f098ae239b33d59db563ca20d3f -size 8535712 diff --git a/build/torch28-cxx11-cu126-x86_64-linux/_ops.py b/build/torch28-cxx11-cu126-x86_64-linux/_ops.py deleted file mode 100644 index b498ff9a9fd0bc22a42440001932cf97a8a9e955..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu126-x86_64-linux/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_d7966ee -ops = torch.ops._deformable_detr_d7966ee - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_d7966ee::{op_name}" \ No newline at end of file diff --git a/build/torch28-cxx11-cu126-x86_64-linux/deformable_detr/__init__.py b/build/torch28-cxx11-cu126-x86_64-linux/deformable_detr/__init__.py deleted file mode 100644 index 03dbc1afe1cf156661a2b1b22003cd5f599a0309..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu126-x86_64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -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/layers.py b/build/torch28-cxx11-cu126-x86_64-linux/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu126-x86_64-linux/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch28-cxx11-cu126-x86_64-linux/metadata.json b/build/torch28-cxx11-cu126-x86_64-linux/metadata.json deleted file mode 100644 index 9cf5deed9898dce769f4cc73913d3530b92a0bd8..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu126-x86_64-linux/metadata.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "version": 1, - "python-depends": [] -} \ No newline at end of file diff --git a/build/torch28-cxx11-cu128-aarch64-linux/deformable_detr/__init__.py b/build/torch28-cxx11-cu128-aarch64-linux/deformable_detr/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu128-aarch64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch28-cxx11-cu128-aarch64-linux/deformable_detr/__pycache__/__init__.cpython-313.pyc b/build/torch28-cxx11-cu128-aarch64-linux/deformable_detr/__pycache__/__init__.cpython-313.pyc deleted file mode 100644 index 28a5933156ae99fa286e692f8e98dd04e50f5174..0000000000000000000000000000000000000000 Binary files a/build/torch28-cxx11-cu128-aarch64-linux/deformable_detr/__pycache__/__init__.cpython-313.pyc and /dev/null differ diff --git a/build/torch28-cxx11-cu128-aarch64-linux/deformable_detr/__pycache__/_ops.cpython-313.pyc b/build/torch28-cxx11-cu128-aarch64-linux/deformable_detr/__pycache__/_ops.cpython-313.pyc deleted file mode 100644 index 0009fad4a606c6aacd228a2d7af5e6263d47d861..0000000000000000000000000000000000000000 Binary files a/build/torch28-cxx11-cu128-aarch64-linux/deformable_detr/__pycache__/_ops.cpython-313.pyc and /dev/null differ diff --git a/build/torch28-cxx11-cu128-aarch64-linux/deformable_detr/__pycache__/layers.cpython-313.pyc b/build/torch28-cxx11-cu128-aarch64-linux/deformable_detr/__pycache__/layers.cpython-313.pyc deleted file mode 100644 index 18befc2ceb219257a717fe3c9800618101a3904c..0000000000000000000000000000000000000000 Binary files a/build/torch28-cxx11-cu128-aarch64-linux/deformable_detr/__pycache__/layers.cpython-313.pyc and /dev/null differ diff --git a/build/torch28-cxx11-cu128-aarch64-linux/deformable_detr/_deformable_detr_a92c8ea_dirty.abi3.so b/build/torch28-cxx11-cu128-aarch64-linux/deformable_detr/_deformable_detr_a92c8ea_dirty.abi3.so deleted file mode 100755 index 7a0b563d8285a538c60f993ba90ffee3d5b49ec6..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu128-aarch64-linux/deformable_detr/_deformable_detr_a92c8ea_dirty.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3f4a0a7850968822e26e3a59c801fd711231d5294193155efbf9583761e114ef -size 9849688 diff --git a/build/torch28-cxx11-cu128-aarch64-linux/deformable_detr/_ops.py b/build/torch28-cxx11-cu128-aarch64-linux/deformable_detr/_ops.py deleted file mode 100644 index 019cf7ce30dc11d9b791075404417b1ac47500e7..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu128-aarch64-linux/deformable_detr/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_a92c8ea_dirty -ops = torch.ops._deformable_detr_a92c8ea_dirty - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_a92c8ea_dirty::{op_name}" \ No newline at end of file diff --git a/build/torch28-cxx11-cu128-aarch64-linux/deformable_detr/layers.py b/build/torch28-cxx11-cu128-aarch64-linux/deformable_detr/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu128-aarch64-linux/deformable_detr/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch28-cxx11-cu128-x86_64-linux/__init__.py b/build/torch28-cxx11-cu128-x86_64-linux/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu128-x86_64-linux/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch28-cxx11-cu128-x86_64-linux/_deformable_detr_d7966ee.abi3.so b/build/torch28-cxx11-cu128-x86_64-linux/_deformable_detr_d7966ee.abi3.so deleted file mode 100644 index 2118be1b65bcb2c028582b19fa63835513865bf1..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu128-x86_64-linux/_deformable_detr_d7966ee.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:615c916fe00481be53757d381f62c663c3519bf5d0dda09514b13bf9e493b807 -size 11523184 diff --git a/build/torch28-cxx11-cu128-x86_64-linux/_ops.py b/build/torch28-cxx11-cu128-x86_64-linux/_ops.py deleted file mode 100644 index b498ff9a9fd0bc22a42440001932cf97a8a9e955..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu128-x86_64-linux/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_d7966ee -ops = torch.ops._deformable_detr_d7966ee - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_d7966ee::{op_name}" \ No newline at end of file diff --git a/build/torch28-cxx11-cu128-x86_64-linux/deformable_detr/__init__.py b/build/torch28-cxx11-cu128-x86_64-linux/deformable_detr/__init__.py deleted file mode 100644 index 03dbc1afe1cf156661a2b1b22003cd5f599a0309..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu128-x86_64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -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-cu128-x86_64-linux/layers.py b/build/torch28-cxx11-cu128-x86_64-linux/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu128-x86_64-linux/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch28-cxx11-cu128-x86_64-linux/metadata.json b/build/torch28-cxx11-cu128-x86_64-linux/metadata.json deleted file mode 100644 index 9cf5deed9898dce769f4cc73913d3530b92a0bd8..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu128-x86_64-linux/metadata.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "version": 1, - "python-depends": [] -} \ No newline at end of file diff --git a/build/torch28-cxx11-cu129-aarch64-linux/deformable_detr/__init__.py b/build/torch28-cxx11-cu129-aarch64-linux/deformable_detr/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu129-aarch64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch28-cxx11-cu129-aarch64-linux/deformable_detr/__pycache__/__init__.cpython-313.pyc b/build/torch28-cxx11-cu129-aarch64-linux/deformable_detr/__pycache__/__init__.cpython-313.pyc deleted file mode 100644 index 3455ebe146d88ed909d4d3a22cbafdb7062e1a5c..0000000000000000000000000000000000000000 Binary files a/build/torch28-cxx11-cu129-aarch64-linux/deformable_detr/__pycache__/__init__.cpython-313.pyc and /dev/null differ diff --git a/build/torch28-cxx11-cu129-aarch64-linux/deformable_detr/__pycache__/_ops.cpython-313.pyc b/build/torch28-cxx11-cu129-aarch64-linux/deformable_detr/__pycache__/_ops.cpython-313.pyc deleted file mode 100644 index 6d0da2a8b90739e30e9e2787462994764ddd0e6b..0000000000000000000000000000000000000000 Binary files a/build/torch28-cxx11-cu129-aarch64-linux/deformable_detr/__pycache__/_ops.cpython-313.pyc and /dev/null differ diff --git a/build/torch28-cxx11-cu129-aarch64-linux/deformable_detr/__pycache__/layers.cpython-313.pyc b/build/torch28-cxx11-cu129-aarch64-linux/deformable_detr/__pycache__/layers.cpython-313.pyc deleted file mode 100644 index f35af2756ff4a30e7bd8d95092215bc26766097d..0000000000000000000000000000000000000000 Binary files a/build/torch28-cxx11-cu129-aarch64-linux/deformable_detr/__pycache__/layers.cpython-313.pyc and /dev/null differ diff --git a/build/torch28-cxx11-cu129-aarch64-linux/deformable_detr/_deformable_detr_320b408.abi3.so b/build/torch28-cxx11-cu129-aarch64-linux/deformable_detr/_deformable_detr_320b408.abi3.so deleted file mode 100644 index fe1c2e4e6b379f20da5c38cee026aac074b71fb4..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu129-aarch64-linux/deformable_detr/_deformable_detr_320b408.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c7f99924b14f0522d25c5f0a307ab1364a3f76d9ecf29684f80aa388f6bd443b -size 10047704 diff --git a/build/torch28-cxx11-cu129-aarch64-linux/deformable_detr/_ops.py b/build/torch28-cxx11-cu129-aarch64-linux/deformable_detr/_ops.py deleted file mode 100644 index 155c52bfca54e55425b639314b289e668c5a6ec2..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu129-aarch64-linux/deformable_detr/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_320b408 -ops = torch.ops._deformable_detr_320b408 - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_320b408::{op_name}" \ No newline at end of file diff --git a/build/torch28-cxx11-cu129-aarch64-linux/deformable_detr/layers.py b/build/torch28-cxx11-cu129-aarch64-linux/deformable_detr/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu129-aarch64-linux/deformable_detr/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch28-cxx11-cu129-x86_64-linux/__init__.py b/build/torch28-cxx11-cu129-x86_64-linux/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu129-x86_64-linux/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch28-cxx11-cu129-x86_64-linux/_deformable_detr_d7966ee.abi3.so b/build/torch28-cxx11-cu129-x86_64-linux/_deformable_detr_d7966ee.abi3.so deleted file mode 100644 index be60b895fec86b2ac0f8f4387d10002f63cf4c8f..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu129-x86_64-linux/_deformable_detr_d7966ee.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4b38ea9a577233aee07a6417d5651076d27940a1a5b9b7edb89d1745a885b071 -size 11581544 diff --git a/build/torch28-cxx11-cu129-x86_64-linux/_ops.py b/build/torch28-cxx11-cu129-x86_64-linux/_ops.py deleted file mode 100644 index b498ff9a9fd0bc22a42440001932cf97a8a9e955..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu129-x86_64-linux/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_d7966ee -ops = torch.ops._deformable_detr_d7966ee - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_d7966ee::{op_name}" \ No newline at end of file diff --git a/build/torch28-cxx11-cu129-x86_64-linux/deformable_detr/__init__.py b/build/torch28-cxx11-cu129-x86_64-linux/deformable_detr/__init__.py deleted file mode 100644 index 03dbc1afe1cf156661a2b1b22003cd5f599a0309..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu129-x86_64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -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-cu129-x86_64-linux/layers.py b/build/torch28-cxx11-cu129-x86_64-linux/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu129-x86_64-linux/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch28-cxx11-cu129-x86_64-linux/metadata.json b/build/torch28-cxx11-cu129-x86_64-linux/metadata.json deleted file mode 100644 index 9cf5deed9898dce769f4cc73913d3530b92a0bd8..0000000000000000000000000000000000000000 --- a/build/torch28-cxx11-cu129-x86_64-linux/metadata.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "version": 1, - "python-depends": [] -} \ No newline at end of file diff --git a/build/torch29-cxx11-cu126-aarch64-linux/__init__.py b/build/torch29-cxx11-cu126-aarch64-linux/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu126-aarch64-linux/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch29-cxx11-cu126-aarch64-linux/_deformable_detr_cuda_a06632f.abi3.so b/build/torch29-cxx11-cu126-aarch64-linux/_deformable_detr_cuda_a06632f.abi3.so deleted file mode 100644 index 097315236d6852aa1cf13eef398aafa6258dac7e..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu126-aarch64-linux/_deformable_detr_cuda_a06632f.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e699c1c6b8c41b718c233089e16c5683fa782dd1b87e61e954941ab5f47d8341 -size 8604944 diff --git a/build/torch29-cxx11-cu126-aarch64-linux/_ops.py b/build/torch29-cxx11-cu126-aarch64-linux/_ops.py deleted file mode 100644 index b150fa4c35414012586d1ba33daac6779a49d93a..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu126-aarch64-linux/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_cuda_a06632f -ops = torch.ops._deformable_detr_cuda_a06632f - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_cuda_a06632f::{op_name}" diff --git a/build/torch29-cxx11-cu126-aarch64-linux/deformable_detr/__init__.py b/build/torch29-cxx11-cu126-aarch64-linux/deformable_detr/__init__.py deleted file mode 100644 index 03dbc1afe1cf156661a2b1b22003cd5f599a0309..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu126-aarch64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -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/torch29-cxx11-cu126-aarch64-linux/layers.py b/build/torch29-cxx11-cu126-aarch64-linux/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu126-aarch64-linux/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch29-cxx11-cu126-aarch64-linux/metadata.json b/build/torch29-cxx11-cu126-aarch64-linux/metadata.json deleted file mode 100644 index f5902b55ab0b2b561c0cf97567c9806c60839c7f..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu126-aarch64-linux/metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "version": 1, - "license": "Apache-2.0", - "python-depends": [], - "backend": { - "type": "cuda", - "archs": [ - "7.0", - "7.2", - "7.5", - "8.0", - "8.6", - "8.7", - "8.9", - "9.0+PTX" - ] - } -} diff --git a/build/torch29-cxx11-cu126-x86_64-linux/__init__.py b/build/torch29-cxx11-cu126-x86_64-linux/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu126-x86_64-linux/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch29-cxx11-cu126-x86_64-linux/_deformable_detr_cuda_a06632f.abi3.so b/build/torch29-cxx11-cu126-x86_64-linux/_deformable_detr_cuda_a06632f.abi3.so deleted file mode 100644 index a404f522dd98443c7f9f6d2fb9df13ca99433b0c..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu126-x86_64-linux/_deformable_detr_cuda_a06632f.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c3165afbd76a4a3cdb1d23f014e551cb7d4a43286bbb4d356148f4efc232f6d2 -size 8535888 diff --git a/build/torch29-cxx11-cu126-x86_64-linux/_ops.py b/build/torch29-cxx11-cu126-x86_64-linux/_ops.py deleted file mode 100644 index b150fa4c35414012586d1ba33daac6779a49d93a..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu126-x86_64-linux/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_cuda_a06632f -ops = torch.ops._deformable_detr_cuda_a06632f - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_cuda_a06632f::{op_name}" diff --git a/build/torch29-cxx11-cu126-x86_64-linux/deformable_detr/__init__.py b/build/torch29-cxx11-cu126-x86_64-linux/deformable_detr/__init__.py deleted file mode 100644 index 03dbc1afe1cf156661a2b1b22003cd5f599a0309..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu126-x86_64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -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/torch29-cxx11-cu126-x86_64-linux/layers.py b/build/torch29-cxx11-cu126-x86_64-linux/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu126-x86_64-linux/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch29-cxx11-cu126-x86_64-linux/metadata.json b/build/torch29-cxx11-cu126-x86_64-linux/metadata.json deleted file mode 100644 index f5902b55ab0b2b561c0cf97567c9806c60839c7f..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu126-x86_64-linux/metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "version": 1, - "license": "Apache-2.0", - "python-depends": [], - "backend": { - "type": "cuda", - "archs": [ - "7.0", - "7.2", - "7.5", - "8.0", - "8.6", - "8.7", - "8.9", - "9.0+PTX" - ] - } -} diff --git a/build/torch29-cxx11-cu128-aarch64-linux/__init__.py b/build/torch29-cxx11-cu128-aarch64-linux/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu128-aarch64-linux/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch29-cxx11-cu128-aarch64-linux/_deformable_detr_cuda_a06632f.abi3.so b/build/torch29-cxx11-cu128-aarch64-linux/_deformable_detr_cuda_a06632f.abi3.so deleted file mode 100644 index c35d7e717a3c4a8dc01bc49ee48ebe22d0899a68..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu128-aarch64-linux/_deformable_detr_cuda_a06632f.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ee686cad364dc6a654fe2b43da0bf46fc1df3f3156dc1865a7e4811d811686e8 -size 11619232 diff --git a/build/torch29-cxx11-cu128-aarch64-linux/_ops.py b/build/torch29-cxx11-cu128-aarch64-linux/_ops.py deleted file mode 100644 index b150fa4c35414012586d1ba33daac6779a49d93a..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu128-aarch64-linux/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_cuda_a06632f -ops = torch.ops._deformable_detr_cuda_a06632f - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_cuda_a06632f::{op_name}" diff --git a/build/torch29-cxx11-cu128-aarch64-linux/deformable_detr/__init__.py b/build/torch29-cxx11-cu128-aarch64-linux/deformable_detr/__init__.py deleted file mode 100644 index 03dbc1afe1cf156661a2b1b22003cd5f599a0309..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu128-aarch64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -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/torch29-cxx11-cu128-aarch64-linux/layers.py b/build/torch29-cxx11-cu128-aarch64-linux/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu128-aarch64-linux/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch29-cxx11-cu128-aarch64-linux/metadata.json b/build/torch29-cxx11-cu128-aarch64-linux/metadata.json deleted file mode 100644 index 8b796af185fbbd8594fcd846949aa5fadc0ccdda..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu128-aarch64-linux/metadata.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "version": 1, - "license": "Apache-2.0", - "python-depends": [], - "backend": { - "type": "cuda", - "archs": [ - "10.0", - "10.1", - "12.0+PTX", - "7.0", - "7.2", - "7.5", - "8.0", - "8.6", - "8.7", - "8.9", - "9.0" - ] - } -} diff --git a/build/torch29-cxx11-cu128-x86_64-linux/__init__.py b/build/torch29-cxx11-cu128-x86_64-linux/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu128-x86_64-linux/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch29-cxx11-cu128-x86_64-linux/_deformable_detr_cuda_a06632f.abi3.so b/build/torch29-cxx11-cu128-x86_64-linux/_deformable_detr_cuda_a06632f.abi3.so deleted file mode 100644 index c66150f385ca1e7073cae942add6b6fceadd27d6..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu128-x86_64-linux/_deformable_detr_cuda_a06632f.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c851c52dba9eb591cfd264a8764b1880149fc40a94781c1e5bba5f3702b0cc22 -size 11519264 diff --git a/build/torch29-cxx11-cu128-x86_64-linux/_ops.py b/build/torch29-cxx11-cu128-x86_64-linux/_ops.py deleted file mode 100644 index b150fa4c35414012586d1ba33daac6779a49d93a..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu128-x86_64-linux/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_cuda_a06632f -ops = torch.ops._deformable_detr_cuda_a06632f - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_cuda_a06632f::{op_name}" diff --git a/build/torch29-cxx11-cu128-x86_64-linux/deformable_detr/__init__.py b/build/torch29-cxx11-cu128-x86_64-linux/deformable_detr/__init__.py deleted file mode 100644 index 03dbc1afe1cf156661a2b1b22003cd5f599a0309..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu128-x86_64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -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/torch29-cxx11-cu128-x86_64-linux/layers.py b/build/torch29-cxx11-cu128-x86_64-linux/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu128-x86_64-linux/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch29-cxx11-cu128-x86_64-linux/metadata.json b/build/torch29-cxx11-cu128-x86_64-linux/metadata.json deleted file mode 100644 index 8b796af185fbbd8594fcd846949aa5fadc0ccdda..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu128-x86_64-linux/metadata.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "version": 1, - "license": "Apache-2.0", - "python-depends": [], - "backend": { - "type": "cuda", - "archs": [ - "10.0", - "10.1", - "12.0+PTX", - "7.0", - "7.2", - "7.5", - "8.0", - "8.6", - "8.7", - "8.9", - "9.0" - ] - } -} diff --git a/build/torch29-cxx11-cu129-aarch64-linux/__init__.py b/build/torch29-cxx11-cu129-aarch64-linux/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu129-aarch64-linux/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch29-cxx11-cu129-aarch64-linux/_deformable_detr_cuda_9bd354b.abi3.so b/build/torch29-cxx11-cu129-aarch64-linux/_deformable_detr_cuda_9bd354b.abi3.so deleted file mode 100644 index ecc5bc73aac5d662f3cf8eb1591974c9ee1694a3..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu129-aarch64-linux/_deformable_detr_cuda_9bd354b.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:88a428301732c37004a22a9f6c185186080ad9cc8227c2cb8df81ccbcbef3f4b -size 11686192 diff --git a/build/torch29-cxx11-cu129-aarch64-linux/_ops.py b/build/torch29-cxx11-cu129-aarch64-linux/_ops.py deleted file mode 100644 index a711b4a8404ad6b007a926f2d2ec7add724e5cef..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu129-aarch64-linux/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_cuda_9bd354b -ops = torch.ops._deformable_detr_cuda_9bd354b - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_cuda_9bd354b::{op_name}" diff --git a/build/torch29-cxx11-cu129-aarch64-linux/deformable_detr/__init__.py b/build/torch29-cxx11-cu129-aarch64-linux/deformable_detr/__init__.py deleted file mode 100644 index a9b2672c1cd85b74c1b3ded0fc0b2100e1aeac23..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu129-aarch64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -import ctypes -import importlib.util -import sys -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-cu129-aarch64-linux/layers.py b/build/torch29-cxx11-cu129-aarch64-linux/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu129-aarch64-linux/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch29-cxx11-cu129-aarch64-linux/metadata.json b/build/torch29-cxx11-cu129-aarch64-linux/metadata.json deleted file mode 100644 index 8b796af185fbbd8594fcd846949aa5fadc0ccdda..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu129-aarch64-linux/metadata.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "version": 1, - "license": "Apache-2.0", - "python-depends": [], - "backend": { - "type": "cuda", - "archs": [ - "10.0", - "10.1", - "12.0+PTX", - "7.0", - "7.2", - "7.5", - "8.0", - "8.6", - "8.7", - "8.9", - "9.0" - ] - } -} diff --git a/build/torch29-cxx11-cu129-x86_64-linux/__init__.py b/build/torch29-cxx11-cu129-x86_64-linux/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu129-x86_64-linux/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch29-cxx11-cu129-x86_64-linux/_deformable_detr_cuda_9bd354b.abi3.so b/build/torch29-cxx11-cu129-x86_64-linux/_deformable_detr_cuda_9bd354b.abi3.so deleted file mode 100644 index 7ca8ee3172faa5d278d1c1b53525034fcd0e821e..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu129-x86_64-linux/_deformable_detr_cuda_9bd354b.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3f5d2d09cbd071e6631352f43dd8d8965e6977d65d9f575d3afae41ef81b4899 -size 11581720 diff --git a/build/torch29-cxx11-cu129-x86_64-linux/_ops.py b/build/torch29-cxx11-cu129-x86_64-linux/_ops.py deleted file mode 100644 index a711b4a8404ad6b007a926f2d2ec7add724e5cef..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu129-x86_64-linux/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_cuda_9bd354b -ops = torch.ops._deformable_detr_cuda_9bd354b - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_cuda_9bd354b::{op_name}" diff --git a/build/torch29-cxx11-cu129-x86_64-linux/deformable_detr/__init__.py b/build/torch29-cxx11-cu129-x86_64-linux/deformable_detr/__init__.py deleted file mode 100644 index a9b2672c1cd85b74c1b3ded0fc0b2100e1aeac23..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu129-x86_64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -import ctypes -import importlib.util -import sys -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-cu129-x86_64-linux/layers.py b/build/torch29-cxx11-cu129-x86_64-linux/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu129-x86_64-linux/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch29-cxx11-cu129-x86_64-linux/metadata.json b/build/torch29-cxx11-cu129-x86_64-linux/metadata.json deleted file mode 100644 index 8b796af185fbbd8594fcd846949aa5fadc0ccdda..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu129-x86_64-linux/metadata.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "version": 1, - "license": "Apache-2.0", - "python-depends": [], - "backend": { - "type": "cuda", - "archs": [ - "10.0", - "10.1", - "12.0+PTX", - "7.0", - "7.2", - "7.5", - "8.0", - "8.6", - "8.7", - "8.9", - "9.0" - ] - } -} diff --git a/build/torch29-cxx11-cu130-aarch64-linux/__init__.py b/build/torch29-cxx11-cu130-aarch64-linux/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu130-aarch64-linux/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch29-cxx11-cu130-aarch64-linux/_deformable_detr_cuda_a06632f.abi3.so b/build/torch29-cxx11-cu130-aarch64-linux/_deformable_detr_cuda_a06632f.abi3.so deleted file mode 100644 index 2404e808024343acd3462674651dcfcdf9146404..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu130-aarch64-linux/_deformable_detr_cuda_a06632f.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f0ab087e15a52004500698e23cb707eaec57fa16de384ea5388e0a396318f088 -size 9888904 diff --git a/build/torch29-cxx11-cu130-aarch64-linux/_ops.py b/build/torch29-cxx11-cu130-aarch64-linux/_ops.py deleted file mode 100644 index b150fa4c35414012586d1ba33daac6779a49d93a..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu130-aarch64-linux/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_cuda_a06632f -ops = torch.ops._deformable_detr_cuda_a06632f - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_cuda_a06632f::{op_name}" diff --git a/build/torch29-cxx11-cu130-aarch64-linux/deformable_detr/__init__.py b/build/torch29-cxx11-cu130-aarch64-linux/deformable_detr/__init__.py deleted file mode 100644 index 03dbc1afe1cf156661a2b1b22003cd5f599a0309..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu130-aarch64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -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/torch29-cxx11-cu130-aarch64-linux/layers.py b/build/torch29-cxx11-cu130-aarch64-linux/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu130-aarch64-linux/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch29-cxx11-cu130-aarch64-linux/metadata.json b/build/torch29-cxx11-cu130-aarch64-linux/metadata.json deleted file mode 100644 index 66651b7d3f95ac9e5ce5fc2a641b6f0f50788f87..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu130-aarch64-linux/metadata.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "version": 1, - "license": "Apache-2.0", - "python-depends": [], - "backend": { - "type": "cuda", - "archs": [ - "10.0", - "11.0", - "12.0+PTX", - "7.5", - "8.0", - "8.6", - "8.7", - "8.9", - "9.0" - ] - } -} diff --git a/build/torch29-cxx11-cu130-x86_64-linux/__init__.py b/build/torch29-cxx11-cu130-x86_64-linux/__init__.py deleted file mode 100644 index 33db73ca6e361af4707ba5bb5f55bf0e7c3005a4..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu130-x86_64-linux/__init__.py +++ /dev/null @@ -1,46 +0,0 @@ -from typing import List -import torch - -from ._ops import ops -from . import layers - - -def ms_deform_attn_backward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - grad_output: torch.Tensor, - im2col_step: int, -) -> List[torch.Tensor]: - return ops.ms_deform_attn_backward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - grad_output, - im2col_step, - ) - - -def ms_deform_attn_forward( - value: torch.Tensor, - spatial_shapes: torch.Tensor, - level_start_index: torch.Tensor, - sampling_loc: torch.Tensor, - attn_weight: torch.Tensor, - im2col_step: int, -) -> torch.Tensor: - return ops.ms_deform_attn_forward( - value, - spatial_shapes, - level_start_index, - sampling_loc, - attn_weight, - im2col_step, - ) - - -__all__ = ["layers", "ms_deform_attn_forward", "ms_deform_attn_backward"] diff --git a/build/torch29-cxx11-cu130-x86_64-linux/_deformable_detr_cuda_a06632f.abi3.so b/build/torch29-cxx11-cu130-x86_64-linux/_deformable_detr_cuda_a06632f.abi3.so deleted file mode 100644 index 6c6e678cc4f728eabb7c7458f8e574884a33d02a..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu130-x86_64-linux/_deformable_detr_cuda_a06632f.abi3.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:40af5d2edddffdf5c91a80083c35ceaacdcc6d08e1208bd85c78b4b533e11643 -size 9803064 diff --git a/build/torch29-cxx11-cu130-x86_64-linux/_ops.py b/build/torch29-cxx11-cu130-x86_64-linux/_ops.py deleted file mode 100644 index b150fa4c35414012586d1ba33daac6779a49d93a..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu130-x86_64-linux/_ops.py +++ /dev/null @@ -1,9 +0,0 @@ -import torch -from . import _deformable_detr_cuda_a06632f -ops = torch.ops._deformable_detr_cuda_a06632f - -def add_op_namespace_prefix(op_name: str): - """ - Prefix op by namespace. - """ - return f"_deformable_detr_cuda_a06632f::{op_name}" diff --git a/build/torch29-cxx11-cu130-x86_64-linux/deformable_detr/__init__.py b/build/torch29-cxx11-cu130-x86_64-linux/deformable_detr/__init__.py deleted file mode 100644 index 03dbc1afe1cf156661a2b1b22003cd5f599a0309..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu130-x86_64-linux/deformable_detr/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -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/torch29-cxx11-cu130-x86_64-linux/layers.py b/build/torch29-cxx11-cu130-x86_64-linux/layers.py deleted file mode 100644 index db94032dea3d445f27017f923ae80468e18d2d77..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu130-x86_64-linux/layers.py +++ /dev/null @@ -1,84 +0,0 @@ -from typing import List, Union, Tuple - -from torch import Tensor -from torch.autograd import Function -from torch.autograd.function import once_differentiable -import torch.nn as nn - -from ._ops import ops - - -class MultiScaleDeformableAttentionFunction(Function): - @staticmethod - def forward( - context, - value: Tensor, - value_spatial_shapes: Tensor, - value_level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - context.im2col_step = im2col_step - output = ops.ms_deform_attn_forward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - context.im2col_step, - ) - context.save_for_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) - return output - - @staticmethod - @once_differentiable - def backward(context, grad_output): - ( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - ) = context.saved_tensors - grad_value, grad_sampling_loc, grad_attn_weight = ops.ms_deform_attn_backward( - value, - value_spatial_shapes, - value_level_start_index, - sampling_locations, - attention_weights, - grad_output, - context.im2col_step, - ) - - return grad_value, None, None, grad_sampling_loc, grad_attn_weight, None - - -class MultiScaleDeformableAttention(nn.Module): - def forward( - self, - value: Tensor, - value_spatial_shapes: Tensor, - value_spatial_shapes_list: List[Tuple], - level_start_index: Tensor, - sampling_locations: Tensor, - attention_weights: Tensor, - im2col_step: int, - ): - return MultiScaleDeformableAttentionFunction.apply( - value, - value_spatial_shapes, - level_start_index, - sampling_locations, - attention_weights, - im2col_step, - ) - - -__all__ = ["MultiScaleDeformableAttention"] diff --git a/build/torch29-cxx11-cu130-x86_64-linux/metadata.json b/build/torch29-cxx11-cu130-x86_64-linux/metadata.json deleted file mode 100644 index 66651b7d3f95ac9e5ce5fc2a641b6f0f50788f87..0000000000000000000000000000000000000000 --- a/build/torch29-cxx11-cu130-x86_64-linux/metadata.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "version": 1, - "license": "Apache-2.0", - "python-depends": [], - "backend": { - "type": "cuda", - "archs": [ - "10.0", - "11.0", - "12.0+PTX", - "7.5", - "8.0", - "8.6", - "8.7", - "8.9", - "9.0" - ] - } -}