Skip to main content

clear_provider

Function clear_provider 

Source
pub fn clear_provider()
Expand description

Clear the active provider selection without invalidating providers that own live handles.

Registered device owners are retained because a GpuTensorHandle may outlive its provider’s tenure as the global default. Removing its owner here would make that otherwise-valid handle impossible to gather or operate on. Tests that need a different default can safely call this function and register another provider; device ids keep the handle namespaces distinct.