Function mindspore::dataset::config::set_num_parallel_workers

Function Documentation

bool mindspore::dataset::config::set_num_parallel_workers(int32_t num_parallel_workers)

A function to set the default number of parallel workers.

Example
// Set a new global configuration value for the number of parallel workers.
// Now parallel dataset operations will run with 16 workers.
bool rc = config::set_num_parallel_workers(16);

参数

num_parallel_workers[in] Number of parallel workers to be used as the default for each operation.

返回

The workers is set successfully or not.