Migrate check_op_args.h validations to meta kernels and remove it (#19207)#19207
Migrate check_op_args.h validations to meta kernels and remove it (#19207)#19207mcremon-meta wants to merge 1 commit intomainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19207
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 1 New Failure, 2 Unrelated FailuresAs of commit f639c2d with merge base d767516 ( NEW FAILURE - The following job has failed:
BROKEN TRUNK - The following jobs 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. |
|
@mcremon-meta has exported this pull request. If you are a Meta employee, you can view the originating Diff in D102624163. |
This PR needs a
|
533254a to
3dccdc2
Compare
…9207) Summary: Move operator argument validation from runtime C++ checks (check_op_args.h) to AOT meta kernels (ops_registrations.py), enabling compile-time error detection and reducing on-device binary size. - Delete check_op_args.h (~3,244 lines) and check_macros.h (~175 lines) - Add torch._check() validation to ~50 meta kernels in ops_registrations.py covering dtype, dimension, shape, and scalar parameter constraints - Inline the 4 data-dependent runtime checks (division-by-zero, attention_mask bounds) directly into kernel implementations across generic, HiFi, and G3 backends - Remove codegen wrapper generation from codegen.py (generate_wrapper_code, insert_runtime_context, etc.) since checks no longer need wrapper functions - Update ops.bzl to remove wrapper.cpp references and wrapper library creation - Update targets.bzl to remove deleted header references Reviewed By: abeakkas Differential Revision: D102624163
…9207) Summary: Move operator argument validation from runtime C++ checks (check_op_args.h) to AOT meta kernels (ops_registrations.py), enabling compile-time error detection and reducing on-device binary size. - Delete check_op_args.h (~3,244 lines) and check_macros.h (~175 lines) - Add torch._check() validation to ~50 meta kernels in ops_registrations.py covering dtype, dimension, shape, and scalar parameter constraints - Inline the 4 data-dependent runtime checks (division-by-zero, attention_mask bounds) directly into kernel implementations across generic, HiFi, and G3 backends - Remove codegen wrapper generation from codegen.py (generate_wrapper_code, insert_runtime_context, etc.) since checks no longer need wrapper functions - Update ops.bzl to remove wrapper.cpp references and wrapper library creation - Update targets.bzl to remove deleted header references Reviewed By: abeakkas Differential Revision: D102624163
3dccdc2 to
f639c2d
Compare
Summary:
Move operator argument validation from runtime C++ checks (check_op_args.h) to
AOT meta kernels (ops_registrations.py), enabling compile-time error detection
and reducing on-device binary size.
covering dtype, dimension, shape, and scalar parameter constraints
bounds) directly into kernel implementations across generic, HiFi, and G3
backends
insert_runtime_context, etc.) since checks no longer need wrapper functions
Reviewed By: abeakkas
Differential Revision: D102624163