mindspore.device_context.cpu.op_tuning.threads_num
- mindspore.device_context.cpu.op_tuning.threads_num(num)[source]
Set the threads number of CPU kernel used.
The framework set the threads number of CPU kernel used are
25
by default.- Parameters
num (int) – The threads number of CPU kernel used.
Examples
>>> import mindspore as ms >>> ms.set_device("Ascend", 1) >>> ms.device_context.cpu.op_tuning.threads_num(10)