total_mem_on_dev#

ivy.total_mem_on_dev(device, /)[source]#

Get the total amount of memory (in GB) for a given device string. In case of CPU, the total RAM is returned.

Parameters:

device (Union[Device, NativeDevice]) – The device string to convert to native device handle.

Return type:

float

Returns:

ret – The total memory on the device in GB.

Examples

>>> x = ivy.total_mem_on_dev("cpu")
>>> print(x)
53.66700032
>>> x = ivy.total_mem_on_dev("gpu:0")
>>> print(x)
8.589934592