Remove usage of onEachDevice from legacy profiler (#54125)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/54125
Fixes https://github.com/pytorch/pytorch/issues/48987
Test Plan:
python setup.py clean
TORCH_CUDA_ARCH_LIST="6.0" USE_CUDA=1 USE_MKLDNN=1 BLAS=MKL BUILD_BINARY=1 python setup.py develop install --cmake 2>&1 | tee ~/output.txt
python test/test_profiler.py -v
python setup.py clean
USE_CUDA=0 USE_MKLDNN=1 BLAS=MKL BUILD_BINARY=1 python setup.py develop install --cmake 2>&1 | tee ~/output.txt
python test/test_profiler.py -v
+ CI
Reviewed By: rohan-varma
Differential Revision: D27109481
Pulled By: ilia-cher
fbshipit-source-id: 3fba8bc55deafeed1ab4680b311e927f40eaf99c