Repository navigation
CI: stop the torch-free bindings check from matching load addresses - #24470
shoumikhin wants to merge 1 commit into
Conversation
The test-pybindings-no-aten job checks that the torch-free Python bindings do not link against PyTorch. It searches the output of `ldd` for "torch", "aten" or "c10". But `ldd` also prints where it loaded each library, as a hex number such as `(0x00007f8ec1000000)`, and such a number sometimes contains "c10". The job then fails after every test has passed, even though nothing links PyTorch. Use the check that release/1.6 already has (from pytorch#24338). It matches only library names, prints the `ldd` output, and fails on a missing dependency. Test plan: checked the `ldd` output of a library with five dependencies 4000 times. The old pattern matched 69 times and the new check never did. The new check still flags PyTorch's `libtorch_python.so`, and reports a missing dependency when that library is copied away from the libraries it needs.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/24470
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit ea3ca98 with merge base 893d815 ( 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. |
|
@claude /pr-review |
This PR needs a
|
|
Claude finished @shoumikhin's task in 17m 29s —— View job Nothing blocks this PR; the three optional cleanups below would each need the same change on Detailed reviewPR Review: #24470SummaryThe PR replaces the Code Quality
RecommendationApprove None of the findings blocks the fix. All three are cleanups of the block copied from |
|
Thanks. I'll keep the block exactly as it is on You are right about the description. In this job, if the built library is missing, the tests already fail before this check runs. I removed that sentence. |
The
test-pybindings-no-atenjob builds the Python bindings without PyTorch, runs their tests, and then checks that the built library does not link against PyTorch. The check searches the output oflddfortorch,atenorc10.lddalso prints the address where it loaded each library, as a hex number such as(0x00007f8ec1000000). The addresses change on every run, and sometimes one of them containsc10. The check then fails after every test has passed, although nothing links PyTorch. This has turned the job red on recent main commits.This change uses the check that
release/1.6already has (from #24338). It matches only library names and prints thelddoutput so a failure shows what matched. With it, the job is the same on both branches.Test plan: checked the
lddoutput of a library with 5 dependencies 4000 times, on Linux x86_64. The old pattern matched 57 times and the new check never did. The new check still flags PyTorch'slibtorch_python.so, and reports a missing dependency when that library is copied away from the libraries it needs.