mirror of
https://github.com/amd/blis.git
synced 2026-07-14 11:07:11 +00:00
-In multi-threaded cases if a packed/close pattern thread to core binding is used (e.g.: OMP_PROC_BIND=close and OMP_PLACES=core|threads), LPGEMM (OMP framework) launches threads such that threads with adjacent id's are bound to nearby (even adjacent) cores. Depending on the processor architecture, multiple threads with adjacent id's can be bound to cores sharing the same last level cache. However it was observed that when these threads (with adjacent id's) access the B reorder buffer, the last level cache access was suboptimal. This can be attributed to the per thread reorder buffer block accesses and how it maps to the last level cache. -In these cases, m is small (<= 4 * MR) and n value is such that number of NR blocks (n/NR) is less than available threads nt (like < 0.5 * nt). In such cases, id's of the threads can be modified such that the number of threads with adjacent id's bound to the last level cache can be reduced. This looks similar to the spread pattern used in thread to core binding. This reduces the load on last level cache due to reorder buffer access and improves performance in these cases. A heuristic method is used to detect whether thread to core binding follows close pattern before applying the thread id modifications. AMD-Internal: [SWLCSG-3185] Change-Id: Ie3c87d56e0f7b59161a381f382cf4e2d5d02a591