num_cpu_cores#

ivy.num_cpu_cores(*, logical=True)[source]#

Determine the number of cores available in the cpu.

Parameters:

logical (bool) – Whether request is for number of physical or logical cores available in CPU (default: True)

Return type:

int

Returns:

ret – Number of cores available in CPU

Examples

>>> print(ivy.num_cpu_cores(logical=False))
2