Skip to content

[BUG]: Doc build generates lots of ignored exceptions #1007

Closed

Description

@cpcloud

Is this a duplicate?

Type of Bug

Silent Failure

Component

cuda.pathfinder

Describe the bug

It seems that doc build are generating a number of exceptions that are ignored.

Here's a run on main: https://github.com/NVIDIA/cuda-python/actions/runs/17918838071/job/50949130232

How to Reproduce

N/A

Expected behavior

Docs build without any exceptions.

Operating System

Linux

nvidia-smi output

No response

Activity

  1. added
    documentationImprovements or additions to documentation
    cuda.pathfinderEverything related to the cuda.pathfinder module
    P1Medium priority - Should do
    on Sep 25, 2025
  2. rwgk commented on Sep 25, 2025

    @rwgk
    Contributor

    @cpcloud is this what you saw (and had in mind)?

    2025-09-22T14:49:43.4618681Z WARNING: autodoc: failed to import attribute 'cudaAtomicOperationCapability.cudaAtomicCapabilitySigned' from module 'cuda.bindings.runtime'; the following exception was raised:
    2025-09-22T14:49:43.4619446Z Traceback (most recent call last):
    2025-09-22T14:49:43.4620042Z   File "/home/runner/miniconda3/envs/cuda-python-docs/lib/python3.12/site-packages/sphinx/util/inspect.py", line 397, in safe_getattr
    2025-09-22T14:49:43.4620639Z     return getattr(obj, name, *defargs)
    2025-09-22T14:49:43.4620893Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    2025-09-22T14:49:43.4621385Z AttributeError: type object 'cudaAtomicOperationCapability' has no attribute 'cudaAtomicCapabilitySigned'
    2025-09-22T14:49:43.4621810Z 
    2025-09-22T14:49:43.4621992Z The above exception was the direct cause of the following exception:
    2025-09-22T14:49:43.4622262Z 
    2025-09-22T14:49:43.4622350Z Traceback (most recent call last):
    2025-09-22T14:49:43.4622980Z   File "/home/runner/miniconda3/envs/cuda-python-docs/lib/python3.12/site-packages/sphinx/ext/autodoc/importer.py", line 207, in import_object
    2025-09-22T14:49:43.4623780Z     obj = attrgetter(obj, mangled_name)
    2025-09-22T14:49:43.4624027Z           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    2025-09-22T14:49:43.4624611Z   File "/home/runner/miniconda3/envs/cuda-python-docs/lib/python3.12/site-packages/sphinx/ext/autodoc/__init__.py", line 343, in get_attr
    2025-09-22T14:49:43.4625400Z     return autodoc_attrgetter(self.env.app, obj, name, *defargs)
    2025-09-22T14:49:43.4625744Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    2025-09-22T14:49:43.4626391Z   File "/home/runner/miniconda3/envs/cuda-python-docs/lib/python3.12/site-packages/sphinx/ext/autodoc/__init__.py", line 2835, in autodoc_attrgetter
    2025-09-22T14:49:43.4627040Z     return safe_getattr(obj, name, *defargs)
    2025-09-22T14:49:43.4627305Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    2025-09-22T14:49:43.4627876Z   File "/home/runner/miniconda3/envs/cuda-python-docs/lib/python3.12/site-packages/sphinx/util/inspect.py", line 413, in safe_getattr
    2025-09-22T14:49:43.4628463Z     raise AttributeError(name) from exc
    2025-09-22T14:49:43.4628749Z AttributeError: cudaAtomicCapabilitySigned
    2025-09-22T14:49:43.4629032Z  [autodoc.import_object]
    

    These are under

    cd ../../cuda_bindings/docs
    

    I looked systematically, this is conclusive: Only the the cuda_bindings doc build generates Tracebacks.

    The other three doc builds (cuda_python, cuda_core, cuda_pathfinder) don't have any Tracebacks.

    I'll change the Component in the issue description and the Label to cuda.bindings

    @leofang Do you want to leave this assigned to me? (Happy to look into it if that's a priority.)

  3. added
    cuda.bindingsEverything related to the cuda.bindings module
    and removed
    cuda.pathfinderEverything related to the cuda.pathfinder module
    on Sep 25, 2025
  4. leofang commented on Sep 25, 2025

    @leofang
    Member

    @rwgk see the above link to the CI log that I left earlier. It points to warnings raised during pathfinder doc build. Don't try to fix cuda-bindings warnings, they are very convolved (#152).

  5. cpcloud commented on Sep 25, 2025

    @cpcloud
    ContributorAuthor

    I opened this issue precisely because of #152. I don't see any place where we definitively state that we can ignore these errors because of some specific reason, or conversely where there's an actual bug that needs to be fixed.

    If we can ignore them, then we should suppress them to avoid the noise. My hunch is that we cannot ignore these. It's almost never the case that exceptions during doc builds are intentional.

  6. rwgk commented on Sep 25, 2025

    @rwgk
    Contributor

    @rwgk see the above link to the CI log that I left earlier. It points to warnings raised during pathfinder doc build. Don't try to fix cuda-bindings warnings, they are very convolved (#152).

    Ah, got it now, I missed that link before:

    /home/runner/work/cuda-python/cuda-python/cuda_pathfinder/docs/source/release/1.2.0-notes.rst:4: WARNING: duplicate object description of cuda.pathfinder, other instance in release/1.1.0-notes, use :no-index: for one of them
    /home/runner/work/cuda-python/cuda-python/cuda_pathfinder/docs/source/release/1.2.1-notes.rst:4: WARNING: duplicate object description of cuda.pathfinder, other instance in release/1.2.0-notes, use :no-index: for one of them
    /home/runner/work/cuda-python/cuda-python/cuda_pathfinder/docs/source/release/1.2.2-notes.rst:4: WARNING: duplicate object description of cuda.pathfinder, other instance in release/1.2.1-notes, use :no-index: for one of them
    /home/runner/work/cuda-python/cuda-python/cuda_pathfinder/docs/source/contribute.rst:14: WARNING: Bullet list ends without a blank line; unexpected unindent. [docutils]
    /home/runner/work/cuda-python/cuda-python/cuda_pathfinder/docs/source/release/1.2.3-notes.rst:4: WARNING: duplicate object description of cuda.pathfinder, other instance in release/1.0.0-notes, use :no-index: for one of them
    

    I'll change the Component/Label back to cuda.pathfinder

  7. added
    cuda.pathfinderEverything related to the cuda.pathfinder module
    and removed
    cuda.bindingsEverything related to the cuda.bindings module
    on Sep 25, 2025
  8. leofang commented on Sep 26, 2025

    @leofang
    Member

    I opened this issue precisely because of #152. I don't see any place where we definitively state that we can ignore these errors because of some specific reason, or conversely where there's an actual bug that needs to be fixed.

    If we can ignore them, then we should suppress them to avoid the noise. My hunch is that we cannot ignore these. It's almost never the case that exceptions during doc builds are intentional.

    Unfortunately I feel there was a more detailed analysis that's lost now, at least I can't find it in the paper trail. One category that's pointed out to be upstream issues (doxygen docstrings in the CUDA headers) is #152 (comment). In general we are getting the warnings transitively. If the CUDA docs aren't built with warning-free, we can't achieve so. Anyway, let's move the discussion back to #152.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1Medium priority - Should dobugSomething isn't workingcuda.pathfinderEverything related to the cuda.pathfinder moduledocumentationImprovements or additions to documentation

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions