我用的CPU是AMD 5975WX,显卡是4块4090。cuda版本为cuda12,pytoch版本为2.0

Then you should likely check with Supermicro if this is a supported setup. Manually fiddling with the ACS bit:
https://forums.developer.nvidia.com/t/multi-gpu-peer-to-peer-access-failing-on-tesla-k80/39748/15?u=generix