ROCm / rocprofiler-compute

Advanced Profiling and Analytics for AMD Hardware
https://rocm.docs.amd.com/projects/omniperf/en/latest/
MIT License
135 stars 49 forks source link

Filtering using multiple kernel substrings #443

Closed ashesh2512 closed 2 weeks ago

ashesh2512 commented 3 weeks ago

Hello, is it possible to filter kernels using multiple kernel substrings? For instance, I am interested in profiling two kernels, one is named ABC, other XYZ. How may I do so in the same omniperf run? What is the appropriate syntax?

ppanchad-amd commented 3 weeks ago

Hi @ashesh2512. Internal ticket has been created to assist with your question. Thanks!

coleramos425 commented 3 weeks ago

Yes, Omniperf does support filtering multiple kernels via substrings. The appropriate syntax for such behavior would follow:

$ omniperf profile -n my_app -k ABC XYZ -- ./you/app/binary

where each kernel substring is space-separated.

ashesh2512 commented 3 weeks ago

Thank you! In such a scenario, how would one pass in the dispatch IDs? Would that be space-separated too, with the first value corresponding to the first substring, and so on?

darren-amd commented 3 weeks ago

Hi @ashesh2512,

Passing dispatch IDs would be in a similar fashion, such as:

$ omniperf profile -n my_app -d 0 1 -- ./you/app/binary

You can find further documentation here: Filtering Options

ashesh2512 commented 3 weeks ago

The documentation doesn’t have an example with multiple substrings. So if I specify -k ABC XYZ -d 0 7, the expected behavior is to record the 0 dispatch for ABC and 7 dispatch for XYZ?

darren-amd commented 2 weeks ago

Hi @ashesh2512,

From my understanding as well as discussions with the internal team, dispatch ID's are independent from kernel substrings, and so the recommended use case would be to specify one of them rather than both. I tried a few calls and found that the behavior with multiple filters was a bit inconsistent.

You can also check out the warning here: Omniperf Filtering