Skip to content
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

capture nsys report #14

Merged
merged 2 commits into from
Dec 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions sql-plugin/src/main/scala/com/nvidia/spark/rapids/Plugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,11 @@ class RapidsExecutorPlugin extends ExecutorPlugin with Logging {
extraExecutorPlugins.foreach(_.init(pluginContext, extraConf))
GpuSemaphore.initialize()
FileCache.init(pluginContext)
// here customer need to make sure the path exists and is writable
val nsysStartComamnd = "nsys start -o /opt/spark/work-dir/test_%h_%p" +
firestarman marked this conversation as resolved.
Show resolved Hide resolved
".nsys-rep"
val result: String = nsysStartComamnd.!!
println(s"Nsys Start Command output: $result")
} catch {
// Exceptions in executor plugin can cause a single thread to die but the executor process
// sticks around without any useful info until it hearbeat times out. Print what happened
Expand Down Expand Up @@ -513,6 +518,13 @@ class RapidsExecutorPlugin extends ExecutorPlugin with Logging {
extraExecutorPlugins.foreach(_.shutdown())
FileCache.shutdown()
GpuCoreDumpHandler.shutdown()

val nsysStopCommand = "nsys stop"
val result: String = nsysStopCommand.!!
println(s"Nsys Stop Command output: $result")
// here the report is generated. customer need to write another command to do HDFS upload
// val hdfsUploadCommand = "..."
// ...
}

override def onTaskFailed(failureReason: TaskFailedReason): Unit = {
Expand Down