Skip to content

Commit e20ef78

Browse files
authored
Include cuda.bindings.nvml in docs (#1778)
* Include cuda.bindings.nvml in docs Update copyright year in nvml.rst Automatically document enums * Formatting * Fix up some docstrings that don't parse as rst
1 parent bffbeec commit e20ef78

File tree

6 files changed

+682
-7
lines changed

6 files changed

+682
-7
lines changed

cuda_bindings/cuda/bindings/nvml.pyx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27471,3 +27471,9 @@ cpdef str vgpu_type_get_name(unsigned int vgpu_type_id):
2747127471
__status__ = nvmlVgpuTypeGetName(<nvmlVgpuTypeId_t>vgpu_type_id, vgpu_type_name, <unsigned int*>size)
2747227472
check_status(__status__)
2747327473
return cpython.PyUnicode_FromStringAndSize(vgpu_type_name, size[0])
27474+
27475+
27476+
# Cleanup some docstrings that don't parse as rst.
27477+
device_get_virtualization_mode.__doc__ = device_get_virtualization_mode.__doc__.replace("NVML_GPU_VIRTUALIZATION_?", "``NVML_GPU_VIRTUALIZATION_?``")
27478+
device_set_virtualization_mode.__doc__ = device_set_virtualization_mode.__doc__.replace("NVML_GPU_VIRTUALIZATION_?", "``NVML_GPU_VIRTUALIZATION_?``")
27479+
GpmMetricId.GPM_METRIC_DRAM_BW_UTIL.__doc__ = "Percentage of DRAM bw used vs theoretical maximum. ``0.0 - 100.0 *\u200d/``."

cuda_bindings/docs/source/api.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ CUDA Python API Reference
1616
module/nvvm
1717
module/nvfatbin
1818
module/cufile
19+
module/nvml
1920
module/utils

cuda_bindings/docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@
3737
"sphinx.ext.napoleon",
3838
"sphinx.ext.intersphinx",
3939
"myst_nb",
40-
"enum_tools.autoenum",
4140
"sphinx_copybutton",
4241
"release_toc",
4342
"release_date",
43+
"enum_documenter",
4444
]
4545

4646
nb_execution_mode = "off"

0 commit comments

Comments
 (0)