
Cyberpunk 2077のリリース後、AMDプロセッサのユーザーは、ゲームがすべての論理コアを完全に利用しているわけではないことに気づきました。それはこのように見えました:

« » , Intel C++, , (AMD) - SIMD. Visual Studio. , , AMD — , AMD , Bulldozer, .
AMD GPUOpen cpu-core-counts, :
// This advice is specific to AMD processors and is
// not general guidance for all processor
// manufacturers. Remember to profile!
DWORD getDefaultThreadCount() {
DWORD cores, logical;
getProcessorCount(cores, logical);
DWORD count = logical;
char vendor[13];
getCpuidVendor(vendor);
if (0 == strcmp(vendor, "AuthenticAMD")) {
if (0x15 == getCpuidFamily()) {
// AMD "Bulldozer" family microarchitecture
count = logical;
}
else {
count = cores;
}
}
return count;
}
Ryzen SMT , . , , - .
Bulldozer . (Intel) .
, , . [ ], Ryzen :getDefaultThreadCount()
, , .
For today’s Ryzen processors with SMT enabled, we’ve found that the vast majority of multithreaded games and applications work and scale really well when managing an active thread pool up to the number of logical cores that the processor supports. However, our experience with a small number of games is that driving a hardware thread pool with more than the number of physical cores can reduce performance, primarily due to contention for available per-core resources by the multiple running hardware threads.
However, for our own prior generation of Bulldozer-based processors designs, we recommend a default thread count equal to the number of logical processor cores. Other processor vendors are encouraged to provide their own guidance to software developers. AMD does not provide guidance for other processor vendors.
Therefore no matter the processor or processor vendor, we strongly recommend that you profile your games extensively to make a decision on how to manage your thread pool for the processor designs you’ll find your game code running on. Our sample code, linked below, errs on the side of caution for our Ryzen processors and encourages you to profile: the getDefaultThreadCount() function draws attention to that fact, returning a starting default count equal to the number of physical processor cores on Ryzen.
, . , , , . , SMT , TLB, . , « », SMT, .
AMD . , , , . , (CDPR) , .
, , , , SMT . AMD , SMT . , , , .
getDefaultThreadCount()
Ryzen 5 1600 60% 85%, Ryzen 5 1400 60% 90%.
, AMD - Intel. "" AMD. , getDefaultThreadCount()
1
, AMD, Remember to profile!
, , .
, :
プロジェクトは非常に大きいため、多くの場合、多くが失われ、開発者によって制御されなくなります。開発者は、ゲームをテストするための一般的なコンピューター構成を2つか3つしか持てず、私たちが理解しているように、考えられるさまざまな構成のすべてを網羅しているわけではないため、このような間違いを犯します。さらに、いわゆる症候群があります。「私は自分の仕事をするだけです(小さな部分で、残りは気にしません)」。理論的には、すべての「浅瀬」は有能な制御スキームによって修正できますが、絶えず変化する要件と市場のコンテキストでは、私たちが持っているものがあります。