I got different errors:
multiple definition of `omp_get_place_num'
FAILED: bin/dead_code_elim_test 
: && /usr/bin/c++  -fvisibility-inlines-hidden -fopenmp -DUSE_FBGEMM -O2 -fPIC -Wno-narrowing -Wall -Wextra -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -DHAVE_AVX_CPU_DEFINITION -DHAVE_AVX2_CPU_DEFINITION -O3  -rdynamic -L/usr/lib -pthread caffe2/CMakeFiles/dead_code_elim_test.dir/opt/dead_code_elim_test.cc.o  -o bin/dead_code_elim_test -L/media/jintain/sg/ai/libs/pytorch/third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.3.20190220/lib -Wl,-rpath,/media/jintain/sg/ai/libs/pytorch/third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.3.20190220/lib:/media/jintain/sg/ai/libs/pytorch/build_libtorch/build/lib:/usr/local/cuda/lib64: lib/libgtest_main.a -Wl,--no-as-needed,/media/jintain/sg/ai/libs/pytorch/build_libtorch/build/lib/libtorch.so -Wl,--as-needed lib/libprotobuf.a /usr/lib/x86_64-linux-gnu/libiomp5.so lib/libmkldnn.a -lmklml_intel ../../third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.3.20190220/lib/libiomp5.so lib/libc10_cuda.so lib/libc10.so /usr/local/cuda/lib64/libnvToolsExt.so /usr/local/cuda/lib64/libcudart.so /usr/local/cuda/lib64/libcufft.so /usr/local/cuda/lib64/libcurand.so /usr/local/cuda/lib64/libcudnn.so.7 /usr/local/cuda/lib64/libcublas.so lib/libgtest.a -lpthread && :
../../third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.3.20190220/lib/libiomp5.so:(*IND*+0x0): multiple definition of `omp_get_place_num'
../../third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.3.20190220/lib/libiomp5.so:(*IND*+0x0): multiple definition of `omp_get_partition_num_places'
../../third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.3.20190220/lib/libiomp5.so:(*IND*+0x0): multiple definition of `omp_get_partition_place_nums'
../../third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.3.20190220/lib/libiomp5.so:(*IND*+0x0): multiple definition of `omp_get_max_task_priority_'
../../third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.3.20190220/lib/libiomp5.so:(*IND*+0x0): multiple definition of `omp_get_place_num_procs'
../../third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.3.20190220/lib/libiomp5.so:(*IND*+0x0): multiple definition of `omp_get_num_places_'
../../third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.3.20190220/lib/libiomp5.so:(*IND*+0x0): multiple definition of `omp_get_place_proc_ids_'
../../third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.3.20190220/lib/libiomp5.so:(*IND*+0x0): multiple definition of `omp_get_place_num_procs_'
../../third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.3.20190220/lib/libiomp5.so:(*IND*+0x0): multiple definition of `omp_get_partition_place_nums_'
../../third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.3.20190220/lib/libiomp5.so:(*IND*+0x0): multiple definition of `omp_get_partition_num_places_'
../../third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.3.20190220/lib/libiomp5.so:(*IND*+0x0): multiple definition of `omp_get_max_task_priority'
../../third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.3.20190220/lib/libiomp5.so:(*IND*+0x0): multiple definition of `omp_get_place_num_'
../../third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.3.20190220/lib/libiomp5.so:(*IND*+0x0): multiple definition of `omp_get_num_places'
../../third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.3.20190220/lib/libiomp5.so:(*IND*+0x0): multiple definition of `omp_get_place_proc_ids'
collect2: error: ld returned 1 exit status
[2297/2451] Linking CXX executable bin/event_gpu_test