16
16
DEBUG ,
17
17
MAX_WORKSPACE_SIZE ,
18
18
MIN_BLOCK_SIZE ,
19
+ PASS_THROUGH_BUILD_FAILURES ,
19
20
)
20
21
21
22
@@ -46,11 +47,14 @@ def compile(
46
47
torch_executed_modules = [],
47
48
** kwargs ,
48
49
):
50
+ if debug :
51
+ logger .setLevel (logging .DEBUG )
49
52
50
53
logger .warn (
51
54
"The Dynamo backend is an experimental feature, for which only the "
52
55
+ "following arguments are supported: "
53
- + "{enabled_precisions, debug, workspace_size, min_block_size, torch_executed_ops}"
56
+ + "{enabled_precisions, debug, workspace_size, min_block_size, "
57
+ + "torch_executed_ops, pass_through_build_failures}"
54
58
)
55
59
56
60
if not isinstance (inputs , collections .abc .Sequence ):
@@ -104,6 +108,7 @@ def create_backend(
104
108
workspace_size : int = MAX_WORKSPACE_SIZE ,
105
109
min_block_size : int = MIN_BLOCK_SIZE ,
106
110
torch_executed_ops : Sequence [str ] = set (),
111
+ pass_through_build_failures : bool = PASS_THROUGH_BUILD_FAILURES ,
107
112
** kwargs ,
108
113
):
109
114
"""Create torch.compile backend given specified arguments
@@ -116,12 +121,16 @@ def create_backend(
116
121
Returns:
117
122
Backend for torch.compile
118
123
"""
124
+ if debug :
125
+ logger .setLevel (logging .DEBUG )
126
+
119
127
settings = CompilationSettings (
120
128
debug = debug ,
121
129
precision = precision ,
122
130
workspace_size = workspace_size ,
123
131
min_block_size = min_block_size ,
124
132
torch_executed_ops = torch_executed_ops ,
133
+ pass_through_build_failures = pass_through_build_failures ,
125
134
)
126
135
127
136
return partial (
0 commit comments