163163 "json_url" : "/cuda/nvmath-python/latest/_static/switcher.json" ,
164164 "version_match" : version ,
165165 },
166- "navbar_start" : ["navbar-logo" , "version-switcher" ],
166+ "navbar_start" : ["navbar-logo" ],
167167}
168168html_show_sphinx = False
169169
182182
183183# TODO: remove this once examples are published.
184184linkcheck_ignore = [
185- "https://github.com/NVIDIA/nvmath-python/tree/main/examples/distributed /.*" ,
185+ "https://github.com/NVIDIA/nvmath-python/tree/main/examples/sparse /.*" ,
186186]
187187
188188
@@ -193,6 +193,21 @@ def autodoc_process_docstring(app, what, name, obj, options, lines):
193193 # there's no way we can touch the docstrings of np.dtype objects, so we
194194 # need to do post-processing here
195195 if isinstance (obj , np .dtype ):
196+ docs = {}
197+ from nvmath .sparse ._internal .cudss_data_ifc import memory_estimates_dtype
198+
199+ # TODO: find better way to declare docs in the source code.
200+ if obj == memory_estimates_dtype :
201+ docs = {
202+ "permanent_device_memory" : "permanent device memory" ,
203+ "peak_device_memory" : "peak device memory" ,
204+ "permanent_host_memory" : "permanent host memory" ,
205+ "peak_host_memory" : "peak host memory" ,
206+ "hybrid_min_device_memory" : "(if in hybrid memory mode) minimum device memory for the hybrid memory mode" ,
207+ "hybrid_max_device_memory" : "(if in hybrid memory mode) maximum host memory for the hybrid memory mode" ,
208+ "reserved" : "reserved for future use" ,
209+ }
210+
196211 _ , * mod , struct = name .split ("." )
197212 mod = "." .join (mod )
198213 if mod == "bindings" :
@@ -207,7 +222,8 @@ def autodoc_process_docstring(app, what, name, obj, options, lines):
207222 lines .append (line )
208223 lines .append ("\n " )
209224 for k in obj .fields :
210- lines .append (f":param { k } :\n " )
225+ docs_value = docs .get (k , "" )
226+ lines .append (f":param { k } : { docs_value } \n " )
211227 else :
212228 match_numba_dtype = re .search (r"nvmath.device.float(\d+)x(\d+)_type" , name )
213229 if match_numba_dtype :
@@ -302,6 +318,7 @@ def remove_notebook_copyright(self, app, docname, content):
302318
303319
304320def setup (app ):
321+ fixup_internal_alias ()
305322 app .add_css_file ("nvmath_override.css" )
306323 app .connect ("autodoc-process-docstring" , autodoc_process_docstring )
307324 app .connect ("source-read" , lambda * args , ** kwargs : notebook_handler .remove_notebook_copyright (* args , ** kwargs ))
@@ -310,6 +327,16 @@ def setup(app):
310327 app .add_post_transform (UnqualifiedTitlesTransform )
311328
312329
330+ def fixup_internal_alias ():
331+ from nvmath .sparse ._internal import cudss_config_ifc , cudss_data_ifc
332+
333+ cudss_config_ifc .PlanConfig .__name__ = "DirectSolverPlanConfig"
334+ cudss_data_ifc .PlanInfo .__name__ = "DirectSolverPlanInfo"
335+ cudss_config_ifc .FactorizationConfig .__name__ = "DirectSolverFactorizationConfig"
336+ cudss_config_ifc .SolutionConfig .__name__ = "DirectSolverSolutionConfig"
337+ cudss_data_ifc .FactorizationInfo .__name__ = "DirectSolverFactorizationInfo"
338+
339+
313340# -- Other options -------------------------------------------------
314341
315342autosummary_generate = True
@@ -323,12 +350,21 @@ def setup(app):
323350}
324351
325352intersphinx_mapping = {
326- "python" : ("https://docs.python.org/3/" , None ),
327- "numpy" : ("https://numpy.org/doc/stable/" , None ),
353+ "cublas" : ("https://docs.nvidia.com/cuda/cublas/" , None ),
354+ "cuda-bindings" : ("https://nvidia.github.io/cuda-python/cuda-bindings/" , None ),
355+ "cuda-core" : ("https://nvidia.github.io/cuda-python/cuda-core/" , None ),
356+ "cudss" : ("https://docs.nvidia.com/cuda/cudss/" , None ),
357+ "cufft" : ("https://docs.nvidia.com/cuda/cufft/" , None ),
328358 "cupy" : ("https://docs.cupy.dev/en/stable/" , None ),
329- "torch" : ("https://pytorch.org/docs/stable/" , None ),
359+ # curand is not using sphinx yet - June, 2025
360+ # "curand": ("https://docs.nvidia.com/cuda/curand/", None),
361+ "cusolver" : ("https://docs.nvidia.com/cuda/cusolver/" , None ),
362+ "cusparse" : ("https://docs.nvidia.com/cuda/cusparse/" , None ),
330363 "numba" : ("https://numba.readthedocs.io/en/stable/" , None ),
331- "cufft" : ("https://docs.nvidia.com/cuda/cufft/" , None ),
364+ "numpy" : ("https://numpy.org/doc/stable/" , None ),
365+ "python" : ("https://docs.python.org/3/" , None ),
366+ "scipy" : ("https://docs.scipy.org/doc/scipy/" , None ),
367+ "torch" : ("https://docs.pytorch.org/docs/stable/" , None ),
332368}
333369
334370napoleon_google_docstring = True
0 commit comments