No, not all PCIe versions have to be identical.
No, not all PCIe versions have to be identical.
With a PCIe 4.0 GPU paired with a PCIe 3.0 SSD, your GPU should operate at 4.0. If you use a PCIe 4.0 GPU alongside a 4.0 SSD and a 3.0 SSD, the GPU will run at 4.0 while both SSDs function at their respective speeds. The importance of matching PCIe versions across devices is not critical for performance.
It doesn't have to be identical on all devices. The device functions based on the PCIe version connected to it.
If a device uses PCIe 4 but is inserted into a PCIe 3 slot, it will operate at PCIe 3 speeds.
The same applies to the GPU—just because an SSD uses PCIe 3 doesn't restrict the GPU to PCIe 3 unless it's in a PCIe 3 slot.
With two SSDs, using both PCIe 3 and 4, they function according to their respective versions; they don’t need to run on the same PCIe type. A PCIe 3 SSD paired with a PCIe 4 SSD will operate at their own speeds and won’t be constrained to PCIe 3 unless the motherboard slot is PCIe 3.
Also remember: inserting a PCIe 3 device into a PCIe 4 slot will cause it to run at PCIe 3 speeds. The principle is that the slower of the two (device or slot) determines the speed it uses.
For certainty about the outcome, it's wise to consult your motherboard manual closely, or share the precise model for guidance. I haven't encountered a board where a 3.0 drive compels a 4.0 graphics card into 3.0, though I've seen cases where lane counts are reduced from x16 to x8.