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.
…ted shapes. let MIGraphX treat this as a static shape
* \note If a ::OrtArenaCfg has been applied, it will override this field
*/
int migraphx_arena_extend_strategy;
size_t migraphx_max_dynamic_batch; //Max Dynamic batch size. Default 0 = disabled, nonzero = enabled
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Microsoft has stopped accepting PRs that add to or remove from this structure (in general, all changes modifying any Provider API). They want us to use ProviderOptions instead. The reason is that with the new Auto EP interface, any change here will break backward compatibility.

@TedThemistokleous
Copy link
Collaborator Author

Superceeded by #207

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.

3 participants