added parameter num_threads to control the maximum number of threads to be used in autotuning node