Fix Type-confusion: raw-pointer bind_input causing OOB write#28839
Open
selenayang888 wants to merge 6 commits into
Open
Fix Type-confusion: raw-pointer bind_input causing OOB write#28839selenayang888 wants to merge 6 commits into
selenayang888 wants to merge 6 commits into
Conversation
…dentity Co-authored-by: Copilot <copilot@github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fix a pytest collection error in the Windows GPU CUDA CI pipeline caused by
test_convert_tf_models_to_pytorch.pyfailing to locateconvert_tf_models_to_pytorch.pyat module load time.Two changes were made:
onnxruntime/test/python/transformers/test_convert_tf_models_to_pytorch.py: Updated the path resolution logic to first check ifconvert_tf_models_to_pytorch.pyis in the same directory as the test file (the case after CMake copies it into the build output), then fall back to the correct source-tree path usingparents[2](resolving to theonnxruntime/subdirectory, three levels up fromtest/python/transformers/).cmake/onnxruntime_python.cmake: Added acmake -E copycommand to deployconvert_tf_models_to_pytorch.pyfromonnxruntime/python/tools/transformers/into thetransformers/build output directory alongside the existing test files, so the first-choice path resolution works in CI.Motivation and Context
The CI job
Windows GPU CUDA CI Pipeline Test Jobwas failing during pytest collection with:The test used a hardcoded
parents[4]offset assuming the test file resided atonnxruntime/test/python/transformers/in the source tree (whereparents[4]= repo root). In CI, pytest test files are copied to the build output directory (e.g.$runner_temp/build/RelWithDebInfo/RelWithDebInfo/transformers/), whereparents[4]resolves to the runner's temp directory rather than the workspace root, so the source file was never found and collection aborted with exit code 2.