Replace QPI hardcoded in strings with QPI or UPI detected at runtime
- Dominant language
- C++
- Stars
- 3.3k
- Forks
- 528
- Avg merge
- 1h 40m
- Merged PRs (30d)
- 2
Description
On a system with Skylake CPUs, the inter-socket interface is called UPI, but pcm.x still prints some messages calling it QPI like this:
`Max QPI link 0 speed: 23.3 GBytes/second (10.4 GT/second)
`
Other prints refer to it as UPI:
```
Intel(r) UPI data traffic estimation in bytes (data traffic coming to CPU/socket through UPI links):
Total UPI outgoing data and non-data traffic: 22 M
```
**Suggestion**
Any print that still has QPI hardcoded like:
` std::cerr << "Max QPI speed: " << max_qpi_speed / (1e9) << " GBytes/second (" << max_qpi_speed / (1e9*getBytesPerLinkTransfer()) << " GT/second)" << std::endl;
`
should use m->xPI() like this:
` cout << "\n" << "Intel(r) "<< m->xPI() <<" data traffic estimation in bytes (data traffic coming to CPU/socket through "<< m->xPI() <<" links):" << "\n" << "\n";
`
to print the right name based on the CPU:
```
const char * xPI() const
{
if (hasUPI())
return "UPI";
return "QPI";
}
```
Contributor guide
Assessment
This issue has not been assessed yet.