Skip to content

Commit 600c480

Browse files
Daksh-Shamifacebook-github-bot
authored andcommitted
Turn exception code off for quantized kernel generated libs (pytorch#14962)
Summary: Explicitly turning exception generated code off for quantized kernels as executorch does not use exceptions in general, and it can cause downstream errors. Detailed error is P1986979595 but the relevant part is: ``` buck-out/ABC/gen/fbsource/6e53edb0a9a0d828/xplat/executorch/kernels/quantized/__generated_lib_combined__/out/RegisterCodegenUnboxedKernelsEverything.cpp:77:44: error: exception handling disabled, use '-fexceptions' to enable 77 | } catch (const std::exception& ex) { | ``` This means the generated code uses exceptions in its code, so we should explicitly turn them off. Differential Revision: D84284541
1 parent fca0f38 commit 600c480

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernels/quantized/targets.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ def define_common_targets():
106106
custom_ops_aten_kernel_deps = [":quantized_operators_aten"] if aten_mode else [],
107107
custom_ops_requires_aot_registration = False,
108108
aten_mode = aten_mode,
109+
support_exceptions = False,
109110
visibility = [
110111
"//executorch/...",
111112
"@EXECUTORCH_CLIENTS",
@@ -126,6 +127,7 @@ def define_common_targets():
126127
deps = [
127128
":q_dq_ops",
128129
],
130+
support_exceptions = False,
129131
visibility = [
130132
"//executorch/...",
131133
"@EXECUTORCH_CLIENTS",

0 commit comments

Comments
 (0)