Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Meekwest opened this issue Apr 1, 2025 · 3 comments
Labels
platform:web issues related to ONNX Runtime web; typically submitted using template

Comments

@Meekwest
Copy link

Meekwest commented Apr 1, 2025

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

@Meekwest Meekwest added the platform:web issues related to ONNX Runtime web; typically submitted using template label Apr 1, 2025
@fs-eire
Copy link
Contributor

fs-eire commented Apr 2, 2025

I maybe need more information to understand the problem. Could you enable the verbose log and run it again:

const { InferenceSession, env } = require('onnxruntime-node');
env.logLevel = 'verbose';

// ...

@Meekwest
Copy link
Author

Meekwest commented Apr 4, 2025

I maybe need more information to understand the problem. Could you enable the verbose log and run it again:

const { InferenceSession, env } = require('onnxruntime-node');
env.logLevel = 'verbose';

// ...

After enabling nothing changes:

Image

@fs-eire
Copy link
Contributor

fs-eire commented Apr 11, 2025

I need at least one of the error message or a reproduce step to start investigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:web issues related to ONNX Runtime web; typically submitted using template
Projects
None yet
Development

No branches or pull requests

2 participants