Monday, December 14th 2020

Cyberpunk 2077 Does Not Leverage SMT on AMD Ryzen, Lower Core-Count Variants take a Bigger Hit, Proof Included

Cyberpunk 2077 does not leverage simultaneous multi-threading (SMT) on AMD Ryzen processors, according to multiple technical reviews of the game that tested it with various processors. The game does leverage the analogous HyperThreading feature on rival Intel Core processors. While this doesn't adversely affect performance of higher core-count Ryzen chips, such as the 16-core Ryzen 9 5950X or to a lesser extent the 12-core 5900X, lower core-count variants such as the 6-core 5600X take a definite performance hit, with PCGH reporting that a Ryzen 5 5600X is now matched by a Core i5-10400F, as the game is able to take advantage of HyperThreading and deal with 12 logical processors on the Intel chip, while ignoring SMT on the AMD one.

CD Projekt RED may have bigger problems on its hands than performance optimization for a PC processor, such as the game being riddled with glaring performance issues on consoles; but in the meantime, the PC enthusiast community swung to action with a fix. Authored by chaosxk on Reddit, it involves manually editing the executable binaries of the game using a Hex Editor, which tricks the game into using logical processors as cores. This fix has been found to improve frame-rates on AMD Ryzen machines. Before attempting the hex edit, make sure you back up your original executables. The screenshot below provides a before & after-patch view of Cyberpunk 2077 loading a Ryzen 9 5950X. You can learn more about this fix, and a step-by-step guide here.

Update 08:28 UTC: We have some technical details on what's happening.

A Reddit post by CookiePLMonster sheds light on what is possibly happening with the game. According to them, Cyberpunk 2077 reuses AMD GPUOpen pseudo-code to optimize its scheduler for the processor. It was originally designed to let an application use more threads when an AMD "Bulldozer" processor is used; but has the opposite effect when a non-Bulldozer AMD processor is detected. The game looks for "AuthenticAMD" processor brand, and "family = 0x15" (AMD K15 or Bulldozer/derivative), and only then engages "logical processors" (as identified by Windows OS scheduler as part of its Bulldozer-optimization). When any other, including a newer AMD processor is detected, the code makes the game scheduler only send traffic to the physical cores, and not to their logical processors.

Our own W1zzard dug into the binaries to verify these claims, find a commented decompilation below. The game indeed uses this archaic GPUOpen code from 2017 to identify AMD processors, and this is responsible for its sub-optimal performance with AMD Ryzen processors. This clearly looks like a bug or oversight, not like it's intentional.
Sources: chaosxk (Reddit), BramblexD (Reddit), PCGH, VideoCardz, CookiePLMonster (Reddit)
Add your own comment

84 Comments on Cyberpunk 2077 Does Not Leverage SMT on AMD Ryzen, Lower Core-Count Variants take a Bigger Hit, Proof Included

#2
ViperXTR
Tested it in the cyberpunk thread as well and great benefits on a low core count of my Ryzen 3 3300X
Posted on Reply
#3
windwhirl
There were some comments of Intel's Compiler being involved in these shenanigans, again.

Can't help but think they're onto something.
Posted on Reply
#4
biffzinker
windwhirlThere were some comments of Intel's Compiler being involved in these shenanigans, again.

Can't help but think they're onto something.
The most likely reason is it targeted Bulldozer back when the game was in early development I had read.
Posted on Reply
#5
R0H1T
But Bulldozer was promoting usage of more cores, even when everyone else was hyping the next Intel *well on the roadmap!
Posted on Reply
#6
BigBonedCartman
Three delays later and this game is still having issues... when did Bethesda rename itself CD Projekt Red?
Posted on Reply
#7
Metroid
How in the earth this AAA game has still not been updated for the new ryzen cpus?
Posted on Reply
#8
Xzibit
I guess 3 delays wasn't the charm
Posted on Reply
#9
biffzinker
R0H1TBut Bulldozer was promoting usage of more cores, even when everyone else was hyping the next Intel *well on the roadmap!
Maybe there was a performance impact to Bulldozers usage of SMT with the shared module core design?
Posted on Reply
#10
Crackong
So,

