Skip to content

Conversation

@TedThemistokleous
Copy link
Collaborator

Description

Enable max dynamic batch size so we can enable dynamic shapes using migarphx's api

Motivation and Context

This commit addresses the issue where input_shapes could be empty when first
loading a model, which would cause model caching to be skipped incorrectly.

Key changes:
- Fixed incorrect iteration using session_input_names.size() as index into
  input_tensor vector. Now directly iterates over input_tensor.
- Changed loop to include all dimensions (starting from j=0 instead of j=1),
  as skipping dimension 0 could result in empty shapes for low-rank tensors.
- Added validation to check for null shapes and zero dimension sizes before
  processing.
- Added check for has_dim_value() to handle symbolic/dynamic dimensions
  properly, only including dimensions with concrete positive values.

This ensures model caching works correctly when valid input shapes are available.
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.

2 participants