It’s been nearly one year that AMDGPU patches have been around to better handle GPU hot unplugging on Linux. The use-case for that being either removal via sysfs such as if then assigning the GPU to a VM or for external GPUs such as connected via Thunderbolt. Those patches are still baking but the latest iteration of the work has now been published by AMD…
Source: Phoronix – 2021 Could Be The Year That AMD Radeon Graphics Can Hot Unplug Gracefully On Linux