Repository navigation
Fix undefined names in tests - #3
Merged
Merged
Conversation
ruff reported 130 F821 in test/. Most were imports dropped by earlier trim edits and upstream merges; add them back. The rest: - Two conflict resolutions cut code in half. test_cpp_extensions_jit lost test_inline_jit_generated_bindings_keep_gil_disabled to the XPU tests, leaving its last assertion in test_mps_extension. test_fx lost the _capture_gm helper to a partial copy of test_profiler_stack_trace_augmentation. Restore both, and drop the MPS test and the duplicate. - test_foreach checked an undefined is_cuda; restore "cuda" in device. - test_libtorch_agnostic: drop the skipIfTorchVersionLessThan skips and the 2.15 version check; this torch is at least 2.15. - Remove leftovers of removed features: the Halide skips, the MTIA device interface check, the quantized resize test, JitTestCase bases, and instantiate calls for test classes that no longer exist. ruff now reports no F821 in torch/ and test/, and no new F401. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
Summary
test/. Most were missing imports left by earlier trim edits and upstream merges; they are added back.test_cpp_extensions_jit:test_inline_jit_generated_bindings_keep_gil_disabledis restored, and the half-deleted MPS test is dropped.test_fx: the_capture_gmhelper is restored, and the partial duplicate oftest_profiler_stack_trace_augmentationis dropped.test_foreachchecked an undefinedis_cuda; it now checks"cuda" in deviceagain.test_libtorch_agnostic: the 2.15 extension is always installed and the version skips are dropped, since this torch is at least 2.15.JitTestCasebases, andinstantiatecalls for test classes that no longer exist.Test plan
ruff check --select F821 torch test benchmarks tools functorch: 0 (was 130)trim.🤖 Generated with Claude Code