Ray tracing and AI-based upscaling are two entirely different things, but both AMD and Nvidia's GPUs have the hardware to accelerate everything to do with either of them. The key thing to note is the matter of concurrency: doing multiple things at the same time. In the case of Turing, each SM is limited to graphics and compute
or ray tracing
or tensor work; in Ampere, it's now graphics and compute; graphics and RT; compute and RT; graphics and tensor; or compute and tensor.
For RDNA 2, each dual compute unit (AMD's equivalent to Nvidia's SM), it's somewhere between Ampere and Turing, as tensor work would be classed as compute - and it handles this pretty well. I should have said that the if the SIMD32 is handling tensor work, it won't be doing anything else, rather than the CU - there are four SIMD32 units per dual CU, and they're independent of each other (so one can be doing tensor, while the others are doing graphics, for example).
The difference between them all lies in the execution of those workloads - in pure tensor work, Ampere rules the roost, thanks to its dedicated cores, but the actual amount of tensor stuff involved in DLSS isn't particularly big: it adds no more than 10% to the total frame load. It's also done either just before or after post-processing in the rendering pipeline (DLSS 1.0 was after, DLSS 2.0 is before), so the rest of the GPU won't be doing much anyway.
While Ampere's dedicated tensor cores are immensely powerful, they're barely used with DLSS. The performance gains generated by the process is down to rendering at a lower resolution; in fact, DLSS doesn't
have to use the tensor cores at all and it works
perfectly well just on the CUDA cores.
In theory, the same will be true of any AI-based upscaling system run on an RDNA 2 GPU. However, whereas Nvidia has committed considerable time and resources to producing the DNNs for developers to use in their games, AMD isn't offering much at all. DirectML offers everyone the tools to employ DNNs for upscaling, but that requires the developers to create them in the first place - something that Nvidia has done, but not AMD.
TL;DR = AMD's hardware is up to scratch; it's the software/developer support that needs more work.