Skip to content

ONNXRuntime-Node v1.21: "Specified device is not supported" Error on Ubuntu 22.04.4 LTS During session.run Execution #24264

@Meekwest

Description

@Meekwest

Problem description:

I encountered an issue with the onnxruntime-node package (version 1.21) installed via npm on Ubuntu 22.04.4 LTS and Node.js 22.13.0. The error occurs during the execution of an ONNX model using the session.run method. Specifically, the error message is:
terminate called after throwing an instance of 'Ort::Exception' what(): Specified device is not supported

This issue does not occur on Windows 10 , where everything works as expected. Downgrading to version 1.20.1 resolves the problem on Ubuntu.

Steps to reproduce

  1. npm install onnxruntime-node
  2. Initialize the Sessions:
const { InferenceSession } = require('onnxruntime-node');

const firstSession = await InferenceSession.create(firstModelPath, {
    executionProviders: ['cpu'],
});

const secondSession = await InferenceSession.create(secondModelPath, {
    executionProviders: ['cpu'],
});

const thirdSession = await InferenceSession.create(thirdModelPath, {
    executionProviders: ['cpu'],
});
  1. Run Predictions
const firstResult = await firstSession.run({
    input_ids: tensorInputIds,
    attention_mask: tensorAttentionMask,
    categorical_features: firstTensorCatFeatures,
});

At this point application crashes:
terminate called after throwing an instance of 'Ort::Exception'
what(): Specified device is not supported

Urgency

No response

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

1.21.0

Execution Provider

cpu

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform:webissues related to ONNX Runtime web; typically submitted using templatestaleissues that have not been addressed in a while; categorized by a bot

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions