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

Definition of latency #6

Closed
travisdowns opened this issue Jun 20, 2019 · 6 comments
Closed

Definition of latency #6

travisdowns opened this issue Jun 20, 2019 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@travisdowns
Copy link

What is the definition of latency that you want to use exactly?

In particular, consider a hypothetical operation foo arg1, arg2, arg3 which is 3p0. This uop will have a throughput of 3 due to p0 pressure. Can this op have any latency less than 3? I think yes.

For example, the op might only have a 1 cycle delay from arg2->arg1, because the two uops only uses arg3, and then the second uop uses arg2 and arg3.

However testing back-to-back foo ops will never show it because of the throughput limit. I think you are probably well aware of this since I notice lots of filler uops in tests, like:

   0:	c4 42 38 f2 ca       	andn   r9d,r8d,r10d
   5:	4d 63 c1             	movsxd r8,r9d
   8:	4d 63 c8             	movsxd r9,r8d
   b:	4d 63 c1             	movsxd r8,r9d

All the movsxd given enough breathing room to avoid lots of problems of this type.

However, consider gathers. For 1->1 latency testing this is used:

vpgatherdd ymm0,DWORD PTR [r14+ymm14*1],ymm1

No breathing room, so all these results just end up reporting the throughput number (5 in this case).

The following test:

vpgatherdd ymm0,DWORD PTR [r14+ymm14*1],ymm1
vpor ymm0,ymm0,ymm0
vpor ymm0,ymm0,ymm0
vpor ymm0,ymm0,ymm0
vpor ymm0,ymm0,ymm0

also runs in 5 cycles, so we see the true 1->1 latency is 1 cycle.

@andreas-abel andreas-abel added the bug Something isn't working label Jun 24, 2019
@andreas-abel andreas-abel self-assigned this Jun 24, 2019
@andreas-abel
Copy link
Owner

This should be fixed with the latest update.

@travisdowns
Copy link
Author

Thanks!

In general would we expect the number on uops.info to be updated with each nanobench update? I assume you may not have access to all the machines, so I'm not sure.

@andreas-abel
Copy link
Owner

I currently do have access to all the machines, so I re-ran the tests on all of them. However, there is no guarantee that this will still be the case with future updates.

@travisdowns
Copy link
Author

Thanks, is there a place in the uops.info output we can look to see which version/build of nanobench was used?

@andreas-abel
Copy link
Owner

No. However, the XML file contains the date when it was generated, which should make it possible to find the corresponding version.

Also, I should point out that nanoBench is just the tool that runs the microbenchmarks. The tool that generates them is not public yet. With "update" above I was referring to the update of the website.

@travisdowns
Copy link
Author

travisdowns commented Nov 8, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants