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

feat: add support for multiple model files #907

Merged
merged 6 commits into from
Aug 30, 2024

Conversation

anhappdev
Copy link
Collaborator

@anhappdev anhappdev commented Aug 29, 2024

mlperf_backend_ptr_t mlperf_backend_create(
    const char *model_path, 
    mlperf_backend_configuration_t *configs,
    const char *native_lib_path
)
  • Here is an example how to have multiple models:
  delegate_choice: {
    delegate_name: "NNAPI"
    accelerator_name: "npu"
    accelerator_desc: "NPU"
    model_file: {
      model_path: "https://file1.tflite"
      model_checksum: "abc"
    }
    model_file: {
      model_path: "https://file2.tflite"
      model_checksum: "def"
    }
  }
  • If there is only one model file, the model_path will point to the model file like before.
  • If there are multiple model files, the model_path will point to a single directory where all files are located in there.

Copy link

github-actions bot commented Aug 29, 2024

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@anhappdev anhappdev force-pushed the anh/donwload-multiple-models branch from 5f3d146 to d390b20 Compare August 29, 2024 14:19
Copy link

@anhappdev anhappdev marked this pull request as ready for review August 29, 2024 15:51
@anhappdev anhappdev requested a review from a team as a code owner August 29, 2024 15:51
@anhappdev
Copy link
Collaborator Author

@freedomtan @mohitmundhragithub @AhmedTElthakeb Please take a look at the first comment to know how to define multiple models in the backend settings.

@anhappdev anhappdev merged commit 2e6931e into master Aug 30, 2024
22 checks passed
@anhappdev anhappdev deleted the anh/donwload-multiple-models branch August 30, 2024 11:07
@github-actions github-actions bot locked and limited conversation to collaborators Aug 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pass multiple model paths to backend
2 participants