Check for CUDA Device Availability / Memory Scrubbing

Hi… I am stuck up with a simple problem … I am launching a kernel on to device, after the completion of that kernel I am freeing the device resources, after that I want to check that the device is available for the next run or not.
For the kernel launching I am using the CUDA Runtime API and for checking the device availability and memory scrubbing of device I am using CUDA Driver API.
I came across the NVML ( NVIDIA Management library ) trough which we can check for the device availability but again for device memory scrubbing I need to
use CUDA driver API or CUDA Runtime API. Can anyone help me to understand which way I need to proceed.