microsoft / microsoft/onnxruntime

onnxruntime-tvm

Open
#18,955 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation ep:CUDA ep:ROCm ep:tvm
Dominant language
C++
Stars
21.9k
Forks
4.2k
Avg merge
4d 11h
Merged PRs (30d)
184

Description

Describe the documentation issue

When I used Onnxruntime tvm for inference based on backend GPU and ROCM using a precompiled model, the following error occurred

Check failed: (itr != physical_devices.end()) is false: Unable to find a physical device (from among the 1 given) to match the virtual device with device type 2

The code follows the example of resnet50, with only the modification of tartget='cuda '

compiled_vm_exec = compile_virtual_machine(onnx_model, target_str="cuda")
      so_folder = serialize_virtual_machine(compiled_vm_exec)
      provider_options = [dict(
          executor="vm",
          so_folder=so_folder,
      )]'

# so = onnxruntime.SessionOptions()

# so.graph_optimization_level = onnxruntime.GraphOptimizationLevel.ORT_DISABLE_ALL

inference_session1 = onnxruntime.InferenceSession(
    onnx_model.SerializeToString(), 
    # sess_options=so,
    providers=["TvmExecutionProvider"],
    provider_options=provider_options,
    )

Looking forward to your help!!!!

Page / URL

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the resnet50 example using compile_virtual_machine, serialize_virtual_machine, and InferenceSession with TvmExecutionProvider and the shown CUDA target. Compare the precompiled model, ROCM/GPU environment, and provider options to determine whether the device-matching failure is an example, documentation, or runtime bug; no source file or test is named.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.