mindspore.runtime.dispatch_threads_num

View Source On AtomGit
mindspore.runtime.dispatch_threads_num(threads_num)[source]

The number of threads used by the runtime.

The framework sets the runtime number of threads to 5 by default.

Parameters

threads_num (int) – The threads number of runtime used.

Examples

>>> import mindspore as ms
>>> ms.set_device("Ascend", 1)
>>> ms.runtime.dispatch_threads_num(6)