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

open loop in uica #96

Open
pacak opened this issue Nov 21, 2022 · 4 comments
Open

open loop in uica #96

pacak opened this issue Nov 21, 2022 · 4 comments

Comments

@pacak
Copy link
Owner

pacak commented Nov 21, 2022

https://uica.uops.info/

@PSeitz
Copy link

PSeitz commented Feb 13, 2023

Awesome that support for llvm-mca has been added

Could uica also be supported? (via their cli tool https://github.com/andreas-abel/uiCA)

@pacak
Copy link
Owner Author

pacak commented Feb 14, 2023

Supporting it means approximately those steps:

  1. figuring out what we want to pass to it - already implemented
  2. preparing an foo.s file with just that function - can be easy but might be annoying to deal with other platforms
  3. compiling the file to make foo.o file - as foo.s foo.o on Linux, not sure about other platforms
  4. calling ./uiCA.py foo.o $ARGS - again on Linux, not sure what's involved on other platforms, probably assuming uiCA.py being in $PATH can be enough.

As a result I can easily support Linux but with MacOS/Windows it will be a situation similar to #137.

One other option is to provide a way to dump a function with unmangled names so uiCA or any other tool can be used with a simple script that would first call cargo-show-asm and then do whatever.

Third way that might work is doing a POST request to the url I posted but this means more dependencies and potentially leaking users code which is not good.

I guess I'll see how far doing it the right way gets me... What platform are you on?

@PSeitz
Copy link

PSeitz commented Feb 15, 2023

I'm on Linux, which is I guess a common platform to do that kind of performance analysis.
Wouldn't rust's cross compilation help for other platforms? #137

  1. preparing an foo.s file with just that function - can be easy but might be annoying to deal with other platforms

How does that work with function calls, when something is not inlined?

@pacak
Copy link
Owner Author

pacak commented Feb 15, 2023

I'm on Linux, which is I guess a common platform to do that kind of performance analysis.

There are tickets about MacOS/Windows too. Anyway, I'll see how far I can get this on Linux. Fairly low priority right now though.

Wouldn't rust's cross compilation help for other platforms? #137

It will help to generate the code (alternatively I can copy paste them from dumps in CI), but I still need to deal with platform specific differences to how functions are exported - how to detect them, etc. More about lack of motivation for going into platform specific gory details for a very niche edge case.

How does that work with function calls, when something is not inlined?

It does not work at the moment. This kind of analysis makes sense for really hot loops and having an uninlined function call in the middle of it seems like a great candidate for a fix.

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

No branches or pull requests

2 participants