-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Profiler class and native code to support self-profiling #2066
Conversation
Signed-off-by: Jason Lowe <[email protected]>
build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really just nits, but be aware I do not know CMake so if there are scary thing in there I probably missed them. I also am not an expert on the libraries or formats that you are using, so I am not sure 100% if they are all correct, but things appeared to line up properly.
build |
build |
build |
build |
Contributes to NVIDIA/spark-rapids#10632. Adds a new Profiler class and native code that can be used to collect CUDA and NVTX profiling data for the current process via CUPTI. It supports
The profiler is intended to be started before the process calls any CUDA events so it can capture everything. The profiler is shipped as a separate shared library in the spark-rapids-jni jar that can be loaded before the spark-rapids-jni shared native library that contains the cudf and spark-rapids-jni CUDA kernels.
The profiling data is serialized as a series of size-prefixed flatbuffers. See profiler.fbs for the schema. This also includes a converter tool, built in target/cmake-build/profiler/spark_rapids_profile_converter which can be used to convert the flatbuffer profiling data into various formats. It currently supports converting to JSON (useful for performing custom analysis on the raw data) or the Nsight NVTXT format. NVTXT can in turn be converted into an nsys-rep file that the Nsight Systems viewer can load via the ImportNvtxt tool supplied with Nsight Systems.