La biblioteca AMD causa un bajo rendimiento de los procesadores AMD en Cyberpunk 2077







Después del lanzamiento de Cyberpunk 2077, los usuarios de procesadores AMD notaron que el juego no estaba utilizando completamente todos los núcleos lógicos. Se veía así:













« » , 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;
}
      
      





, AMD, , , , . , ( ):







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!



, , .







, :







Los proyectos son tan grandes que a menudo se pierde mucho y los desarrolladores ya no los controlan. Los desarrolladores cometen tales errores porque una empresa solo puede tener dos o tres configuraciones de computadora típicas para probar un juego y, según entendemos, no cubren toda la variedad de configuraciones posibles. Además, existe el llamado síndrome "Simplemente hago mi trabajo (en una pieza pequeña, pero no me importa el resto)". En teoría, todos los "bajíos" se pueden corregir mediante esquemas de control competentes, pero en el contexto de los requisitos y el mercado en constante cambio, tenemos lo que tenemos.



All Articles