Skip to content

Commit d7c5dd4

Browse files
authored
Arm backend: Upgrade model converter to 0.10.0 (pytorch#21809)
Model converter is upgraded to 0.10.0 Change-Id: I6995649832677b65f6d16288d5cda005ae02a945 cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani --------- Signed-off-by: Elena Zhelezina <elena.zhelezina@arm.com>
1 parent ac40ad4 commit d7c5dd4

10 files changed

Lines changed: 356 additions & 147 deletions

‎.github/workflows/pull.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ jobs:
841841
contents: read
842842
with:
843843
runner: linux.2xlarge.memory
844-
docker-image: ci-image:executorch-ubuntu-22.04-arm-sdk
844+
docker-image: ci-image:executorch-ubuntu-24.04-arm-sdk
845845
submodules: 'recursive'
846846
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
847847
timeout: 120

‎backends/arm/requirements-arm-vgf-runtime.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55

66
# Runtime build dependencies for the Arm VGF backend.
77

8-
ai_ml_sdk_vgf_library == 0.9.0
8+
ai_ml_sdk_vgf_library == 0.10.0

‎backends/arm/requirements-arm-vgf.txt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55

66
# These dependencies need to match pyproject.toml
77

8-
ai_ml_emulation_layer_for_vulkan == 0.9.0
9-
ai_ml_sdk_model_converter == 0.9.0
8+
ai_ml_emulation_layer_for_vulkan == 0.10.0
9+
ai_ml_sdk_model_converter == 0.10.0

‎backends/arm/runtime/VGFBackend.cpp‎

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -100,21 +100,6 @@ VkResult vkml_allocate_basics(
100100
VkCommandPool* command_pool,
101101
uint32_t* queue_family_index);
102102

103-
void vkml_free_basics(
104-
VkInstance* instance,
105-
VkDevice* device,
106-
VkCommandPool* command_pool) {
107-
if (*device != VK_NULL_HANDLE && *command_pool != VK_NULL_HANDLE) {
108-
vkDestroyCommandPool(*device, *command_pool, nullptr);
109-
}
110-
// Note: These primitives are used by the emulation layer for vulkan
111-
// object allocation, the vulkan objects are freed in in library
112-
// shutdown, so we can't yet destroy these here without causing
113-
// a crash there.
114-
// vkDestroyDevice(*device, nullptr);
115-
// vkDestroyInstance(*instance, nullptr);
116-
}
117-
118103
// Helper functions to dump VGF Delegate Boundary Inputs
119104
constexpr const char* kVgfDumpInputsDirEnv = "EXECUTORCH_VGF_DUMP_INPUTS_DIR";
120105
constexpr const char* kVgfDumpInputsAndExitEnv =
@@ -456,9 +441,8 @@ class VGFBackend final : public ::executorch::runtime::BackendInterface {
456441

457442
is_initialized_ = true;
458443
}
459-
~VGFBackend() {
460-
vkml_free_basics(&vk_instance, &vk_device, &vk_command_pool);
461-
}
444+
445+
~VGFBackend() = default;
462446

463447
bool is_available() const override {
464448
ET_LOG(Info, "Checking VGFBackend is available");
@@ -621,12 +605,10 @@ class VGFBackend final : public ::executorch::runtime::BackendInterface {
621605
++input_arg_idx) {
622606
const int io_idx = repr->model_input_io_index[input_arg_idx];
623607
if (io_idx < 0) {
624-
#ifdef ET_EVENT_TRACER_ENABLED
625-
event_tracer_end_profiling_delegate(event_tracer, copy_inputs_event);
626-
event_tracer_end_profiling_delegate(event_tracer, vgf_execute_event);
627-
#endif
628-
ET_LOG(Error, "Missing IO mapping for input %zu", input_arg_idx);
629-
return Error::InvalidArgument;
608+
ET_LOG(Info, "Skipping eliminated VGF input %zu", input_arg_idx);
609+
// See test_addmm_vgf_no_quant[beta_only]
610+
// two inputs are eliminated from the graph by the converter
611+
continue;
630612
}
631613
if (!args[input_arg_idx]->isTensor()) {
632614
#ifdef ET_EVENT_TRACER_ENABLED

0 commit comments

Comments
 (0)