1

I'm new to python and the onnxruntime. I have successfully managed to do inferencing. I'm currently trying to direct an inference instance to a specific gpu on my system via IObinding. I'm receiving the following error when attempting to create an OrtValue: AttributeError: module 'onnxruntime' has no attribute 'OrtValue'. I've not found a solution as of yet. Hoping someone can shed some light on the matter. Here is some information.

Environment

OS: Windows 10

Python version: 3.7.8

OnnxRuntime-gpu: 1.5.2 install via pip

Cuda version: 10.2

CudNN vesion: 8.03.33

Code in Error:

X_ortvalue = ort.OrtValue.ortvalue_from_numpy(ort_inputs, 'cuda', 0)
Emma
  • 27,428
  • 11
  • 44
  • 69
ADD1
  • 11
  • 3

1 Answers1

0

It looks like OrtValue is a very recent addition (https://github.com/microsoft/onnxruntime/commit/6f54113a1bcea4e643de844ee33e4914145915ef) and is not in any release yet.

You can build onnxruntime from source or wait until the feature officially released.

Sergii Dymchenko
  • 6,890
  • 1
  • 21
  • 46