Skip to content

Commit

Permalink
Mark NCCL python test optional. (#9804)
Browse files Browse the repository at this point in the history
Skip the tests if XGBoost is not compiled with dlopen.
  • Loading branch information
trivialfis authored Nov 25, 2023
1 parent 8fe1a22 commit 3f4e220
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,10 @@ def test_with_asyncio(local_cuda_client: Client) -> None:
assert isinstance(output["history"], dict)


@pytest.mark.skipif(
condition=not xgb.build_info()["USE_DLOPEN_NCCL"],
reason="Not compiled with dlopen.",
)
def test_invalid_nccl(local_cuda_client: Client) -> None:
client = local_cuda_client
workers = tm.get_client_workers(client)
Expand All @@ -592,6 +596,10 @@ def run(wid: int) -> None:
client.gather(futures)


@pytest.mark.skipif(
condition=not xgb.build_info()["USE_DLOPEN_NCCL"],
reason="Not compiled with dlopen.",
)
@pytest.mark.parametrize("tree_method", ["hist", "approx"])
def test_nccl_load(local_cuda_client: Client, tree_method: str) -> None:
X, y, w = tm.make_regression(128, 16, use_cupy=True)
Expand Down

0 comments on commit 3f4e220

Please sign in to comment.