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

Add exegesis BB annotator #30

Merged
merged 8 commits into from
Jan 21, 2024

Conversation

boomanaiden154
Copy link
Collaborator

This patch adds in an alternative to the existing find_accessed_addrs infrastructure that uses llvm-exegesis as a backend. We believe this will more closely match the execution environment of the benchmarking environment and should avoid some of the pitfalls of the existing memory annotation infrastructure (at the current expense of speed).

This patch adds in an alternative to the existing find_accessed_addrs
infrastructure that uses llvm-exegesis as a backend. We believe this
will more closely match the execution environment of the benchmarking
environment and should avoid some of the pitfalls of the existing memory
annotation infrastructure (at the current expense of speed).
@boomanaiden154
Copy link
Collaborator Author

This should be pretty much good to go. llvm/llvm-project#74574 still needs to land for the comment mentioned above, but there shouldn't be any other issues.

Copy link
Collaborator

@ondrasej ondrasej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for working on this!

I have a bunch of changes in the existing tool that I need to push, and Owen keeps working on it. We need to eventually merge the two and keep the best from both versions (and then we should start thinking about moving it to the LLVM repo, because IMO it would make most sense next to llvm-exegesis).

gematria/datasets/find_accessed_addrs_exegesis.cc Outdated Show resolved Hide resolved
gematria/datasets/find_accessed_addrs_exegesis.cc Outdated Show resolved Hide resolved
gematria/datasets/find_accessed_addrs_test.cc Outdated Show resolved Hide resolved
gematria/datasets/find_accessed_addrs_test.cc Outdated Show resolved Hide resolved
gematria/datasets/find_accessed_addrs_test.cc Outdated Show resolved Hide resolved
@boomanaiden154
Copy link
Collaborator Author

I have a bunch of changes in the existing tool that I need to push, and Owen keeps working on it. We need to eventually merge the two and keep the best from both versions (and then we should start thinking about moving it to the LLVM repo, because IMO it would make most sense next to llvm-exegesis).

Yep. Consolidating on something eventually would be good. It might not be this. This was mostly just something I threw together as when I was experimenting with the current FindAccessedAddrs implementation, it was finding addresses that would then segfault in Exegesis, and I figured directly using Exegesis would fix any discrepancies there during experimentation.

Owen's annotator is significantly faster. The Exegesis annotator is pretty slow. I haven't profiled it yet, but I suspect at least some of the slowness is inherent to the design. Everything has to get emitted to textual assembly, reparsed, reassembled, and then executed. Something to fix this would be nice, but I don't think it would be trivial.

Upstreaming definitely is something to look into at some point. We'll have to see where this ends up going and what ends up scaling well.

@ondrasej
Copy link
Collaborator

I have a bunch of changes in the existing tool that I need to push, and Owen keeps working on it. We need to eventually merge the two and keep the best from both versions (and then we should start thinking about moving it to the LLVM repo, because IMO it would make most sense next to llvm-exegesis).

Yep. Consolidating on something eventually would be good. It might not be this. This was mostly just something I threw together as when I was experimenting with the current FindAccessedAddrs implementation, it was finding addresses that would then segfault in Exegesis, and I figured directly using Exegesis would fix any discrepancies there during experimentation.

Owen's annotator is significantly faster. The Exegesis annotator is pretty slow. I haven't profiled it yet, but I suspect at least some of the slowness is inherent to the design. Everything has to get emitted to textual assembly, reparsed, reassembled, and then executed. Something to fix this would be nice, but I don't think it would be trivial.

Upstreaming definitely is something to look into at some point. We'll have to see where this ends up going and what ends up scaling well.

SGTM. Let me upstream that first.

@boomanaiden154
Copy link
Collaborator Author

I've updated the patch to fix the includes in the various places where llvm-exegesis includes are used and added a comment where they are noting why we're only using the absolute paths there.

gematria/datasets/find_accessed_addrs_exegesis.cc Outdated Show resolved Hide resolved
gematria/datasets/find_accessed_addrs_exegesis.cc Outdated Show resolved Hide resolved
@boomanaiden154 boomanaiden154 merged commit 47f0a6f into google:main Jan 21, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants