Skip to content

Commit 8681d7f

Browse files
author
Github Executorch
committed
Update on "Use c10 version of half/bfloat16 in executorch"
Accomplished by importing relevant files from c10 into executorch/runtime/core/portable_type/c10, and then using `using` in the top-level ExecuTorch headers. This approach should keep the ExecuTorch build hermetic for embedded use cases. In the future, we should add a CI job to ensure the c10 files stay identical to the PyTorch ones. Differential Revision: [D66106969](https://our.internmc.facebook.com/intern/diff/D66106969/) [ghstack-poisoned]
2 parents 26c6211 + 31c4202 commit 8681d7f

File tree

1 file changed

+13
-2
lines changed
  • examples/apple/coreml/executor_runner/coreml_executor_runner.xcodeproj

1 file changed

+13
-2
lines changed

examples/apple/coreml/executor_runner/coreml_executor_runner.xcodeproj/project.pbxproj

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@
214214
GCC_OPTIMIZATION_LEVEL = 0;
215215
GCC_PREPROCESSOR_DEFINITIONS = (
216216
"DEBUG=1",
217+
"C10_USING_CUSTOM_GENERATED_MACROS",
217218
"$(inherited)",
218219
);
219220
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -271,6 +272,10 @@
271272
ENABLE_USER_SCRIPT_SANDBOXING = YES;
272273
GCC_C_LANGUAGE_STANDARD = gnu17;
273274
GCC_NO_COMMON_BLOCKS = YES;
275+
GCC_PREPROCESSOR_DEFINITIONS = (
276+
"C10_USING_CUSTOM_GENERATED_MACROS",
277+
"$(inherited)",
278+
);
274279
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
275280
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
276281
GCC_WARN_UNDECLARED_SELECTOR = YES;
@@ -291,7 +296,10 @@
291296
CODE_SIGN_STYLE = Automatic;
292297
DEVELOPMENT_TEAM = "";
293298
ENABLE_HARDENED_RUNTIME = YES;
294-
HEADER_SEARCH_PATHS = "$(SRCROOT)/include";
299+
HEADER_SEARCH_PATHS = (
300+
"$(SRCROOT)/include",
301+
"$(SRCROOT)/include/executorch/runtime/core/portable_type",
302+
);
295303
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
296304
LIBRARY_SEARCH_PATHS = (
297305
"$(SRCROOT)/libraries",
@@ -310,7 +318,10 @@
310318
CODE_SIGN_STYLE = Automatic;
311319
DEVELOPMENT_TEAM = "";
312320
ENABLE_HARDENED_RUNTIME = YES;
313-
HEADER_SEARCH_PATHS = "$(SRCROOT)/include";
321+
HEADER_SEARCH_PATHS = (
322+
"$(SRCROOT)/include",
323+
"$(SRCROOT)/include/executorch/runtime/core/portable_type",
324+
);
314325
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
315326
LIBRARY_SEARCH_PATHS = (
316327
"$(SRCROOT)/libraries",

0 commit comments

Comments
 (0)