Skip to content
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

[Performance] Call a error when running on windows 7.detail:System.TypeInitializationException at Microsoft.ML.OnnxRuntime.SessionOptions..ctor() #21116

Closed
Zhx-Chenailuoding opened this issue Jun 20, 2024 · 3 comments
Labels
platform:windows issues related to the Windows platform quantization issues related to quantization

Comments

@Zhx-Chenailuoding
Copy link

Describe the issue

I run an application on my own computer is ok,because my operation is window11,but i run it on an operation is windows7,it call an error :"System.TypeInitializationException at Microsoft.ML.OnnxRuntime.SessionOptions..ctor()". Why make it?Because windows 7 's kernelBase.dll lose something?what should i do?

To reproduce

var session = new InferenceSession(modelPath);

        Bitmap bitmap = ResizeAndCenterImageByBitmap(bitmapss, 640, 640);
        var inputTensor = FastToOnnxTensor_13hw(bitmap);
        // 进行预测
        var container = new List<NamedOnnxValue>();
        container.Add(NamedOnnxValue.CreateFromTensor("images", inputTensor));
        IDisposableReadOnlyCollection<DisposableNamedOnnxValue> unresolve = session.Run(container);
        // 解析预测结果
        var resultsArray = unresolve.ToArray();
        Tensor<float> tensors = resultsArray[0].AsTensor<float>();var session = new InferenceSession(modelPath);

        Bitmap bitmap = ResizeAndCenterImageByBitmap(bitmapss, 640, 640);
        var inputTensor = FastToOnnxTensor_13hw(bitmap);
                    var container = new List<NamedOnnxValue>();
        container.Add(NamedOnnxValue.CreateFromTensor("images", inputTensor));
        IDisposableReadOnlyCollection<DisposableNamedOnnxValue> unresolve = session.Run(container);
        var resultsArray = unresolve.ToArray();
        Tensor<float> tensors = resultsArray[0].AsTensor<float>();

Urgency

No response

Platform

Windows

OS Version

7

ONNX Runtime Installation

Built from Source

ONNX Runtime Version or Commit ID

1.15.0

ONNX Runtime API

C#

Architecture

X86

Execution Provider

Default CPU

Execution Provider Library Version

No response

Model File

No response

Is this a quantized model?

Yes

@github-actions github-actions bot added platform:windows issues related to the Windows platform quantization issues related to quantization labels Jun 20, 2024
@snnn
Copy link
Member

snnn commented Jun 20, 2024

We no longer support Windows 7 and 8.

@snnn snnn closed this as not planned Won't fix, can't repro, duplicate, stale Jun 20, 2024
@Zhx-Chenailuoding
Copy link
Author

so,i should make win7 to win10?

@snnn
Copy link
Member

snnn commented Jun 21, 2024

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:windows issues related to the Windows platform quantization issues related to quantization
Projects
None yet
Development

No branches or pull requests

2 participants