You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AST-based utility for checking ops registration and relative imports #729
We'd like an AST-based utility (for kernels-community) that statically checks kernel source for common correctness issues, in particular:
Ops registration — verify that ops are correctly registered (e.g. names match, definitions are consistent).
Relative imports — verify that Python files in torch-ext/ use correctly relativized imports.
Motivation / context
This came up while discussing how to make kernel conversion more deterministic. A lot of the conversion steps could be automated, e.g.:
Fetch a kernel from a URL at a given tag (vx.y.z, or latest stable).
Copy files from foo/bar/baz to torch-ext/bar/baz.
Relativize paths in Python files in torch-ext/bar.
Fix op definitions in Python files in torch-ext/hello.
The AST-based checker/utility could become a reusable component for that flow. There's an open question of whether the conversion tooling should be a full DSL or just a Python utility — this issue tracks the underlying AST-based utility itself, which is useful either way.
Activity
sayakpaul commentedon Aug 25, 2026
@drbh is working on #776