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

Profiling : Custom Flow Graph name does not appear in generated graphml file #1482

Open
Pantman opened this issue Aug 16, 2024 · 4 comments
Open
Assignees
Labels

Comments

@Pantman
Copy link

Pantman commented Aug 16, 2024

Summary

I'm not sure if this is the correct place to report TBB profiler problems, but I couldn't find anywhere else.

I'm attempting to use the Flow Graph Analyzer (FGA) to profile my TBB FlowGraph code. But my custom flowGraph names are not appearing in the generated output.

Version

traceml version : "2020.1.1.17863"
graphml version : "2020.1.1.17863"
TBB version : "2021.11.0"

Environment

  • 12 core AMD machine
  • Windows 10 Enterprise, v22H2
  • MSVC 4.8.09037

Observed Behavior

I'm using the following API to name my nodes and flow graphs to help with visualization:

oneapi::tbb::profiling::set_name(const graph& g, const char *name)
oneapi::tbb::profiling::set_name(const function_node<Input, Output, Policy>& node, const char *name)

In the generated .graphml file, I see correctly named function nodes, but all my graphs have auto generated names, which makes it hard to navigate.

<graph id="g15">
  <node  id="g15::n29">
    <data key="d0">FirstCustomNodeName</data>
    <data key="d5">tbb</data>
    <data key="d4">function_node</data>
    <port name="input_port_0" type="input" offset="0"/>
    <port name="output_port_0" type="output" offset="0"/>
  </node>
  <node  id="g15::n30">
    <data key="d0">SecondCustomNodeName</data>
    <data key="d5">tbb</data>
    <data key="d4">function_node</data>
    <port name="input_port_0" type="input" offset="0"/>
    <port name="output_port_0" type="output" offset="0"/>
  </node>
  <edge id="g15::e14" target="g15::n30" targetoffset="0" targetport="input_port_0" source="g15::n29" sourceoffset="0" sourceport="output_port_0"/>
</graph>

There is no custom graph name in the xml export. In this case, the graph name appears only as "g15", when it should be "CustomGraphName".

Expected Behavior

I would expect that the graph would have its custom name in the XML, and that name would be used in the FGA tool to identify flowGraphs by name.

Steps To Reproduce

  1. Create a flow graph with one or more nodes
  2. Call set_name on the graph and nodes
  3. Generate the trace output (following instructions in FGA documentation)
  4. Observe output in FGA tool and graphml file.
@Pantman Pantman added the bug label Aug 16, 2024
@Pantman
Copy link
Author

Pantman commented Aug 16, 2024

Looking further, I noticed that the Flow Graph node execution policy is also missing from the graphml output.

@Pantman
Copy link
Author

Pantman commented Aug 19, 2024

Another related trace issue - timestamps in FGA on Windows are 100 times too small. E.g. the tool shows the runtime of my trace as 4.6ms, but the actual runtime is 463ms.

There's also a crash bug: In my environment, calling tbb::profiling::event::emit(std::string&), causes FGA to crash when loading the capture.

@omalyshe
Copy link
Contributor

@Pantman FYI - see the deprecation notice for Flow Graph Analyzer - https://www.intel.com/content/www/us/en/docs/advisor/user-guide/2024-2/design-and-analyze-flow-graphs.html

@Pantman
Copy link
Author

Pantman commented Aug 23, 2024

Hi @omalyshe,

Thanks for the response. I didn't see that note, that's bad news! I only recently downloaded Intel Advisor, and it was 2024.2 and it still includes FGA. I guess Intel haven't got around to removing it yet.

The page you linked says to check the FAQ for more details, but I can't find it. Do you know where it is? Hopefully the FGA functionality will be integrated into another tool, but maybe this is wishful thinking. I was hoping to make more use of flow graphs, but the documentation is incomplete, and it seems like the tooling is being dropped.

Many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants