Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backends/arm/requirements-arm-vgf-runtime.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

# Runtime build dependencies for the Arm VGF backend.

ai_ml_sdk_vgf_library == 0.9.0
ai_ml_sdk_vgf_library == 0.10.0
4 changes: 2 additions & 2 deletions backends/arm/requirements-arm-vgf.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@

# These dependencies need to match pyproject.toml

ai_ml_emulation_layer_for_vulkan == 0.9.0
ai_ml_sdk_model_converter == 0.9.0
ai_ml_emulation_layer_for_vulkan == 0.10.0
ai_ml_sdk_model_converter == 0.10.0
30 changes: 6 additions & 24 deletions backends/arm/runtime/VGFBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,21 +100,6 @@ VkResult vkml_allocate_basics(
VkCommandPool* command_pool,
uint32_t* queue_family_index);

void vkml_free_basics(
VkInstance* instance,
VkDevice* device,
VkCommandPool* command_pool) {
if (*device != VK_NULL_HANDLE && *command_pool != VK_NULL_HANDLE) {
vkDestroyCommandPool(*device, *command_pool, nullptr);
}
// Note: These primitives are used by the emulation layer for vulkan
// object allocation, the vulkan objects are freed in in library
// shutdown, so we can't yet destroy these here without causing
// a crash there.
// vkDestroyDevice(*device, nullptr);
// vkDestroyInstance(*instance, nullptr);
}

// Helper functions to dump VGF Delegate Boundary Inputs
constexpr const char* kVgfDumpInputsDirEnv = "EXECUTORCH_VGF_DUMP_INPUTS_DIR";
constexpr const char* kVgfDumpInputsAndExitEnv =
Expand Down Expand Up @@ -456,9 +441,8 @@ class VGFBackend final : public ::executorch::runtime::BackendInterface {

is_initialized_ = true;
}
~VGFBackend() {
vkml_free_basics(&vk_instance, &vk_device, &vk_command_pool);
}

~VGFBackend() = default;

bool is_available() const override {
ET_LOG(Info, "Checking VGFBackend is available");
Expand Down Expand Up @@ -621,12 +605,10 @@ class VGFBackend final : public ::executorch::runtime::BackendInterface {
++input_arg_idx) {
const int io_idx = repr->model_input_io_index[input_arg_idx];
if (io_idx < 0) {
#ifdef ET_EVENT_TRACER_ENABLED
event_tracer_end_profiling_delegate(event_tracer, copy_inputs_event);
event_tracer_end_profiling_delegate(event_tracer, vgf_execute_event);
#endif
ET_LOG(Error, "Missing IO mapping for input %zu", input_arg_idx);
return Error::InvalidArgument;
ET_LOG(Info, "Skipping eliminated VGF input %zu", input_arg_idx);
// See test_addmm_vgf_no_quant[beta_only]
// two inputs are eliminated from the graph by the converter
continue;
}
if (!args[input_arg_idx]->isTensor()) {
#ifdef ET_EVENT_TRACER_ENABLED
Expand Down
Loading
Loading