1 #pragma once 2 #include <torch/csrc/jit/mobile/function.h> 3 4 namespace torch::jit { 5 using c10::IValue; 6 7 enum MobileModuleLoadOptions { 8 OPERATOR_CHECK = 1, 9 // PARSE_ALL_EXTRA_FILE_MAPS is used to gate for ExtraFileMaps to pull all 10 // files automatically without explicit entries mapping. Refer to PR for a 11 // detail: https://github.com/pytorch/pytorch/pull/99747 12 PARSE_ALL_EXTRA_FILE_MAPS = 2, 13 }; 14 15 const uint64_t kDefaultMobileLoadOptions = 16 MobileModuleLoadOptions::OPERATOR_CHECK; 17 18 namespace mobile { 19 20 TORCH_API void parseOperators( 21 c10::ivalue::TupleElements&& ops_list, 22 const uint64_t& module_load_options, 23 mobile::Function* function); 24 } // namespace mobile 25 } // namespace torch::jit 26