Revert "Revert "use ctx rather than device""
Revert "Revert "use ctx rather than device""

This reverts commit 3f1f83d203467dedd55e9f3c6a64c8f68f1067c2.

ROCmSoftwarePlatform/MIOpen,ROCmSoftwarePlatform/MIOpen,ROCmSoftwarePlatform/MIOpen,ROCmSoftwarePlatform/MIOpen,ROCmSoftwarePlatform/MIOpen