


"""simple docstring"""
import os
from pathlib import Path

def 				_snake_case      (   ):




   """simple docstring"""







   from torch.utils.cpp_extension import load

   _lowerCamelCase	:					Optional[Any]   =		Path(__snake_case   ).resolve().parent.parent.parent / """kernels""" / """deformable_detr"""
   _lowerCamelCase	:					int   =		[
       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"""						, __snake_case						, with_cuda=__snake_case						, extra_include_paths=[str(__snake_case   )]						, 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







'''simple docstring'''


from ..utils import DummyObject, requires_backends







class      SCREAMING_SNAKE_CASE    (						metaclass=snake_case_				):
      __magic_name__  :       Dict   							=					['''transformers''', '''torch''', '''note_seq''']






      def __init__( self   :  List[str]						,						*lowercase__   :  Dict						,						**lowercase__   :  int       ):


           '''simple docstring'''

           requires_backends(self						,						["""transformers""", """torch""", """note_seq"""]       )






      @classmethod
      def 							lowercase_						( cls   :  Dict						,						*lowercase__   :  List[str]						,						**lowercase__   :  str       ):


           '''simple docstring'''

           requires_backends(cls						,						["""transformers""", """torch""", """note_seq"""]       )






      @classmethod
      def 							lowercase_						( cls   :  str						,						*lowercase__   :  Optional[int]						,						**lowercase__   :  Any       ):


           '''simple docstring'''

           requires_backends(cls						,						["""transformers""", """torch""", """note_seq"""]       )
