I literally just built my Ryzen system this past weekend and I've had a similar problem... after 5 min or so of gameplay mine would freeze for about a full min or so and then resume. This took me a few days to iron out how to fix it, but I've since recorded 3 videos up to 20 min long without any freezes so I think it's pretty safe to report my findings.
Example the game of freezing at 1:29 in this video:
[video="https://www.youtube.com/watch?v=9g3BkDZMta4"][/video]
Open NVIDIA Control Panel (right-click mouse on Desktop to select it) and then within "Global Settings," make sure these changes are applied:
• CUDA - GPUs set to "All"
• Maximum pre-rendered frames, set to "4"
• Multi-display/mixed-GPU acceleration set to "Single display performance mode"
• Power management mode set to "Prefer Maximum Performance"
• Threaded optimization set to "On"
• In the left panel under Configure Surround PhysX, specifically set it to your current GPU
And here is what could possibly be the most important thing to do: Place Grand Theft Auto V game folder and files on the same drive as Rockstar Social Club! For me, it is on my 250GB Samsung 960 EVO M.2 NVMe SSD which is superfast and what I think ultimately stopped the freezing altogether.
My computer components:
AMD RYZEN 7 1700 8-Core overclocked to 3.8GHz @ 1.35V
GIGABYTE AORUS GA-AX370-Gaming K7 mobo
SAMSUNG 960 EVO M.2 250GB NVMe PCI-Express 3.0 x4 Internal Solid State Drive (SSD)
EVGA SuperNOVA 750 G3 PSU
CORSAIR Vengeance LPX 16GB (2 x 8GB) 288-Pin DDR4 SDRAM DDR4 2666
EVGA GeForce GTX 1070 SC GAMING ACX 3.0 Black Edition