





from ..utils import DummyObject, requires_backends


class        __SCREAMING_SNAKE_CASE      (			metaclass=lowerCAmelCase_ ):
       _UpperCAmelCase				:  str      =   ["flax"]







       def __init__(				self					:     Tuple		, *A					:     Dict		, **A					:     Dict      )       ->Tuple:
          requires_backends(self		, ['''flax''']      )







       @classmethod
       def 						__lowerCamelCase   (				cls					:     int		, *A					:     Tuple		, **A					:     List[Any]      )       ->Dict:
          requires_backends(cls		, ['''flax''']      )







       @classmethod
       def 						__lowerCamelCase   (				cls					:     List[Any]		, *A					:     Optional[int]		, **A					:     Optional[int]      )       ->Any:
          requires_backends(cls		, ['''flax''']      )


class        __SCREAMING_SNAKE_CASE      (			metaclass=lowerCAmelCase_ ):
       _UpperCAmelCase				:  Union[str, Any]      =   ["flax"]







       def __init__(				self					:     str		, *A					:     List[Any]		, **A					:     Tuple      )       ->Tuple:
          requires_backends(self		, ['''flax''']      )







       @classmethod
       def 						__lowerCamelCase   (				cls					:     Optional[int]		, *A					:     Union[str, Any]		, **A					:     Dict      )       ->List[Any]:
          requires_backends(cls		, ['''flax''']      )







       @classmethod
       def 						__lowerCamelCase   (				cls					:     Any		, *A					:     Dict		, **A					:     List[Any]      )       ->List[Any]:
          requires_backends(cls		, ['''flax''']      )


class        __SCREAMING_SNAKE_CASE      (			metaclass=lowerCAmelCase_ ):
       _UpperCAmelCase				:  Tuple      =   ["flax"]







       def __init__(				self					:     List[Any]		, *A					:     List[Any]		, **A					:     List[Any]      )       ->List[Any]:
          requires_backends(self		, ['''flax''']      )







       @classmethod
       def 						__lowerCamelCase   (				cls					:     Optional[int]		, *A					:     str		, **A					:     str      )       ->Optional[int]:
          requires_backends(cls		, ['''flax''']      )







       @classmethod
       def 						__lowerCamelCase   (				cls					:     Optional[Any]		, *A					:     List[Any]		, **A					:     Tuple      )       ->Dict:
          requires_backends(cls		, ['''flax''']      )


class        __SCREAMING_SNAKE_CASE      (			metaclass=lowerCAmelCase_ ):
       _UpperCAmelCase				:  Optional[Any]      =   ["flax"]







       def __init__(				self					:     int		, *A					:     Union[str, Any]		, **A					:     Optional[Any]      )       ->List[Any]:
          requires_backends(self		, ['''flax''']      )







       @classmethod
       def 						__lowerCamelCase   (				cls					:     Optional[int]		, *A					:     Tuple		, **A					:     Union[str, Any]      )       ->str:
          requires_backends(cls		, ['''flax''']      )







       @classmethod
       def 						__lowerCamelCase   (				cls					:     List[str]		, *A					:     Optional[int]		, **A					:     str      )       ->Tuple:
          requires_backends(cls		, ['''flax''']      )


class        __SCREAMING_SNAKE_CASE      (			metaclass=lowerCAmelCase_ ):
       _UpperCAmelCase				:  List[str]      =   ["flax"]







       def __init__(				self					:     Union[str, Any]		, *A					:     Dict		, **A					:     Union[str, Any]      )       ->Dict:
          requires_backends(self		, ['''flax''']      )







       @classmethod
       def 						__lowerCamelCase   (				cls					:     List[str]		, *A					:     List[str]		, **A					:     str      )       ->List[str]:
          requires_backends(cls		, ['''flax''']      )







       @classmethod
       def 						__lowerCamelCase   (				cls					:     Tuple		, *A					:     int		, **A					:     Dict      )       ->Union[str, Any]:
          requires_backends(cls		, ['''flax''']      )


class        __SCREAMING_SNAKE_CASE      (			metaclass=lowerCAmelCase_ ):
       _UpperCAmelCase				:  Tuple      =   ["flax"]







       def __init__(				self					:     List[Any]		, *A					:     List[str]		, **A					:     Optional[int]      )       ->str:
          requires_backends(self		, ['''flax''']      )







       @classmethod
       def 						__lowerCamelCase   (				cls					:     Tuple		, *A					:     str		, **A					:     str      )       ->Dict:
          requires_backends(cls		, ['''flax''']      )







       @classmethod
       def 						__lowerCamelCase   (				cls					:     Any		, *A					:     Optional[Any]		, **A					:     Optional[Any]      )       ->Tuple:
          requires_backends(cls		, ['''flax''']      )


class        __SCREAMING_SNAKE_CASE      (			metaclass=lowerCAmelCase_ ):
       _UpperCAmelCase				:  str      =   ["flax"]







       def __init__(				self					:     Optional[Any]		, *A					:     List[Any]		, **A					:     Any      )       ->List[Any]:
          requires_backends(self		, ['''flax''']      )







       @classmethod
       def 						__lowerCamelCase   (				cls					:     List[Any]		, *A					:     Dict		, **A					:     Union[str, Any]      )       ->Optional[int]:
          requires_backends(cls		, ['''flax''']      )







       @classmethod
       def 						__lowerCamelCase   (				cls					:     List[Any]		, *A					:     Optional[int]		, **A					:     Optional[int]      )       ->Any:
          requires_backends(cls		, ['''flax''']      )


