Skip to content

[WebGPU] Failed to find kernel for Cast(13) for WebGpuExecutionProvider #27291

@xenova

Description

@xenova

Describe the issue

Error: Exception during initialization: /Users/cloudtest/vss/_work/1/s/onnxruntime/core/optimizer/transformer_memcpy.cc:467 bool onnxruntime::TransformerMemcpyImpl::ProcessInitializers(const KernelRegistryManager &, const InitializedTensorSet &, const logging::Logger &) status.IsOK() was false. Failed to find kernel for Cast(13) (node:'/transformer/Cast_2_output_cast0' ep:'WebGpuExecutionProvider'). Op with name (/transformer/Cast_2_output_cast0) domain () and type (Cast) kernel is not supported in WebGpuExecutionProvider. Encountered following errors: ( Version mismatch. node_version: 13 kernel start version: 6 kernel_end_version: 8
 Version mismatch. node_version: 13 kernel start version: 9 kernel_end_version: 12
Kernel found kernel in the supported version range (node_version: 13). However the types are incompatible. This op has been implemented only for the following types (tensor(float16),tensor(float),tensor(int32),tensor(uint32),tensor(bool),), but the node in the model has the following type (tensor(int64))
 Version mismatch. node_version: 13 kernel start version: 19 kernel_end_version: 20
 Version mismatch. node_version: 13 kernel start version: 21 kernel_end_version: 22
 Version mismatch. node_version: 13 kernel start version: 23 kernel_end_version: 2147483647

To reproduce

  1. Get RFDetr model
wget https://huggingface.co/onnx-community/rfdetr_nano-ONNX/resolve/main/onnx/model_fp16.onnx -O model_fp16.onnx
  1. Load inference session
python -c "import onnxruntime as ort; ort.InferenceSession('model_fp16.onnx', providers=['WebGpuExecutionProvider'])"

Urgency

low-medium. Users can use fp32 in meantime

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

main

Execution Provider

'webgpu' (WebGPU)

Metadata

Metadata

Assignees

No one assigned

    Labels

    ep:WebGPUort-web webgpu providerplatform:webissues related to ONNX Runtime web; typically submitted using template

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions