File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,30 @@ def preprocess(
159159 "max_autotune_conv_backends" : "TRITON" ,
160160 }
161161
162+ platform = "linux"
163+ shim_library_path = None
164+ for spec in compile_specs :
165+ if spec .key == "platform" :
166+ platform = spec .value .decode ("utf-8" )
167+ if spec .key == "shim_library_path" :
168+ shim_library_path = spec .value .decode ("utf-8" )
169+
170+ assert platform == "linux" or platform == "windows"
171+ if platform == "windows" :
172+ assert shim_library_path is not None
173+ if platform == "linux" :
174+ assert shim_library_path is None
175+
176+ if platform == "windows" :
177+ options .update (
178+ {
179+ "aot_inductor.cross_target_platform" : "windows" ,
180+ "aot_inductor.aoti_shim_library" : "executorch" ,
181+ "aot_inductor.aoti_shim_library_path" : shim_library_path ,
182+ "aot_inductor.precompile_headers" : False ,
183+ }
184+ )
185+
162186 with collect_unsupported_fallback_kernels (), torch .nn .attention .sdpa_kernel (
163187 [
164188 SDPBackend .MATH # pyre-ignore[16]: Module `torch.nn.attention` has no attribute `SDPBackend`.
You can’t perform that action at this time.
0 commit comments