cancel
Showing results for 
Search instead for 
Did you mean: 

Processors

disks86
Journeyman III
Journeyman III

Ryzen Platform Optimization

Has anyone seen any documentation about optimizing for the Ryzen CPU platform? Specifically I'm interested in C++ and any information about the performance characteristics of instructions on the platform.

0 Kudos
7 Replies
gc9
Adept III
Adept III

Re: Ryzen Platform Optimization

Even AMD is still measuring and learning.   In lieu of documentation...

Maybe a tool like AIDA can list instruction latencies?

https://forums.anandtech.com/threads/ryzen-strictly-technical.2500572/page-2#post-38770708

(links to old data from an early engineering sample at http://users.atw.hu/instlatx64/AuthenticAMD0800F00_K17_Zen_InstLatX64.txt)

(But there have been reports/rumors that AIDA was not measuring cache timing correctly, perhaps due to differing latencies depending on the relative location of the CCX or Core with the cache line, or due to cache-line clearing optimizations.)

For optimizing code, ideas from the GDC 2017 talk on Optimizing for Ryzen

https://forums.anandtech.com/threads/ryzen-strictly-technical.2500572/page-19#post-38787469

(from http://www.4gamer.net/games/300/G030061/20170308070/ (ja))

(experiments might have been performed and slides written before final silicon was available)

http://www.4gamer.net/games/300/G030061/20170308070/

0 Kudos
gc9
Adept III
Adept III

Re: Ryzen Platform Optimization

The InstLatx64 site now has AIDA outputs from an AMD Ryzen 7 1800X for memory and instruction latency.  (Via an RWT forum post).

However, the output says it is from the aida_bench64.dll library version dated February 9.

So it might not use AIDA updates for Ryzen 7.  AIDA summarized changes forthcoming for Ryzen, as of March 4.

0 Kudos
kingfish
Esteemed Contributor III

Re: Ryzen Platform Optimization

0 Kudos
gc9
Adept III
Adept III

Re: Ryzen Platform Optimization

The InstLatx64 site has added AIDA outputs from an AMD Ryzen 7 1700X for memory and instruction latency.

The output says it is from the aida_bench64.dll library version dated March 17.

On March 28, AIDA announced version 5.90, claiming benchmarks were optimized for Ryzen, among other improvements.

The 7-cpu site offers some cache latency estimates for Ryzen, perhaps deduced from runs of their LZMA benchmark.
(It doesn't give measurements for different stride lengths as the AIDA memory test data does.)  (Via an RWT forum post.)

0 Kudos
janagewen
Challenger
Challenger

Re: Ryzen Platform Optimization

Hello disks86,

I know what you mean around AMD Ryzen processors, you are interested in the changes for Instruction Set Architectures and want to know the things related with optimising the codes to fully utilise its underlying microarchitecture. But at this moment there is nothing like that present, and there is no compilers designed or optimised exclusively for AMD Ryzen processor. I am also eager to know the detail information about the Microarchitecture resident under this newly coming processor too.

0 Kudos
gc9
Adept III
Adept III

Re: Ryzen Platform Optimization

The GPUOpen page for AMD's GDC 2017 Presentations now has a full set of slides from the Ken Mitchell and Eliot Kim GDC2017 presentation, Optimizing for AMD RYZEN™ CPU​.

  • Microarchitecture [slides overview caches, data paths, new instructions, performance counter domains]
  • Power Management [settings affect boost: windows 10 power management settings, profiling tool interval settings, BIOS settings]
  • Profiler: CodeXL [traditional sampling or Instruction-Based Sampling (fetch, or micro-op); PowerProfiler: frequency profiling and/or energy profiling]
  • Compiler [overview of MS Visual Studio compiler changes in recent years]
  • Concurrency [profile to decide where to use SMT; recommendation for number of contexts for D3D12 multithreading]
  • Shader Compiling [not during gameplay, use many threads, use shader caches]
  • Prefetch [avoid software prefetch, prevents loop unrolling in MSVS2015]
  • Data Cache [use structure of arrays, rather than array of structures, for denser data in cache and better prefetching.]
0 Kudos
logic
Adept II
Adept II

Re: Ryzen Platform Optimization

Project Mercury: Thread affinities to CCXs, SMT etc optimizations.  Very light weight/efficient.

http://www.techcenter.dk/

https://hardforum.com/threads/amd-ryzen-game-performance-fix.1926435/

AMD Ryzen Processor Optimization added to Cacheman 10.10:

https://www.techpowerup.com/232096/outertech-adds-amd-ryzen-processor-optimization-to-cacheman-10-10

Bitsum's Process Lasso: Optimize and automate process CPU affinities:

https://bitsum.com/

ie:  I dont know a damn thing about coding but the above coders do, so they, and what they have done may have/be some pointers for everyone.

The rules seem to be as follows:

  1. Keep threads from hopping from one CCX to the other and try to keep windows/OS on one CCX and the app or game on the other/s.
  2. Keep to one thread per physical core, until you run out of cores on a CCX. ie: Avoid SMT until you need to run more than 4 threads per CCX/app.
  3. Disable core parking. (Part of AMD's balanced power plan?)
0 Kudos