Skip to content

Commit

Permalink
Work around crash when profiling multi-process/multi-GPU application (R…
Browse files Browse the repository at this point in the history
…OCm#376)

* Fix crash in multi-GPU scenario

Exclude -o option when invoking rocprof so that each rocprof process
writes to a different .csv file. Concatenate into a single .csv file
when finished.

Signed-off-by: benrichard-amd <ben.richard@amd.com>

* Only combine csv files when using rocprofv2

rocprofv1 does not have separate csv files

Signed-off-by: benrichard-amd <ben.richard@amd.com>

* Fix indices in combined CSV file

Use ignore_index flag to ensure there are no duplicate indices.

Signed-off-by: benrichard-amd <ben.richard@amd.com>

* Fix Dispatch_ID column and remove unnamed column

-Pandas was inserting an unnamed column (index column)
-Overwrite the Dispatch_ID column so that every row is unique, starting at 0
-Remove fixup_rocprofv2_dispatch_ids as no longer needed

Signed-off-by: benrichard-amd <ben.richard@amd.com>

* Fix code formatting

Signed-off-by: benrichard-amd <ben.richard@amd.com>

* Fix code formatting (for real this time)

Signed-off-by: benrichard-amd <ben.richard@amd.com>

---------

Signed-off-by: benrichard-amd <ben.richard@amd.com>
Signed-off-by: xuchen-amd <xuchen@amd.com>
  • Loading branch information
benrichard-amd authored and xuchen-amd committed Oct 19, 2024
1 parent fc9d65a commit b0cebc2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/omniperf_profile/profiler_rocprof_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ def get_profiler_options(self, fname):
# v2 requires output directory argument
"-d",
self.get_args().path + "/" + "out",
# v2 does not require quotes on cmd
app_cmd,
]
args.extend(app_cmd)
return args
Expand Down

0 comments on commit b0cebc2

Please sign in to comment.