################################################################################ # Copyright(c)2020-2025 Shanghai Biren Technology Co., Ltd. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ################################################################################ import os import torch # noqa F401 import torch_br # noqa F401 from torch_br.contrib import transfer_to_supa # noqa F401 from torch_br.supa import _debug as supa_debug # patches from . import utils # noqa: F401 # bypass memset supa_debug.set_disable_zero_ws(True) supa_debug.set_disable_zero_output_uma(True) supa_debug.set_disable_zero_output_numa(True) supa_debug.set_disable_reorder_zero(True) os.environ["BRTB_ENABLE_NUMA_SPLIT"] = "1" os.environ["BRTB_ENABLE_NUMA_ALIGN_4K"] = "1" def register(): """Register the SUPA platform.""" return "vllm_br.platform.SUPAPlatform" def register_model(): from . import attention # noqa: F401 from . import config # noqa: F401 from . import distributed # noqa: F401 from . import v1 # noqa: F401 from .model_executor import register_model register_model()