






from ...configuration_utils import PretrainedConfig
from ...utils import logging


__magic_name__:					str							=     logging.get_logger(__name__)

__magic_name__:					Tuple							=     {
    "uw-madison/mra-base-512-4": "https://huggingface.co/uw-madison/mra-base-512-4/resolve/main/config.json",
}





class 	snake_case__ (							__SCREAMING_SNAKE_CASE				):
	lowercase__						:					int											=   "mra"
	def __init__(    self      ,       lowerCAmelCase__=5_02_65      ,       lowerCAmelCase__=7_68      ,       lowerCAmelCase__=12      ,       lowerCAmelCase__=12      ,       lowerCAmelCase__=30_72      ,       lowerCAmelCase__="gelu"      ,       lowerCAmelCase__=0.1      ,       lowerCAmelCase__=0.1      ,       lowerCAmelCase__=5_12      ,       lowerCAmelCase__=1      ,       lowerCAmelCase__=0.0_2      ,       lowerCAmelCase__=1e-5      ,       lowerCAmelCase__="absolute"      ,       lowerCAmelCase__=4      ,       lowerCAmelCase__="full"      ,       lowerCAmelCase__=0      ,       lowerCAmelCase__=0      ,       lowerCAmelCase__=1      ,       lowerCAmelCase__=0      ,       lowerCAmelCase__=2      ,       **lowerCAmelCase__      ,       )							->				Any:
							super().__init__(pad_token_id=_snake_case      ,       bos_token_id=_snake_case      ,       eos_token_id=_snake_case      ,       **_snake_case			)

							__magic_name__      :       int       						= vocab_size
							__magic_name__      :       Tuple       						= max_position_embeddings
							__magic_name__      :       Union[str, Any]       						= hidden_size
							__magic_name__      :       Dict       						= num_hidden_layers
							__magic_name__      :       int       						= num_attention_heads
							__magic_name__      :       Any       						= intermediate_size
							__magic_name__      :       Any       						= hidden_act
							__magic_name__      :       List[Any]       						= hidden_dropout_prob
							__magic_name__      :       Union[str, Any]       						= attention_probs_dropout_prob
							__magic_name__      :       Optional[int]       						= initializer_range
							__magic_name__      :       Dict       						= type_vocab_size
							__magic_name__      :       Optional[int]       						= layer_norm_eps
							__magic_name__      :       Tuple       						= position_embedding_type
							__magic_name__      :       Optional[Any]       						= block_per_row
							__magic_name__      :       Any       						= approx_mode
							__magic_name__      :       Dict       						= initial_prior_first_n_blocks
							__magic_name__      :       str       						= initial_prior_diagonal_n_blocks








import os
from pathlib import Path

def    UpperCamelCase						(	):






						"""simple docstring"""







						from torch.utils.cpp_extension import load

						__magic_name__      :       Dict       						= Path(_A			).resolve().parent.parent.parent / """kernels""" / """deformable_detr"""
						__magic_name__      :       Optional[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""",   _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