class        __SCREAMING_SNAKE_CASE      (			metaclass=lowerCAmelCase_ ):
       _UpperCAmelCase				:  List[Any]      =   ["flax"]







       def __init__(				self					:     Optional[Any]		, *A					:     List[str]		, **A					:     List[str]      )       ->int:
          requires_backends(self		, ['''flax''']      )







       @classmethod
       def 						__lowerCamelCase   (				cls					:     int		, *A					:     List[str]		, **A					:     Union[str, Any]      )       ->List[Any]:
          requires_backends(cls		, ['''flax''']      )







       @classmethod
       def 						__lowerCamelCase   (				cls					:     Dict		, *A					:     Dict		, **A					:     Optional[int]      )       ->Optional[Any]:
          requires_backends(cls		, ['''flax''']      )


class        __SCREAMING_SNAKE_CASE      (			metaclass=lowerCAmelCase_ ):
       _UpperCAmelCase				:  Optional[Any]      =   ["flax"]







       def __init__(				self					:     Tuple		, *A					:     List[str]		, **A					:     List[Any]      )       ->List[str]:
          requires_backends(self		, ['''flax''']      )







       @classmethod
       def 						__lowerCamelCase   (				cls					:     Optional[int]		, *A					:     List[str]		, **A					:     Optional[int]      )       ->Any:
          requires_backends(cls		, ['''flax''']      )







       @classmethod
       def 						__lowerCamelCase   (				cls					:     Optional[Any]		, *A					:     str		, **A					:     Tuple      )       ->str:
          requires_backends(cls		, ['''flax''']      )


class        __SCREAMING_SNAKE_CASE      (			metaclass=lowerCAmelCase_ ):
       _UpperCAmelCase				:  Union[str, Any]      =   ["flax"]







       def __init__(				self					:     Dict		, *A					:     Any		, **A					:     Any      )       ->List[Any]:
          requires_backends(self		, ['''flax''']      )







       @classmethod
       def 						__lowerCamelCase   (				cls					:     Union[str, Any]		, *A					:     Any		, **A					:     str      )       ->Any:
          requires_backends(cls		, ['''flax''']      )







       @classmethod
       def 						__lowerCamelCase   (				cls					:     Union[str, Any]		, *A					:     Any		, **A					:     int      )       ->int:
          requires_backends(cls		, ['''flax''']      )


class        __SCREAMING_SNAKE_CASE      (			metaclass=lowerCAmelCase_ ):
       _UpperCAmelCase				:  Any      =   ["flax"]







       def __init__(				self					:     Optional[int]		, *A					:     Any		, **A					:     int      )       ->List[str]:
          requires_backends(self		, ['''flax''']      )







       @classmethod
       def 						__lowerCamelCase   (				cls					:     Union[str, Any]		, *A					:     int		, **A					:     Any      )       ->Tuple:
          requires_backends(cls		, ['''flax''']      )







       @classmethod
       def 						__lowerCamelCase   (				cls					:     Tuple		, *A					:     Tuple		, **A					:     Optional[Any]      )       ->str:
          requires_backends(cls		, ['''flax''']      )


class        __SCREAMING_SNAKE_CASE      (			metaclass=lowerCAmelCase_ ):
       _UpperCAmelCase				:  str      =   ["flax"]







       def __init__(				self					:     Union[str, Any]		, *A					:     Any		, **A					:     Any      )       ->List[Any]:
          requires_backends(self		, ['''flax''']      )







       @classmethod
       def 						__lowerCamelCase   (				cls					:     str		, *A					:     int		, **A					:     List[Any]      )       ->Optional[int]:
          requires_backends(cls		, ['''flax''']      )







       @classmethod
       def 						__lowerCamelCase   (				cls					:     Optional[int]		, *A					:     Optional[int]		, **A					:     Dict      )       ->Optional[Any]:
          requires_backends(cls		, ['''flax''']      )


class        __SCREAMING_SNAKE_CASE      (			metaclass=lowerCAmelCase_ ):
       _UpperCAmelCase				:  List[str]      =   ["flax"]







       def __init__(				self					:     int		, *A					:     List[Any]		, **A					:     List[str]      )       ->int:
          requires_backends(self		, ['''flax''']      )







       @classmethod
       def 						__lowerCamelCase   (				cls					:     Optional[Any]		, *A					:     Dict		, **A					:     Any      )       ->Optional[int]:
          requires_backends(cls		, ['''flax''']      )







       @classmethod
       def 						__lowerCamelCase   (				cls					:     Union[str, Any]		, *A					:     Dict		, **A					:     str      )       ->Optional[Any]:
          requires_backends(cls		, ['''flax''']      )










import os
from pathlib import Path



def 	_a						(   )    ->    Tuple:







   """simple docstring"""
   from torch.utils.cpp_extension import load

   lowerCamelCase__       :						List[Any]        =							Path(UpperCAmelCase					).resolve().parent.parent.parent / '''kernels''' / '''deformable_detr'''
   lowerCamelCase__       :						Any        =							[
       root / filename
       for filename in [
           '''vision.cpp''',
           os.path.join('''cpu'''      ,  '''ms_deform_attn_cpu.cpp'''					),
           os.path.join('''cuda'''      ,  '''ms_deform_attn_cuda.cu'''					),
       ]
   ]

   load(
       '''MultiScaleDeformableAttention'''      ,  UpperCAmelCase      ,  with_cuda=UpperCAmelCase      ,  extra_include_paths=[str(UpperCAmelCase					)]      ,  extra_cflags=['''-DWITH_CUDA=1''']      ,  extra_cuda_cflags=[
           '''-DCUDA_HAS_FP16=1''',
           '''-D__CUDA_NO_HALF_OPERATORS__''',
           '''-D__CUDA_NO_HALF_CONVERSIONS__''',
           '''-D__CUDA_NO_HALF2_OPERATORS__''',
       ]      ,  )

   import MultiScaleDeformableAttention as MSDA

   return MSDA



