Repository navigation
Conversation
test_unsupported_fabric_construction used _set_device_attribute_for_testing, a test-only function in cuda.core._device. Monkeypatch Device.properties with a proxy that reports no fabric handle support instead, and remove the hook. The constructor's real check and error still run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Summary
Change: Other Merge Risk:
|
Follow-up to #3652 (#3574). Part of #2077.
Summary
#3652 made
test_unsupported_fabric_constructionrun by adding a test-only function,_set_device_attribute_for_testing, to the production modulecuda.core._device. #3555 adds an AGENTS.md rule against test hooks in production code, so this removes the hook and fakes the property from the test instead:Deviceis a Python class andpropertiesan ordinaryproperty, so the patch needs no production support;monkeypatchrestores it.thread_unsafe.Evidence
Locally (cuda.core built from this branch, hook absent):
test_unsupported_fabric_constructionandtest_device.pypass (184 passed).VirtualMemoryResource(..., handle_type="fabric")pass the check, so the patch really drives it.CI coverage is unchanged from #3652: the test should pass on the Linux rows (it skips on Windows/WSL, where fabric IPC needs Linux).
Confirming in CI:
Merge Danger
Door: two-way.
Blast Radius: removes the private
cuda.core._device._set_device_attribute_for_testing(added in #3652, used only by this test) and changes one test.Reviewers: please feel free to push commits directly to this PR to improve it.
🤖 Generated with Claude Code