diff --git a/backends/vulkan/runtime/VulkanBackend.cpp b/backends/vulkan/runtime/VulkanBackend.cpp index 526a5df6f59..21fd137b65b 100644 --- a/backends/vulkan/runtime/VulkanBackend.cpp +++ b/backends/vulkan/runtime/VulkanBackend.cpp @@ -338,12 +338,10 @@ class GraphBuilder { std::string op_name = op_call->name()->str(); ET_CHECK_MSG(VK_HAS_OP(op_name), "Missing operator: %s", op_name.c_str()); - const std::vector arg_fb_ids( - op_call->args()->cbegin(), op_call->args()->cend()); - std::vector args; - for (const int arg_fb_id : arg_fb_ids) { - args.push_back(get_fb_id_valueref(arg_fb_id)); + args.reserve(op_call->args()->size()); + for (const auto arg_fb_id : *op_call->args()) { + args.push_back(get_fb_id_valueref(static_cast(arg_fb_id))); } auto vkFn = VK_GET_OP_FN(op_name);