examples icon indicating copy to clipboard operation
examples copied to clipboard

OMP_NUM_THREADS=1

Open thatguymike opened this issue 10 years ago • 2 comments

Bad form to need to set magic envvars. I know in Torch there was an issue with other packages going funny, but seems to matter less in pytorch. If that is standard practice, we should do omp_set_num_threads(1) in the code unless overridden by the user.

thatguymike avatar Nov 15 '16 01:11 thatguymike

100% agree. I think the OMP_NUM_THREADS=1 might not be necessary anymore. There used to be a bug where the multi-process data loader would spawn lots of OpenMP threads, but I think that's fixed now (https://github.com/pytorch/pytorch/issues/81 and https://github.com/pytorch/pytorch/issues/82)

colesbury avatar Nov 15 '16 01:11 colesbury

README fixed now as well

soumith avatar Dec 30 '16 16:12 soumith