it does not support SMT on Ryzen CPU.
it does not support DXR on RX6000 GPU
Posted on Reply
#11
Oberon
biffzinkerMaybe there was a performance impact to Bulldozers usage of SMT with the shared module core design?
The issue is that CDPR lifted a method from GPUOpen that was only supposed to serve as an example of how to manage your thread pool in games which didn't scale well with SMT on Zen 1 (recall that Bulldozer does not feature SMT.) The guidance accompanying the method explicitly advises developers to profile their code and determine the best way to configure the thread pool for their particular application. CDPR just used the example unchanged, so non-Bulldozer processors from AMD now don't get SMT support (until they patch it or you patch it yourself.)

Reference: gpuopen.com/learn/cpu-core-count-detection-windows/
Posted on Reply
#12
thesmokingman
biffzinkerApparently it’s early code that targeted Bulldozer.
That's pretty freaking sad yet very hilarious at the same time. CDPR kind dropped down a few pegs on this.
Posted on Reply
#13
z1n0x
CDPR have SO MUCH WORK infront of them. It's both funny and sad to me, that after all those years (8?) of development this is what we've got.
Posted on Reply
#14
_Flare
the code says something like:
if AuthenticAMD than:kookoo: then use this
if (Bulldozer than Threadcount=logical)
if not (than threadcount=corecount)

yeah it´s from 2017 when Win10 didn´t have its threading optimizations, so eventually it´s very dull to make anything like this, every game should get all logical threads, in some very old code or rare cornercases it can be manually fixed with affinity in taskmanager or SMT turned off, but in general that part of the 2017 code is idiotic now.
Should only take a couple of minutes/seconds to fix.
Posted on Reply
#16
Caring1
_Flarethe code says
if AuthenticAMD than use this
Than ≠ Then.
Posted on Reply
#20
robot zombie
It made a pretty big difference with my 3900x even! Worth a try with the dual-chippies. No friggin joke, I was pushing 30-40 in some spots. After patching, the minimum I see is a flat 60, and more often it hangs between 70 and 90, which it never did before the patch. This is high settings + contact shadows enabled with an RTX 2060 driving a 1080p display. I'd say that's actually pretty good for a new game! SOTTR wasn't much better on this system, and that's yesterday's news at this point. This card was basically a brand new midrange choice at that time. Soon, it's going to be approaching entry-level.

And yeah... the launch really is a mess. I seem to be a lucky one with just 1 non-replicable crash in 30 hours of play, and no game breaking bugs... and now, I'm getting performance I'd expect from any other modern game on this setup. Smooth and consistent, generally looking good. But I do see a lot of the bugs and hitches, too. And then there are other things that probably/definitely are not bugs but should be changed and probably WERE flagged during playtesting but never picked-up by debuggers and tweakers.

Just be glad there's a modding community for this game, gonna need it. :laugh:

It was an absurdly ambitious product with a lot of hype... pressures coming from every angle. You can bet it was running hot as hell in their offices. Seems like they made a ton of upgrades to their REDengine. We're on version 4 now. You'd figure this would be the FIRST phase in the project, but that's assuming the best of planning, which tends to go out the window with high confidence and ambition. They'd just had Witcher effin 3 bagged! Of course they'd have high expectations for this project. They peaked K2. But then... as the project grows and new things are brought in, changes to the engine have to happen. More cooks in the kitchen, too. Lots telephone games... yadda yadda.

This probably HAD to be the year for them. The way funding works, who knows? Maybe money said no go on the holdout, has to be here THIS year, by Christmas for the new consoles. Mid/late fall is already prime time, but the console multiplier changes everything, not to mention deals with Nvidia. Otherwise, that leaves next fall. They could drop it in spring/summer but there are huge slumps in sales then, so they would be waiting a full year to drop it. And by then, who knows what they're competing with? They might just have an idea that we don't being on the outside.

