NvRules C++ API include file?

Is there an include file for the NvRules API?
https://docs.nvidia.com/nsight-compute/NvRulesAPI/index.html

I can’t find one either in the cuda toolkit installation or in the NVIDIA-Night-Compute standalone downloads.

NvRules is not a C/C++ but a Python API for Nsight Compute’s rule system and python report interface. The respective python modules are located in the sections (NvRules.py) and extras/python (ncu_report.py) directories.

OK, even though it is obviously written in C++, the python interface is SWIG, and the documentation uses C++ syntax.

So, then, where’s the rest of the stuff for the report interface? For example, the section data? I ended up having to read the entire ncu-rep file from my own code, using the .proto files (which aren’t in the right structure btw), just to find the sections that the user specified when collecting the data.

The NvRules API does not include functions to query the collected sections. The “stuff” is what it is. You can always also import the report in the UI or CLI and export its various pages e.g. in a CSV format for further post-processing. See the documentation on how to do this. However, it seems you also found the provided documentation and input files for parsing the report in a binary format, so the problem appears to be solved already.

OK. One more question: can I get the rules output from the NvRules API or do I have to pull that out of the result file?

In the first degree, the NvRules API is intended to create rule results itself. It does not provide the ability to access existing results at this point. It would be a possible future feature to the python report interface. You can get rule results either directly from the binary, or via text-based/csv output.