Skip to content

Error on export to executorch #1256

@eikaramba

Description

@eikaramba

No matter the arch/encoder combination i seem to always get errors on trying to export the model to executorch:

Windows 10
pytorch 3.9.0 (with or without CUDA 13.8)
python 3.12
i tried FPN/unet and efficient/mobilenet among other combinations
Also running inside Visual Studio Developer Powershell as descriped

import torch
from executorch.backends.xnnpack.partition.xnnpack_partitioner import XnnpackPartitioner
from executorch.exir import to_edge_transform_and_lower
import segmentation_models_pytorch as smp


# first train model and do save_pretrained('./model')
model = smp.from_pretrained('./model').eval()
sample_inputs = (torch.randn(1, 3, 256, 256), )

et_program = to_edge_transform_and_lower(
    torch.export.export(model, sample_inputs),
    partitioner=[XnnpackPartitioner()]
).to_executorch()

with open("xnnpack.pte", "wb") as f:
    f.write(et_program.buffer)
Loading weights from local directory
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0] Error while creating guard:
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0] Name: ''
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]     Source: shape_env
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]     Create Function: SHAPE_ENV
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]     Guard Types: ['SHAPE_ENV', 'SHAPE_ENV', 'SHAPE_ENV', 'SHAPE_ENV', 'SHAPE_ENV', 'SHAPE_ENV', 'SHAPE_ENV', 'SHAPE_ENV', 'SHAPE_ENV']
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]     Code List: ["L['x'].size()[0] == 1", "L['x'].size()[1] == 3", "L['x'].size()[2] == 4", "L['x'].size()[3] == 4", "L['x'].stride()[0] == 48", "L['x'].stride()[1] == 16", "L['x'].stride()[2] == 4", "L['x'].stride()[3] == 1", "L['x'].storage_offset() == 0"]
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]     Object Weakref: None
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]     Guarded Class Weakref: None
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0] Traceback (most recent call last):
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]   File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_guards.py", line 366, in create
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]     return self.create_fn(builder, self)
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]   File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_dynamo\guards.py", line 2671, in SHAPE_ENV
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]     clib = CppCodeCache.load(func_str)
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]   File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_inductor\codecache.py", line 2839, in load
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]     return cls.load_async(*args, **kwargs)()
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]   File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_inductor\codecache.py", line 2705, in load_async
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]     "vec_isa": pick_vec_isa(),
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]                ^^^^^^^^^^^^^^
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]   File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_inductor\cpu_vec_isa.py", line 497, in pick_vec_isa
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]     _valid_vec_isa_list: list[VecISA] = valid_vec_isa_list()
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]                                         ^^^^^^^^^^^^^^^^^^^^
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]   File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_inductor\cpu_vec_isa.py", line 484, in valid_vec_isa_list
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]     isa_list.extend(
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]   File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_inductor\cpu_vec_isa.py", line 487, in <genexpr>
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]     if all(flag in _cpu_supported_x86_isa for flag in str(isa).split()) and isa
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]                                                                             ^^^
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]   File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_inductor\cpu_vec_isa.py", line 143, in __bool__
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]     return self.__bool__impl(config.cpp.vec_isa_ok)
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]   File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_inductor\cpu_vec_isa.py", line 153, in __bool__impl
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]     return self.check_build(VecISA._avx_code)
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]   File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_inductor\cpu_vec_isa.py", line 103, in check_build
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]     extra=_get_isa_dry_compile_fingerprint(self._arch_flags),
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]   File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_inductor\cpu_vec_isa.py", line 29, in _get_isa_dry_compile_fingerprint
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]     compiler_info = get_compiler_version_info(get_cpp_compiler())
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]                                               ^^^^^^^^^^^^^^^^^^
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]   File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_inductor\cpp_builder.py", line 339, in get_cpp_compiler
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]     check_msvc_cl_language_id(compiler)
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]   File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_inductor\cpp_builder.py", line 313, in check_msvc_cl_language_id
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]     if not _is_msvc_cl(compiler):
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]            ^^^^^^^^^^^^^^^^^^^^^
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]   File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_inductor\cpp_builder.py", line 431, in _is_msvc_cl
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0]     subprocess.check_output([cpp_compiler, "/help"], stderr=subprocess.STDOUT)
E1027 20:17:58.074000 12988 .venv\Lib\site-packages\torch\_guards.py:368] [0/0] UnicodeDecodeError: 'utf-8' codec can't decode byte 0x81 in position 62: invalid start byte
E1027 20:17:58.078000 12988 .venv\Lib\site-packages\torch\_guards.py:370] [0/0] Created at:
E1027 20:17:58.078000 12988 .venv\Lib\site-packages\torch\_guards.py:370] [0/0]   File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_dynamo\convert_frame.py", line 773, in trace_frame
E1027 20:17:58.078000 12988 .venv\Lib\site-packages\torch\_guards.py:370] [0/0]     tracer = InstructionTranslator(
E1027 20:17:58.078000 12988 .venv\Lib\site-packages\torch\_guards.py:370] [0/0]   File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_dynamo\symbolic_convert.py", line 3847, in __init__
E1027 20:17:58.078000 12988 .venv\Lib\site-packages\torch\_guards.py:370] [0/0]     output=OutputGraph(
E1027 20:17:58.078000 12988 .venv\Lib\site-packages\torch\_guards.py:370] [0/0]   File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_dynamo\output_graph.py", line 508, in __init__
E1027 20:17:58.078000 12988 .venv\Lib\site-packages\torch\_guards.py:370] [0/0]     self.init_ambient_guards()
E1027 20:17:58.078000 12988 .venv\Lib\site-packages\torch\_guards.py:370] [0/0]   File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_dynamo\output_graph.py", line 668, in init_ambient_guards
E1027 20:17:58.078000 12988 .venv\Lib\site-packages\torch\_guards.py:370] [0/0]     self.guards.add(ShapeEnvSource().make_guard(GuardBuilder.SHAPE_ENV))
Traceback (most recent call last):
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\fx\passes\infra\pass_manager.py", line 276, in __call__
    res = fn(module)
          ^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\fx\passes\infra\pass_base.py", line 46, in __call__
    res = self.call(graph_module)
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\executorch\backends\xnnpack\_passes\convert_to_upsample_bilinear2d.py", line 55, in call
    for pattern, align_corners in bilinear_2d.get_graphs_dict().items():
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\executorch\backends\xnnpack\partition\graphs\bilinear_2d.py", line 57, in get_graphs_dict
    return _get_bilinear_2d_graphs()
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\executorch\backends\xnnpack\partition\graphs\bilinear_2d.py", line 41, in _get_bilinear_2d_graphs
    edge = exir.capture(
           ^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\executorch\exir\capture\_capture.py", line 217, in capture
    ep = export(mod, args, dynamic_shapes=dynamic_shapes, strict=True)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\export\__init__.py", line 311, in export
    raise e
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\export\__init__.py", line 277, in export
    return _export(
           ^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\export\_trace.py", line 1163, in wrapper
    raise e
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\export\_trace.py", line 1129, in wrapper
    ep = fn(*args, **kwargs)
         ^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\export\exported_program.py", line 124, in wrapper
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\export\_trace.py", line 2255, in _export
    ep = _export_for_training(
         ^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\export\_trace.py", line 1163, in wrapper
    raise e
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\export\_trace.py", line 1129, in wrapper
    ep = fn(*args, **kwargs)
         ^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\export\exported_program.py", line 124, in wrapper
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\export\_trace.py", line 2071, in _export_for_training
    export_artifact = export_func(
                      ^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\export\_trace.py", line 1415, in _strict_export
    gm_torch_level = _export_to_torch_ir(
                     ^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\export\_trace.py", line 812, in _export_to_torch_ir
    gm_torch_level, _ = torch._dynamo.export(
                        ^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_dynamo\eval_frame.py", line 2002, in inner
    result_traced = opt_f(*args, **kwargs)
                    ^^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_dynamo\eval_frame.py", line 414, in __call__
    return super().__call__(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\nn\modules\module.py", line 1775, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\nn\modules\module.py", line 1786, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_dynamo\eval_frame.py", line 832, in compile_wrapper
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\nn\modules\module.py", line 1775, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\nn\modules\module.py", line 1786, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_dynamo\convert_frame.py", line 1874, in __call__
    result = self._torchdynamo_orig_backend(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_dynamo\convert_frame.py", line 688, in __call__
    result = _compile(
             ^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_dynamo\convert_frame.py", line 1494, in _compile
    raise InternalTorchDynamoError(
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_dynamo\convert_frame.py", line 1433, in _compile
    guarded_code, tracer_output = compile_inner(code, one_graph, hooks)
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_utils_internal.py", line 92, in wrapper_function
    return function(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_dynamo\convert_frame.py", line 1117, in compile_inner
    return _compile_inner(code, one_graph, hooks)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_dynamo\convert_frame.py", line 1251, in _compile_inner
    check_fn = dynamo_output.build_guards(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_dynamo\convert_frame.py", line 856, in build_guards
    return CheckFunctionManager(
           ^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_dynamo\guards.py", line 3383, in __init__
    builder, guard_manager = self.build_guards(
                             ^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_dynamo\guards.py", line 3674, in build_guards
    guard.create(builder)
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_guards.py", line 366, in create
    return self.create_fn(builder, self)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_dynamo\guards.py", line 2671, in SHAPE_ENV
    clib = CppCodeCache.load(func_str)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_inductor\codecache.py", line 2839, in load
    return cls.load_async(*args, **kwargs)()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_inductor\codecache.py", line 2705, in load_async
    "vec_isa": pick_vec_isa(),
               ^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_inductor\cpu_vec_isa.py", line 497, in pick_vec_isa
    _valid_vec_isa_list: list[VecISA] = valid_vec_isa_list()
                                        ^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_inductor\cpu_vec_isa.py", line 484, in valid_vec_isa_list
    isa_list.extend(
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_inductor\cpu_vec_isa.py", line 487, in <genexpr>
    if all(flag in _cpu_supported_x86_isa for flag in str(isa).split()) and isa
                                                                            ^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_inductor\cpu_vec_isa.py", line 143, in __bool__
    return self.__bool__impl(config.cpp.vec_isa_ok)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_inductor\cpu_vec_isa.py", line 153, in __bool__impl
    return self.check_build(VecISA._avx_code)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_inductor\cpu_vec_isa.py", line 103, in check_build
    extra=_get_isa_dry_compile_fingerprint(self._arch_flags),
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_inductor\cpu_vec_isa.py", line 29, in _get_isa_dry_compile_fingerprint
    compiler_info = get_compiler_version_info(get_cpp_compiler())
                                              ^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_inductor\cpp_builder.py", line 339, in get_cpp_compiler
    check_msvc_cl_language_id(compiler)
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_inductor\cpp_builder.py", line 313, in check_msvc_cl_language_id
    if not _is_msvc_cl(compiler):
           ^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\_inductor\cpp_builder.py", line 431, in _is_msvc_cl
    subprocess.check_output([cpp_compiler, "/help"], stderr=subprocess.STDOUT)
torch._dynamo.exc.InternalTorchDynamoError: UnicodeDecodeError: 'utf-8' codec can't decode byte 0x81 in position 62: invalid start byte

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "D:\cloud\machine learning\pytorch\edge-detection\export-execu.py", line 17, in <module>
    et_program = to_edge_transform_and_lower(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\executorch\exir\program\_program.py", line 114, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\executorch\exir\program\_program.py", line 1371, in to_edge_transform_and_lower
    edge_manager = edge_manager.to_backend(method_to_partitioner)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\executorch\exir\program\_program.py", line 114, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\executorch\exir\program\_program.py", line 1672, in to_backend
    new_edge_programs = to_backend(method_to_programs_and_partitioners)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\eike\AppData\Roaming\uv\python\cpython-3.12.8-windows-x86_64-none\Lib\functools.py", line 909, in wrapper
    return dispatch(args[0].__class__)(*args, **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\executorch\exir\backend\backend_api.py", line 762, in _
    lower_all_submodules_to_backend(
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\executorch\exir\backend\backend_api.py", line 591, in lower_all_submodules_to_backend
    backend_name_to_subclass[backend_id].preprocess_multimethod(
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\executorch\exir\backend\backend_details.py", line 129, in preprocess_multimethod
    preprocess_result = cls.preprocess(program, compile_spec_for_program)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\executorch\backends\xnnpack\xnnpack_preprocess.py", line 139, in preprocess
    ep = XNNPACKPassManager(ep, passes=passes).transform()
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\executorch\backends\xnnpack\_passes\__init__.py", line 94, in transform
    ep = _transform(ep, transform_pass)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\executorch\exir\program\_program.py", line 244, in _transform
    return _transform_with_pass_manager(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\executorch\exir\program\_program.py", line 266, in _transform_with_pass_manager
    res = pass_manager(self.graph_module)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\cloud\machine learning\pytorch\edge-detection\.venv\Lib\site-packages\torch\fx\passes\infra\pass_manager.py", line 302, in __call__
    raise Exception(msg) from e  # noqa: TRY002
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Exception: An error occurred when running the 'ConvertToUpsampleBilinear2d' pass after the following passes: []

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions