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

Model saved by ORT as external data format will not be aligned for mapfile support #21524

Open
ivberg opened this issue Jul 26, 2024 · 1 comment
Labels
platform:windows issues related to the Windows platform stale issues that have not been addressed in a while; categorized by a bot

Comments

@ivberg
Copy link
Contributor

ivberg commented Jul 26, 2024

Describe the issue

ORT has the ability to save a model with external data format - https://github.com/onnx/onnx/blob/main/docs/ExternalData.md

However, this model will not be aligned and mapfile support will not work - #21195

To reproduce

session_options.SetGraphOptimizationLevel(ORT_DISABLE_ALL); // ORT_DISABLE_ALL, ORT_ENABLE_BASIC, ORT_ENABLE_EXTENDED, ORT_ENABLE_ALL:
// Ideally the model would be saved with basic or higher optimization level. However, there is a related bug on this OnnxRuntime 21325 -Model saved with offline basic optimizations will not load – ShapeInferenceError

    session_options.SetOptimizedModelFilePath(optimized_model_path);
    session_options.AddConfigEntry(kOrtSessionOptionsOptimizedModelExternalInitializersFileName, "model.quant.extdata.disable_opt.onnx.data");
    session_options.AddConfigEntry(kOrtSessionOptionsOptimizedModelExternalInitializersMinSizeInBytes, "10");

    session = Ort::Session(env, filemodelpath_base_unencrypted, session_options);

Urgency

Low urgency. There is the ability to add alignment in Python in PR -
onnx/onnx#6248

Platform

Windows

OS Version

11

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

1.18.1

ONNX Runtime API

C++

Architecture

ARM64

Execution Provider

Default CPU

Execution Provider Library Version

No response

@github-actions github-actions bot added the platform:windows issues related to the Windows platform label Jul 26, 2024
frank-dong-ms added a commit that referenced this issue Aug 23, 2024
…21604)

### Description
Address issue #21524 
Enable offset align for model saved as external data format

python data convertor fix here: onnx/onnx#6248

### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
Copy link
Contributor

This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details.

@github-actions github-actions bot added the stale issues that have not been addressed in a while; categorized by a bot label Aug 26, 2024
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 stale issues that have not been addressed in a while; categorized by a bot
Projects
None yet
Development

No branches or pull requests

1 participant