#pragma once #include #include #include #include #include #include #include namespace torch::jit::mobile { const std::vector always_included_traced_ops = { // The following are called from setup sections. "aten::resize_", "aten::slice.Tensor", }; struct TracerResult { std::set root_ops; std::set traced_operators; KernelDTypeTracer::kernel_tags_type called_kernel_tags; CustomClassTracer::custom_classes_type loaded_classes; BuildFeatureTracer::build_feature_type build_features; std::set enabled_backends; }; /** * Trace a single model and return the TracerResult. */ TracerResult trace_run(const std::string& input_module_path); /** * Trace multiple models and return the TracerResult. */ TracerResult trace_run(const std::vector& input_module_paths); } // namespace torch::jit::mobile