split_factor#
- ivy.split_factor(device=None, /)[source]#
Get a device’s global split factor, which can be used to scale the device’s batch splitting chunk sizes across the codebase.
- If the global split factor is set for a given device,
returns the split factor value for the device from the split factors dictionary
- If the global split factor for a device is not configured,
returns the default value which is 0.0
- Parameters:
device (
Optional
[Union
[Device
,NativeDevice
]], default:None
) – The device to query the split factor for. Sets the default device by default.- Return type:
float
- Returns:
ret – The split factor for the specified device.
Examples
>>> x = ivy.split_factor() >>> print(x) 0.0
>>> y = ivy.split_factor("gpu:0") >>> print(y) 0.0