-
Notifications
You must be signed in to change notification settings - Fork 59
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
tool(space-time-stack): demangle name #218
base: develop
Are you sure you want to change the base?
Conversation
1a76dca
to
2d757cd
Compare
@maartenarnst Thanks for this earlier. This PR is helpful. Sorry for the delayed reply due to conferences and US holidays this time of year.
Yes, the issue of duplication across tools will definitely make development of tool connector much easier for someone new to Kokkos Tools. Perhaps it is OK
Thanks for that! I don't know how much this is being used and how much it impacts other Kokkos Tools from a quick look. Yes, let me know if you can easily submit a new PR on your end, and we will look at it to get this quick fix merged.
Yes, I think Google Test was a generally accepted way to do testing of Kokkos Tools when I wrote that Ghub Issue, having discussed with @crtrott previously months ago. Also, Google Tests is used in Kokkos Core. If you know of another dominant and here-to-stay framework for unit tests, let us know, but my opinion from experience with GTests is that it is straightforward and reasonably documented and still the best way to go for now.
I think that this is a good idea. I don't see any issues with putting struct Stack in the header file. What other parts of kp_space_time_stack.cpp were you thinking to move?
Deferring to @dalg24, @crtrott and maybe @masterleinad. Your points seem reasonable and good to me but we probably ought to think whether what you suggest is the only/best solution.
Deferring to @dalg24, @crtrott. I like the motivation of the problem. We probably need more discussion on the solution to the problem. For the last two bullet points, I suggest putting up a GitHub Issue for each first in order to identify the right solutions for them. |
2d757cd
to
205edcb
Compare
205edcb
to
f5cf73c
Compare
I have already mentioned this to @romintomasetti through DM but I am passing on here that there is a problem with Google Test relying on std::cout. A large number of Kokkos Tools connectors use printf's and not std::cout, including kernel-logger. @romintomasetti I am thinking we will probably want to go with the Python script post-processing solution right now, and let all tools connectors continue to use printf's. |
Summary
This PR ensures that the tool
space-time-stack
demangles kernel names.Side quests, questions and related issues
SpaceHandle.hpp
,utils_demangle.hpp
and so on) I think this touches upon the more general problem of duplication in the tools and how this should be tackled.I changedDiscussion moved to type: renamingKokkos_Tools_OptimzationGoal
toKokkos_Tools_OptimizationGoal
because I think it's a typo. I guess @dalg24 will agree that this deserves a separate PR. Note that the same change will be needed inKokkos
.Kokkos_Tools_OptimizationGoal
#221.struct Stack
defined inkp_space_time_stack.cpp
has a declaration in a corresponding header file, so tests can directly go ask such structures what they captured during a test. Tell me what you think.SpaceHandle
recognizes the space type by looking at the first letters of itsname
attribute. Is there any reason why it's done like this and not via an enumeration? To me, this seems inefficient, because in e.g.Kokkos
you'll need to create theSpaceHandle
by creating a string with the space name, and pass it to the tools, that will need to parse that string. This seems to have more impact on the runtime that simply passing anenum
... Moreover, several tools define their own enumeration for a subset of availableKokkos
spaces. I would propose that by default theSpaceHandle
only has an attributetype
that comes from an enumeration like the one I defined inSpaceHandle.hpp
. What do you think?enum FrameType
that seeks to homogenize how kernel types are treated amongst tools, and how they are printed. This also deserves another PR if you agree on the principle.