Document new --compiler-args argument

This commit is contained in:
Cosmin Ștefan Ciocan
2024-01-23 23:01:38 +00:00
parent 405c16efb3
commit 65eca38a67
+13 -4
View File
@@ -21,6 +21,7 @@ Usage
- ``%%cuda``: Compile and run this cell. - ``%%cuda``: Compile and run this cell.
- ``%%cuda -p``: Also runs the Nsight Compute profiler. - ``%%cuda -p``: Also runs the Nsight Compute profiler.
- ``%%cuda -p -a "<SPACE SEPARATED PROFILER ARGS>"``: Also runs the Nsight Compute profiler. - ``%%cuda -p -a "<SPACE SEPARATED PROFILER ARGS>"``: Also runs the Nsight Compute profiler.
- ``%%cude -c "<SPACE SEPARATED COMPILER ARGS"``: Passes additional arguments to "nvcc".
- ``%%cuda -t``: Outputs the "timeit" built-in magic results. - ``%%cuda -t``: Outputs the "timeit" built-in magic results.
Options Options
@@ -39,6 +40,13 @@ Options
by wrapping them in double quotes. See all options here: by wrapping them in double quotes. See all options here:
`Nsight Compute CLI <https://docs.nvidia.com/nsight-compute/NsightComputeCli/index.html#command-line-options>`_ `Nsight Compute CLI <https://docs.nvidia.com/nsight-compute/NsightComputeCli/index.html#command-line-options>`_
-c, --compiler-args
String. Optional compiler arguments that can be space separated
by wrapping them in double quotes. They will be passed to "nvcc".
See all options here:
`NVCC Options <https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#nvcc-command-options>`_
.. note:: .. note::
If both "\-\-profile" and "\-\-timeit" are used then no profiling is If both "\-\-profile" and "\-\-timeit" are used then no profiling is
done. done.
@@ -47,10 +55,11 @@ Examples
-------- --------
:: ::
# compile, run, and profile the code in the cell with the Nsight # compile, run, and profile the code in the cell with the Nsight compute
# compute profiler while collecting only metrics from the # profiler while collecting only metrics from the "MemoryWorkloadAnalysis"
# "MemoryWorkloadAnalysis" section. # section; also provides the "--optimize 3" option to "nvcc" during
%%cuda --profile --profiler-args "--section MemoryWorkloadAnalysis" # compilation to optimize host code
%%cuda -p -a "--section MemoryWorkloadAnalysis" -c "--optimize 3"
------ ------