





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



def 					__lowerCamelCase       (							)      ->				List[str]:
      from torch.utils.cpp_extension import load

      __SCREAMING_SNAKE_CASE       :List[str]		    =  Path(a_							).resolve().parent.parent.parent / '''kernels''' / '''deformable_detr'''
      __SCREAMING_SNAKE_CASE       :List[str]		    =  [
          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'''			,       a_			,       with_cuda=a_			,       extra_include_paths=[str(a_							)]			,       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 torch import nn






class  _SCREAMING_SNAKE_CASE(       nn.Module  ):




       def __init__(						self		,SCREAMING_SNAKE_CASE__		,SCREAMING_SNAKE_CASE__							)      ->				List[str]:





             """simple docstring"""






             super().__init__()
             __SCREAMING_SNAKE_CASE       :Tuple		    =  class_size
             __SCREAMING_SNAKE_CASE       :str		    =  embed_size
             # self.mlp1 = nn.Linear(embed_size, embed_size)
             # self.mlp2 = (nn.Linear(embed_size, class_size))
             __SCREAMING_SNAKE_CASE       :Optional[Any]		    =  nn.Linear(SCREAMING_SNAKE_CASE__		,SCREAMING_SNAKE_CASE__							)




       def    _UpperCamelCase					(						self		,SCREAMING_SNAKE_CASE__							)      ->				Optional[int]:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE       :Optional[Any]		    =  self.mlp(SCREAMING_SNAKE_CASE__							)
             return logits