Python multiprocessing: restrict number of cores used

后端 未结 5 1420
忘掉有多难
忘掉有多难 2020-12-25 08:46

I want to know how to distribute N independent tasks to exactly M processors on a machine that has L cores, where L>M. I don\'t want to use all the processors because I sti

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-25 09:32

    you might try using pypar module. I am not sure how to use affinity to set cpu affinity of to a certain core using affinity

提交回复
热议问题