These patches exposed a lot of problems in the AMD toolchain. Rather
than keep it broken we should revert it to its old semi-functional
state. This will prevent us from using device destructors but should
remove some new bugs. In the future this interface should be changed
once these problems are addressed more correctly.
This reverts commit ed0f21811544320f829124efbb6a38ee12eb9155.
This reverts commit 2b7203a35972e98b8521f92d2791043dc539ae88.
Fixes #57536