1if(INTERN_BUILD_MOBILE) 2 caffe2_binary_target("speed_benchmark_torch.cc") 3 caffe2_binary_target("load_benchmark_torch.cc") 4 if(NOT BUILD_LITE_INTERPRETER) 5 caffe2_binary_target("compare_models_torch.cc") 6 endif() 7 return() 8endif() 9 10caffe2_binary_target("parallel_info.cc") 11target_include_directories(parallel_info PUBLIC 12 ${CMAKE_BINARY_DIR}/aten/src) # provides "ATen/TypeExtendedInterface.h" to ATen.h 13 14caffe2_binary_target("record_function_benchmark.cc") 15target_include_directories(record_function_benchmark PUBLIC 16 ${CMAKE_BINARY_DIR}/aten/src) 17 18caffe2_binary_target("speed_benchmark_torch.cc") 19caffe2_binary_target("compare_models_torch.cc") 20 21if(BUILD_TEST) 22 # Core overhead benchmark 23 caffe2_binary_target("core_overhead_benchmark.cc") 24 target_link_libraries(core_overhead_benchmark benchmark) 25endif() 26 27if(USE_CUDA) 28 caffe2_binary_target("inspect_gpu.cc") 29 target_link_libraries(inspect_gpu ${CUDA_LIBRARIES}) 30 31endif() 32 33if(USE_ROCM) 34 caffe2_hip_binary_target("hip/inspect_gpu.cc") 35 36endif() 37 38if(USE_MPI) 39 caffe2_binary_target("run_plan_mpi.cc") 40 target_link_libraries(run_plan_mpi ${MPI_CXX_LIBRARIES}) 41endif() 42 43 44caffe2_binary_target("dump_operator_names.cc") 45caffe2_binary_target("optimize_for_mobile.cc") 46 47caffe2_binary_target(aot_model_compiler "aot_model_compiler.cc") 48target_link_libraries(aot_model_compiler torch) 49