CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
61 lines
1.9 KiB
Python
61 lines
1.9 KiB
Python
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 Advanced Micro Devices, Inc. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
"""Loader / stub tests for the RCCL fork of nccl4py.
|
|
|
|
Verifies that:
|
|
|
|
* ``import nccl.bindings`` does not raise even though several
|
|
NCCL >= 2.29 host-side symbols are absent from ``librccl.so``.
|
|
* Calling each of the following at runtime raises
|
|
:class:`NotImplementedError` and the C symbol name appears in the
|
|
message::
|
|
|
|
ncclCommGrow -> nccl.bindings.comm_grow
|
|
ncclCommRevoke -> nccl.bindings.comm_revoke
|
|
ncclPutSignal -> nccl.bindings.put_signal
|
|
ncclWaitSignal -> nccl.bindings.wait_signal
|
|
|
|
The Python wrappers check the ``dlsym`` slot before dereferencing any
|
|
pointer argument, so dummy zero values are sufficient for all opaque
|
|
handles.
|
|
"""
|
|
|
|
import pytest
|
|
|
|
|
|
def test_import_bindings_does_not_raise():
|
|
import nccl.bindings # noqa: F401
|
|
|
|
|
|
def test_comm_grow_raises_not_implemented():
|
|
import nccl.bindings as b
|
|
|
|
with pytest.raises(NotImplementedError, match="ncclCommGrow"):
|
|
b.comm_grow(0, 0, 0, 0, 0)
|
|
|
|
|
|
def test_comm_revoke_raises_not_implemented():
|
|
import nccl.bindings as b
|
|
|
|
with pytest.raises(NotImplementedError, match="ncclCommRevoke"):
|
|
b.comm_revoke(0, 0)
|
|
|
|
|
|
def test_put_signal_raises_not_implemented():
|
|
import nccl.bindings as b
|
|
|
|
with pytest.raises(NotImplementedError, match="ncclPutSignal"):
|
|
b.put_signal(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
|
|
|
|
|
|
def test_wait_signal_raises_not_implemented():
|
|
import nccl.bindings as b
|
|
|
|
# Signature: wait_signal(int n_desc, intptr_t signal_descs,
|
|
# intptr_t comm, intptr_t stream).
|
|
# n_desc=0 + signal_descs=0 is safe: the dlsym slot is checked before
|
|
# the pointer is dereferenced, so the call never reaches librccl.
|
|
with pytest.raises(NotImplementedError, match="ncclWaitSignal"):
|
|
b.wait_signal(0, 0, 0, 0)
|