Skip to content

Maxvit model fails to run on Vulkan #14056

@GregoryComer

Description

@GregoryComer

🐛 Describe the bug

The maxvit_t model from torchvision fails at runtime on the Vulkan backend with "Exception raised from toTensorRef at /pytorch/executorch/../executorch/backends/vulkan/runtime/graph/containers/Value.h:266: (isTensorRef()) is false! Expected value to have type TensorRef, got TENSOR instead.".

Export repro:

import torch
import torchvision
from executorch.exir import to_edge_transform_and_lower

from executorch.backends.vulkan.partitioner.vulkan_partitioner import VulkanPartitioner

inputs = (torch.randn(1, 3, 224, 224),)
model = torchvision.models.maxvit_t().eval()

ep = torch.export.export(model, inputs)

model = to_edge_transform_and_lower(
    torch.export.export(model, inputs),
    partitioner=[VulkanPartitioner()],
).to_executorch()

It fails to run on MoltenVK for a different reason, so I don't have a nice local repro on M1 for the toTensorRef error. Logs from CI with Swiftshader can be found at https://github.com/pytorch/executorch/actions/runs/17505373586/job/49727768697.

Versions

Commit fbda3a9, M1 Mac, using MoltenVK

cc @SS-JIA @manuelcandales @cbilgin

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend testerThis bug was found by the backend test suite.module: vulkanIssues related to the Vulkan delegate and code under backends/vulkan/

    Type

    No type

    Projects

    Status

    To triage

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions