Skip to content

Conversation

@TedThemistokleous
Copy link
Contributor

@TedThemistokleous TedThemistokleous commented Oct 24, 2025

Refactors the toVector function which causes narrowing of the datatype for vector inputs such as in the slice operator

Description

Removes the casting done for toVector as that causes rollovers due to some Onnx Operators using int64_t inputs rather than int32_t. This case causes us to actually incorrectly represent axis, start and end values in the slice operator

Motivation and Context

Fixes a bug since this causes some of our Onnx operators to not operate in the full correct data range for input vectors

…4_t inputs

* Bug Fix: large integers incorrectly converted to -1 in IsUnsupportedOpMode() function
- prevent casting of int64 to int32 in IsUnsupportedOpMode() function for "Slice" operator

* remove testing code

* refactor to use toVector() function
@TedThemistokleous
Copy link
Contributor Author

Used to fix models in benchmarking in ROCm - ROCm#188

@snnn @cloudhan @tianleiwu @ytaous

@TedThemistokleous
Copy link
Contributor Author

cc @devang-ml @tianleiwu @cloudhan can we get this looked at/reviewed? This is a bit of an insidious bug since it will clamp addresses on the slice operator due to the casting done in the toVector call. This won't break but will cause roll overs which will produce undefined behavior in our slice operator on the MIGraphX side.

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