1616 DEBUG ,
1717 MAX_WORKSPACE_SIZE ,
1818 MIN_BLOCK_SIZE ,
19+ PASS_THROUGH_BUILD_FAILURES ,
1920)
2021
2122
@@ -46,11 +47,14 @@ def compile(
4647 torch_executed_modules = [],
4748 ** kwargs ,
4849):
50+ if debug :
51+ logger .setLevel (logging .DEBUG )
4952
5053 logger .warn (
5154 "The Dynamo backend is an experimental feature, for which only the "
5255 + "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}"
5458 )
5559
5660 if not isinstance (inputs , collections .abc .Sequence ):
@@ -104,6 +108,7 @@ def create_backend(
104108 workspace_size : int = MAX_WORKSPACE_SIZE ,
105109 min_block_size : int = MIN_BLOCK_SIZE ,
106110 torch_executed_ops : Sequence [str ] = set (),
111+ pass_through_build_failures : bool = PASS_THROUGH_BUILD_FAILURES ,
107112 ** kwargs ,
108113):
109114 """Create torch.compile backend given specified arguments
@@ -116,12 +121,16 @@ def create_backend(
116121 Returns:
117122 Backend for torch.compile
118123 """
124+ if debug :
125+ logger .setLevel (logging .DEBUG )
126+
119127 settings = CompilationSettings (
120128 debug = debug ,
121129 precision = precision ,
122130 workspace_size = workspace_size ,
123131 min_block_size = min_block_size ,
124132 torch_executed_ops = torch_executed_ops ,
133+ pass_through_build_failures = pass_through_build_failures ,
125134 )
126135
127136 return partial (
0 commit comments