From f32aeeae00015ed484f8bfea2e24018de0dae277 Mon Sep 17 00:00:00 2001 From: "Han Qi (qihqi)" Date: Tue, 11 Oct 2022 20:07:58 +0000 Subject: [PATCH] Set interface_call to true be default (#86668) Summary: ASR models need it Test Plan: existing unit tests Reviewed By: cccclai Differential Revision: D40251788 Pull Request resolved: https://github.com/pytorch/pytorch/pull/86668 Approved by: https://github.com/cccclai --- torch/csrc/jit/serialization/export_module.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/torch/csrc/jit/serialization/export_module.cpp b/torch/csrc/jit/serialization/export_module.cpp index c20d60e4c5c93..b29f1e2914c0c 100644 --- a/torch/csrc/jit/serialization/export_module.cpp +++ b/torch/csrc/jit/serialization/export_module.cpp @@ -424,8 +424,11 @@ SourceRangeRecords getBackendSourceRanges(const Module& m) { return sr_records; } +// TODO: remove mobileInterfaceCallExport as it is no longer needed. +// This function was introduced to guard the usage of `InterfaceCall` and +// now the support for `InterfaceCall` should be mature enough. auto& mobileInterfaceCallExport() { - static std::atomic flag{false}; + static std::atomic flag{true}; return flag; }