@@ -12,31 +12,94 @@ On a machine with the driver already installed, you can list the parameter names
1212You can pass custom parameters to the kernel modules that get loaded as part of the
1313NVIDIA Driver installation (``nvidia ``, ``nvidia-modeset ``, ``nvidia-uvm ``, and ``nvidia-peermem ``).
1414
15+ Configure Custom Driver Parameters
16+ -----------------------------------
17+
1518To pass custom parameters, execute the following steps.
1619
17- Create a configuration file named ``<module>.conf ``, where ``<module> `` is the name of the kernel module the parameters are for.
18- The file should contain parameters as key-value pairs -- one parameter per line.
19- In the following example, the GPU firmware logging parameter is passed to the ``nvidia `` module.
20+ #. Create a configuration file named ``<module>.conf ``, where ``<module> `` is the name of the kernel module the parameters are for.
21+ The file should contain parameters as key-value pairs -- one parameter per line.
22+
23+ The following example shows the GPU firmware logging parameter being passed to the ``nvidia `` module.
24+
25+ .. code-block :: console
26+
27+ $ cat nvidia.conf
28+ NVreg_EnableGpuFirmwareLogs=2
29+
30+ #. Create a ``ConfigMap `` for the configuration file.
31+ If multiple modules are being configured, pass multiple files when creating the ``ConfigMap ``.
32+
33+ .. code-block :: console
34+
35+ $ kubectl create configmap kernel-module-params -n gpu-operator --from-file=nvidia.conf=./nvidia.conf
36+
37+ #. Install the GPU Operator and set ``driver.kernelModuleConfig.name `` to the name of the ``ConfigMap ``
38+ containing the kernel module parameters.
39+
40+ .. code-block :: console
41+
42+ $ helm install --wait --generate-name \
43+ -n gpu-operator --create-namespace \
44+ nvidia/gpu-operator \
45+ --version=${version} \
46+ --set driver.kernelModuleConfig.name="kernel-module-params"
47+
48+ -----------------------------------
49+ Example using ``nvidia-uvm `` module
50+ -----------------------------------
51+
52+ This example shows the High Memory Mode being disabled in the ``nvidia-uvm `` module.
53+
54+ #. Create a configuration file named ``nvidia-uvm.conf ``:
55+
56+ .. code-block :: console
57+
58+ $ cat nvidia-uvm.conf
59+ uvm_disable_hmm=1
60+
61+
62+ #. Create a ``ConfigMap `` for the configuration file.
63+ If multiple modules are being configured, pass multiple files when creating the ``ConfigMap ``.
64+
65+ .. code-block :: console
66+
67+ $ kubectl create configmap kernel-module-params -n gpu-operator --from-file=nvidia-uvm.conf=./nvidia-uvm.conf
68+
69+ #. Install the GPU Operator and set ``driver.kernelModuleConfig.name `` to the name of the ``ConfigMap ``
70+ containing the kernel module parameters.
71+
72+ .. code-block :: console
73+
74+ $ helm install --wait --generate-name \
75+ -n gpu-operator --create-namespace \
76+ nvidia/gpu-operator \
77+ --version=${version} \
78+ --set driver.kernelModuleConfig.name="kernel-module-params"
79+
80+ #. Verify the parameter has been correctly applied, go to ``/sys/module/nvidia_uvm/parameters/ `` on the node:
81+
82+ .. code-block :: console
83+
84+ $ ls /sys/module/nvidia_uvm/parameters/
85+
86+ *Example Output *
2087
21- .. code-block :: console
88+ .. code-block :: output
2289
23- $ cat nvidia.conf
24- NVreg_EnableGpuFirmwareLogs=2
90+ ...
91+ uvm_disable_hmm uvm_perf_access_counter_migration_enable uvm_perf_prefetch_min_faults
92+ uvm_downgrade_force_membar_sys uvm_perf_access_counter_threshold uvm_perf_prefetch_threshold
93+ ...
2594
26- Create a ``ConfigMap `` for the configuration file.
27- If multiple modules are being configured, pass multiple files when creating the ``ConfigMap ``.
95+ Then check the value of the parameter:
2896
29- .. code-block :: console
97+ .. code-block :: console
3098
31- $ kubectl create configmap kernel-module-params -n gpu-operator --from-file=nvidia.conf=./nvidia.conf
99+ $ cat /sys/module/nvidia_uvm/parameters/uvm_disable_hmm
32100
33- Install the GPU Operator and set ``driver.kernelModuleConfig.name `` to the name of the ``ConfigMap ``
34- containing the kernel module parameters.
101+ *Example Output *
35102
36- .. code-block :: console
103+ .. code-block :: output
37104
38- $ helm install --wait --generate-name \
39- -n gpu-operator --create-namespace \
40- nvidia/gpu-operator \
41- --version=${version} \
42- --set driver.kernelModuleConfig.name="kernel-module-params"
105+ Y
0 commit comments