From e1530a09fa2b2b357b5404df08da1435dfe1ef57 Mon Sep 17 00:00:00 2001 From: Dave Bort Date: Wed, 4 Sep 2024 16:04:19 -0700 Subject: [PATCH] Migrate //executorch/... from PyTorchBackendInterface to BackendInterface (#5054) Summary: Pull Request resolved: https://github.com/pytorch/executorch/pull/5054 Update all of ET to use the new backend name. Reviewed By: mergennachin, larryliu0820 Differential Revision: D61927046 --- .../apple/coreml/runtime/include/coreml_backend/delegate.h | 2 +- backends/apple/mps/runtime/MPSBackend.mm | 2 +- backends/arm/README.md | 2 +- backends/arm/runtime/ArmBackendEthosU.cpp | 2 +- backends/mediatek/runtime/include/NeuronBackend.h | 2 +- backends/qualcomm/runtime/QnnExecuTorchBackend.h | 3 ++- backends/vulkan/runtime/VulkanBackend.cpp | 2 +- backends/xnnpack/runtime/XNNPACKBackend.cpp | 2 +- exir/backend/test/demos/rpc/ExecutorBackend.cpp | 2 +- 9 files changed, 10 insertions(+), 9 deletions(-) diff --git a/backends/apple/coreml/runtime/include/coreml_backend/delegate.h b/backends/apple/coreml/runtime/include/coreml_backend/delegate.h index a11d41bf7f4..1943e0f05b0 100644 --- a/backends/apple/coreml/runtime/include/coreml_backend/delegate.h +++ b/backends/apple/coreml/runtime/include/coreml_backend/delegate.h @@ -20,7 +20,7 @@ class BackendDelegate; namespace torch { namespace executor { -class CoreMLBackendDelegate final : public PyTorchBackendInterface { +class CoreMLBackendDelegate final : public ::executorch::runtime::BackendInterface { public: CoreMLBackendDelegate() noexcept; ~CoreMLBackendDelegate() = default; diff --git a/backends/apple/mps/runtime/MPSBackend.mm b/backends/apple/mps/runtime/MPSBackend.mm index b94bdc9319b..cb96edbeb2e 100644 --- a/backends/apple/mps/runtime/MPSBackend.mm +++ b/backends/apple/mps/runtime/MPSBackend.mm @@ -19,7 +19,7 @@ namespace torch { namespace executor { -class MPSBackend final : public PyTorchBackendInterface { +class MPSBackend final : public ::executorch::runtime::BackendInterface { public: ~MPSBackend() = default; diff --git a/backends/arm/README.md b/backends/arm/README.md index 7167aa853b6..375259c62ab 100644 --- a/backends/arm/README.md +++ b/backends/arm/README.md @@ -33,7 +33,7 @@ Quantization: - `arm_quantizer_utils.py` - Utilities for quantization Runtime: -- `runtime/ArmBackendEthosU.cpp` - The Arm backend implementation of the ExecuTorch runtime backend (PyTorchBackendInterface) for Ethos-U +- `runtime/ArmBackendEthosU.cpp` - The Arm backend implementation of the ExecuTorch runtime backend (BackendInterface) for Ethos-U Other: - `third-party/` - Dependencies on other code - in particular the TOSA serialization_lib for compiling to TOSA and the ethos-u-core-driver for the bare-metal backend supporting Ethos-U diff --git a/backends/arm/runtime/ArmBackendEthosU.cpp b/backends/arm/runtime/ArmBackendEthosU.cpp index 9f9ea8ec9fa..26ffb0b9700 100644 --- a/backends/arm/runtime/ArmBackendEthosU.cpp +++ b/backends/arm/runtime/ArmBackendEthosU.cpp @@ -46,7 +46,7 @@ class ArmBackendExecuteCallbacks { } }; -class ArmBackend final : public PyTorchBackendInterface { +class ArmBackend final : public ::executorch::runtime::BackendInterface { public: ArmBackend() {} diff --git a/backends/mediatek/runtime/include/NeuronBackend.h b/backends/mediatek/runtime/include/NeuronBackend.h index 2cfcb311b93..7a22956de63 100644 --- a/backends/mediatek/runtime/include/NeuronBackend.h +++ b/backends/mediatek/runtime/include/NeuronBackend.h @@ -26,7 +26,7 @@ namespace torch { namespace executor { -class NeuronBackend final : public PyTorchBackendInterface { +class NeuronBackend final : public ::executorch::runtime::BackendInterface { public: Result init( BackendInitContext& context, diff --git a/backends/qualcomm/runtime/QnnExecuTorchBackend.h b/backends/qualcomm/runtime/QnnExecuTorchBackend.h index ed4d35068dc..fbcc7058894 100644 --- a/backends/qualcomm/runtime/QnnExecuTorchBackend.h +++ b/backends/qualcomm/runtime/QnnExecuTorchBackend.h @@ -14,7 +14,8 @@ namespace torch { namespace executor { -class QnnExecuTorchBackend final : public PyTorchBackendInterface { +class QnnExecuTorchBackend final + : public ::executorch::runtime::BackendInterface { public: ~QnnExecuTorchBackend(){}; diff --git a/backends/vulkan/runtime/VulkanBackend.cpp b/backends/vulkan/runtime/VulkanBackend.cpp index fd06841beca..7ed9469f77f 100644 --- a/backends/vulkan/runtime/VulkanBackend.cpp +++ b/backends/vulkan/runtime/VulkanBackend.cpp @@ -412,7 +412,7 @@ void maybe_resize_output( // VulkanBackend class // -class VulkanBackend final : public PyTorchBackendInterface { +class VulkanBackend final : public ::executorch::runtime::BackendInterface { public: ~VulkanBackend() override = default; diff --git a/backends/xnnpack/runtime/XNNPACKBackend.cpp b/backends/xnnpack/runtime/XNNPACKBackend.cpp index 264dc838720..c817c010e29 100644 --- a/backends/xnnpack/runtime/XNNPACKBackend.cpp +++ b/backends/xnnpack/runtime/XNNPACKBackend.cpp @@ -20,7 +20,7 @@ namespace torch { namespace executor { -class XnnpackBackend final : public PyTorchBackendInterface { +class XnnpackBackend final : public ::executorch::runtime::BackendInterface { public: ~XnnpackBackend() = default; diff --git a/exir/backend/test/demos/rpc/ExecutorBackend.cpp b/exir/backend/test/demos/rpc/ExecutorBackend.cpp index 0bc85a685e9..aeef621a271 100644 --- a/exir/backend/test/demos/rpc/ExecutorBackend.cpp +++ b/exir/backend/test/demos/rpc/ExecutorBackend.cpp @@ -35,7 +35,7 @@ namespace executor { * front-end before having the actual backend ready. */ -class ExecutorBackend final : public PyTorchBackendInterface { +class ExecutorBackend final : public ::executorch::runtime::BackendInterface { public: ~ExecutorBackend() = default;