Would it have needed that whole year of waiting for the next prime window? How badly would it have hurt them financially to have this thing gathering dust in the back for that much longer? You know? Easy to think in ideals, but it's not always so easy when you're actually in it. This opportunity wouldn't have come again for years. It was the highest paying bet they could've taken. And apperently they needed to take it. If they didn't, there would be no crunching. There'd have been no yes-men working internally to convince the people actually okaying the public messages on progress that what they were saying was true. This is the kind of stuff you get when plans go wrong and things/cash aren't where they are supposed to be.

I think whenever you try to do a game like this, it's inevitably gonna be a mess. It's just a question of how it bubbles up. I think they had to have botched it at least a little on the management side. I promise you, they know most of the issues we are seeing now. They just weren't coordinated enough to squeeze it out in time. And time is critical. Some games can launch on down times and it's fine. Just make what you're gonna make and get the money going as soon as it is ready. But a game of this magnitude... no. It needs to be among the most successful of games to come out not just then, but in the surrounding years! Otherwise, it might not turn over enough for future projects that are likely already on the cutting board, people get screwed, your studio hurts big time... it's just not good. That's leaving out contracts with big names, too. MUCHO no bueno. It would not be out in this state if these things weren't inescapable facts of life for game studios, big and small.

I mean... think about it. How bad does the alternative have to be in order for a major studio to release a game in this state?

Take your pick on who or what is to blame. Management for setting bad goals and missing them? Suits, for spending as much as they did on marketing and probably contributing a lot to things like hiring a top-level actor to feature as a main? Fate for making weird things go wrong that are harder to fix than could reasonably be anticipated? Markets for creating situations where timing is make or break, down to the year of launch? It's all there. Another great game held back by a bad launch. Another victim of that gumbo of bad corporate norms, cut-throat sales markets, and irresponsible people in the wrong positions.

Still an all-around great game and likely a very important one for the lexicon. I'm sure it will still go well for them. Hopefully it won't be *too* long before everyone can fully enjoy it as intended.
Posted on Reply
#21
turbogear
CrackongSo,

it does not support SMT on Ryzen CPU.
it does not support DXR on RX6000 GPU
Yes really annoying and kind of sounds like consepercy theory. :(
I have both 5800x and 6800XT and bought Cyberpunk.
Ryzen has been out for ages now and they support only Buldozer.:banghead:

I played so far only 1hour and now I think I made mistake to buy this game so early. :shadedshu:

I loved Witcher games but seeing these issues they currently have with Cyberpunk no wonder they delayed it multiple times.

I will try the workaround and see how that helps.
Posted on Reply
#22
randomUser
You can "return" the game and receive a refund if you havent played 2 hours, as far as i know.
Posted on Reply
#23
Lionheart
turbogearYes really annoying and kind of sounds like consepercy theory. :(
I have both 5800x and 6800XT and bought Cyberpunk.
Ryzen has been out for ages now and they support only Buldozer.:banghead:

I played so far only 1hour and now I think I made mistake to buy this game so early. :shadedshu:

I loved Witcher games but seeing these issues they currently have with Cyberpunk no wonder they delayed it multiple times.

I will try the workaround and see how that helps.
Demand a refund & just wait another 8years until the game is fixed. ;)
Posted on Reply
#24
Keemzay
ViperXTRTested it in the cyberpunk thread as well and great benefits on a low core count of my Ryzen 3 3300X
how much does it benefit it by? What's the lowest frames that you are getting?
Posted on Reply
#25
repman244
The sad part is that the game cannot be fixed, bugs yes but the game itself is unfixable IMO...but some people still think it's a matter of a DLC and all is ok.
Posted on Reply
Add your own comment
Dec 15th, 2024 21:40 EST change timezone

New Forum Posts

Popular Reviews

Controversial News Posts