@@ -838,9 +838,7 @@ def test_explicit_gfx_index_honored_and_skips_strix_reroute(
838838 stack_mod .os .environ .pop ("UNSLOTH_TORCH_INDEX_FAMILY" , None )
839839 with patch ("os.path.isdir" , return_value = True ):
840840 with patch ("subprocess.run" , return_value = mock_probe ):
841- with patch .object (
842- stack_mod , "_detect_amd_gfx_codes" , return_value = ["gfx1151" ]
843- ):
841+ with patch .object (stack_mod , "_detect_amd_gfx_codes" , return_value = ["gfx1151" ]):
844842 _ensure_rocm_torch ()
845843 assert mock_pip .call_count == 1
846844 torch_call = str (mock_pip .call_args_list [0 ])
@@ -942,9 +940,7 @@ def test_gfx_pin_over_installed_pre211_rocm_reinstalls(
942940 stack_mod .os .environ .pop ("UNSLOTH_TORCH_INDEX_FAMILY" , None )
943941 with patch ("os.path.isdir" , return_value = True ):
944942 with patch ("subprocess.run" , return_value = mock_probe ):
945- with patch .object (
946- stack_mod , "_detect_amd_gfx_codes" , return_value = ["gfx1151" ]
947- ):
943+ with patch .object (stack_mod , "_detect_amd_gfx_codes" , return_value = ["gfx1151" ]):
948944 _ensure_rocm_torch ()
949945 torch_call = str (mock_pip .call_args_list [0 ])
950946 assert "gfx1151" in torch_call
@@ -1031,9 +1027,7 @@ def test_gfx_pin_over_generic_rocm211_reinstalls(
10311027 with patch ("subprocess.run" , return_value = mock_probe ):
10321028 # The gfx probe may run for the bnb-skip flag; returning a Strix
10331029 # arch must not reroute the pinned torch index.
1034- with patch .object (
1035- stack_mod , "_detect_amd_gfx_codes" , return_value = ["gfx1151" ]
1036- ):
1030+ with patch .object (stack_mod , "_detect_amd_gfx_codes" , return_value = ["gfx1151" ]):
10371031 _ensure_rocm_torch ()
10381032 torch_call = str (mock_pip .call_args_list [0 ])
10391033 assert "gfx1151" in torch_call
0 commit comments