- 
                Notifications
    
You must be signed in to change notification settings  - Fork 710
 
Add input size validation to Module.execute #10701
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
Add input size validation to Module.execute #10701
Conversation
          
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/10701
 Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New Failure, 1 Unrelated FailureAs of commit bb83697 with merge base d069d65 ( NEW FAILURE - The following job has failed:
 
 BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures 
 
 This comment was automatically generated by Dr. CI and updates every 15 minutes.  | 
    
| 
           @pytorchbot label "topic: not user facing"  | 
    
| 
           @pytorchbot label "release notes: none"  | 
    
| 
           Hi @shoumikhin, the CI failures are unrelated to this PR; they're due to  | 
    
### Summary Adds input size validation to `Module.execute` to prevent possible silent memory corruption when too many EValue inputs are passed. Fixes pytorch#10510 ### Test plan - Added unit test `TestExecuteWithTooManyInputs` - Verified by successfully running all `module_test.cpp` tests, except `TestPTD` (did not have access to `ModuleLinear.ptd`) - To run locally: - Bypass `is_fbcode` guard in `targets.bzl` and redirect test file paths to use a locally exported `ModuleAdd.pte` file - Build and run tests via: ``` buck2 build //extension/module/test:test buck2 run //extension/module/test:test --------- Co-authored-by: Anthony Shoumikhin <[email protected]>
Summary
Adds input size validation to
Module.executeto prevent possible silent memory corruption when too many EValue inputs are passed.Fixes #10510
Test plan
Added unit test
TestExecuteWithTooManyInputsVerified by successfully running all
module_test.cpptests, exceptTestPTD(did not have access toModuleLinear.ptd)To run locally:
is_fbcodeguard intargets.bzland redirect test file paths to use a locally exportedModuleAdd.ptefile