Others with actual experience can comment, but my
guess is that, for most workstation tasks, the most powerful GPU setup currently available on a Mac would be a MacPro7,1 (2019 Intel Mac Pro) with
dual Radeon RX 6900XT's. That card should be supported in Sonoma:
https://support.apple.com/en-us/102363 You can look up the VRAM yourself if you're interested.
Exceptions would include those calculations that require more VRAM than those cards supply. For those, you'd obviously be better off with a 72-core M2 Ultra or 40-core M3 Max. You also need to consider whether you are doing a task that can benefit from the dedicated coprocessors in Apple Silicon. Those could well be faster on a 72-core M2 Ultra or 40-core M3 Max.
So you really should be much more specific about your intended use cases.
The chart below shows how a
single 6900XT compares on Geekbench 6 Metal with others, including the M2 Ultra.
For gaming, I think that depends on the game. For games that benefit from ray tracing, the 40-core M3 Max might be the fastest, since it's only the M3's that have hardware RT. Plus games can also stress the CPU, and the M3 Max's CPU is far faster than those on the Intel Mac Pro. Plus you're obviously more likely to have compatabilty with future games with an M3 than with an Intel MP. OTOH, with the MP, you could boot into Windows in Bootcamp, which allows you to play many more games natively (and that in turn helps with the performance).