num_cpu_cores#
- ivy.num_cpu_cores(*, logical=True)[source]#
Determine the number of cores available in the cpu.
- Parameters:
logical (
bool
, default:True
) – Whether request is for number of physical or logical cores available in CPU- Return type:
int
- Returns:
ret – Number of cores available in CPU
Examples
>>> print(ivy.num_cpu_cores(logical=False)) 2