diff --git a/model_examples/BEVDet/BEVDet.patch b/model_examples/BEVDet/BEVDet.patch index 04689777621a3b0d526d785523c1188b6f2a01d8..624a19963ec84711a14aa09660056223cec90d4d 100644 --- a/model_examples/BEVDet/BEVDet.patch +++ b/model_examples/BEVDet/BEVDet.patch @@ -703,8 +703,8 @@ index 72a1579..45afc79 100644 import torch.distributed as dist from mmcv import Config, DictAction from mmcv.runner import get_dist_info, init_dist -+from mx_driving.patcher.patcher import PatcherBuilder, Patch -+from mx_driving.patcher.tensor import batch_matmul ++from mx_driving.patcher import PatcherBuilder, Patch ++from mx_driving.patcher import batch_matmul from mmdet import __version__ as mmdet_version from mmdet3d import __version__ as mmdet3d_version diff --git a/model_examples/FCOS/mmdet.patch b/model_examples/FCOS/mmdet.patch index a97c95cf4a7c3e6066d8430e7081f3520cc95687..4a5f4f6f442b0de1f48b2481afd1cbf2306a5f27 100644 --- a/model_examples/FCOS/mmdet.patch +++ b/model_examples/FCOS/mmdet.patch @@ -119,8 +119,8 @@ index 7e5b71f..d689231 100644 +from torch_npu.contrib import transfer_to_npu +torch_npu.npu.set_compile_mode(jit_compile=False) +torch.npu.config.allow_internal_format = False -+from mx_driving.patcher.patcher import PatcherBuilder, Patch -+from mx_driving.patcher.mmdet import resnet_add_relu, resnet_maxpool ++from mx_driving.patcher import PatcherBuilder, Patch ++from mx_driving.patcher import resnet_add_relu, resnet_maxpool + from mmengine.config import Config, DictAction from mmengine.registry import RUNNERS @@ -130,6 +130,6 @@ index 7e5b71f..d689231 100644 if __name__ == '__main__': - main() -+ pb = PatcherBuilder().add_module_patch("mmdet.models.backbones.resnet", Patch(resnet_add_relu), Patch(resnet_maxpool)) ++ pb = PatcherBuilder().add_module_patch("mmdet", Patch(resnet_add_relu), Patch(resnet_maxpool)) + with pb.build(): + main() diff --git a/model_examples/Mask2Former/mmsegmentation.patch b/model_examples/Mask2Former/mmsegmentation.patch index 42e92ab9e4aa168c8caa4ae3c206defae77ffb70..7d94a9179e574ed6ee32c9c30c7d038578e7a2d4 100644 --- a/model_examples/Mask2Former/mmsegmentation.patch +++ b/model_examples/Mask2Former/mmsegmentation.patch @@ -216,10 +216,10 @@ index 10fdaa18..4be91a88 100644 - main() + torch_npu.npu.set_compile_mode(jit_compile=False) + torch.npu.config.allow_internal_format = False -+ from mx_driving.patcher.patcher import PatcherBuilder, Patch -+ from mx_driving.patcher.mmcv import msda ++ from mx_driving.patcher import PatcherBuilder, Patch ++ from mx_driving.patcher import msda + -+ pb = PatcherBuilder().add_module_patch("torch", Patch(msda)) ++ pb = PatcherBuilder().add_module_patch("mmcv", Patch(msda)) + with pb.build(): + main() diff --git a/mmseg/__init__.py b/mmseg/__init__.py