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

benchdnn and rdpmc #127

Closed
kruus opened this issue Sep 22, 2017 · 3 comments
Closed

benchdnn and rdpmc #127

kruus opened this issue Sep 22, 2017 · 3 comments
Labels
bug A confirmed library bug

Comments

@kruus
Copy link
Contributor

kruus commented Sep 22, 2017

I set out this week to run (and then, of course, port) benchdnn/ timings.
executing the rdpmc instruction was always segfaulting for me on Ubuntu 16.04,
kernel 4.4.0-93-generic.

I worked around by following kernel tools "perf" code. After opening a fd and mmap,
the rdpmc instruction was OK to use, and gave reasonable timing values.

Q1: Is there a reason to avoid usual rdtsc (optionally w/ cpuid to flush pipeline)?
Q2: Is there simpler "magic" to get rdpmc to work? (after all, I do not really even have
to use the mmaped page, because you're using the 'magic number' approach in your
rdpmc routine.)

Note3: If you did want to use the mmap'ed perf page, it seems it gives you the wall-time
conversion algorithm for free.

@vpirogov
Copy link
Member

I'm summoning @emfomenk to this thread.

@kruus
Copy link
Contributor Author

kruus commented Sep 25, 2017

Well, benchdnn compiling but segfaulting on some linux systems might be a bug. Granted it is not critical, because it is in a tests/benchdnn/ subdirectory and can be fixed in several ways.

@vpirogov vpirogov added bug A confirmed library bug and removed question labels Sep 25, 2017
@vpirogov
Copy link
Member

Fixed in 8d9fa58

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

No branches or pull requests

2 participants