Skip to main content

get_device_attr

Function get_device_attr 

Source
pub fn get_device_attr(device: DLDevice, name: &str) -> Result<Option<Any>>
Expand description

Return the attribute name of device, such as exist or max_threads_per_block, or None when the device does not report it (runtime.GetDeviceAttr).

ยงErrors

Returns an error if the runtime of the device is not enabled and name is not exist, which is then false.