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

split_external_data - helper to break ONNX model external data into mutliple files w/ max size #354

Merged
merged 2 commits into from
Aug 29, 2023

Conversation

bfineran
Copy link
Member

@bfineran bfineran commented Aug 3, 2023

utility function that breaks ONNX model with a single external data file into multiple external data files with a given max size

internal see doc here: https://github.com/neuralmagic/internal-docs/pull/21

max file size defaults to 16GB

test_plan:

given a plain resnet50 file saved with external data (using sparseml.utils.onnx.save_onnx) saved to model.onnx model.data.onnx)

running split_external_data("model.onnx", 30000000) yielded

model.data.1  model.data.2  model.data.3  model.data.4  model.onnx

model was able to compile and running through deepsparse evaluation gave the expected accuracy

@bfineran bfineran self-assigned this Aug 3, 2023
rahul-tuli
rahul-tuli previously approved these changes Aug 4, 2023
dbogunowicz
dbogunowicz previously approved these changes Aug 7, 2023
Base automatically changed from break-out-onnx-utils to main August 29, 2023 18:22
@bfineran bfineran dismissed stale reviews from dbogunowicz and rahul-tuli August 29, 2023 18:22

The base branch was changed.

@bfineran
Copy link
Member Author

approved pre rebase

@bfineran bfineran merged commit 8035607 into main Aug 29, 2023
4 checks passed
@bfineran bfineran deleted the split-external-data branch August 29, 2023 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants