Skip to content

Training pybindings can't be installed #8990

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
YuanTingHsieh opened this issue Mar 6, 2025 · 3 comments
Closed

Training pybindings can't be installed #8990

YuanTingHsieh opened this issue Mar 6, 2025 · 3 comments
Assignees
Labels
module: build/install Issues related to the cmake and buck2 builds, and to installing ExecuTorch module: training Issues related to training models on edge devices triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@YuanTingHsieh
Copy link

YuanTingHsieh commented Mar 6, 2025

🐛 Describe the bug

I try to run: "./install_executorch.sh --pybind training"

On the current main branch in my Mac it failed with:

"""
CMake Error at extension/flat_tensor/CMakeLists.txt:20 (add_library):
No SOURCES given to target: extension_flat_tensor

CMake Generate step failed. Build files cannot be regenerated correctly.

error: subprocess-exited-with-error

× Building wheel for executorch (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> See above for output.
"""

Full log as attached:

"""
(venv_nvflare) yuantingh@yuantingh-mlt executorch % ./install_executorch.sh --pybind training
2025-03-05 20:09:06,483 [ExecuTorch] INFO: All required submodules are present.
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/nightly/cpu
Requirement already satisfied: torch==2.7.0.dev20250131 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (2.7.0.dev20250131)
Requirement already satisfied: torchvision==0.22.0.dev20250131 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (0.22.0.dev20250131)
Requirement already satisfied: torchaudio==2.6.0.dev20250131 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (2.6.0.dev20250131)
Requirement already satisfied: timm==1.0.7 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from -r requirements-examples.txt (line 3)) (1.0.7)
Requirement already satisfied: torchsr==1.0.4 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from -r requirements-examples.txt (line 4)) (1.0.4)
Requirement already satisfied: transformers==4.47.1 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from -r requirements-examples.txt (line 5)) (4.47.1)
Requirement already satisfied: cmake in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from -r requirements-dev.txt (line 1)) (3.31.4)
Requirement already satisfied: pip>=23 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from -r requirements-dev.txt (line 2)) (24.0)
Requirement already satisfied: pyyaml in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from -r requirements-dev.txt (line 3)) (6.0.1)
Requirement already satisfied: setuptools>=63 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from -r requirements-dev.txt (line 4)) (75.8.0)
Requirement already satisfied: tomli in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from -r requirements-dev.txt (line 5)) (2.2.1)
Requirement already satisfied: wheel in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from -r requirements-dev.txt (line 6)) (0.45.1)
Requirement already satisfied: zstd in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from -r requirements-dev.txt (line 7)) (1.5.6.1)
Requirement already satisfied: filelock in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from torch==2.7.0.dev20250131) (3.13.4)
Requirement already satisfied: typing-extensions>=4.10.0 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from torch==2.7.0.dev20250131) (4.11.0)
Requirement already satisfied: sympy==1.13.1 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from torch==2.7.0.dev20250131) (1.13.1)
Requirement already satisfied: networkx in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from torch==2.7.0.dev20250131) (3.3)
Requirement already satisfied: jinja2 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from torch==2.7.0.dev20250131) (3.1.3)
Requirement already satisfied: fsspec in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from torch==2.7.0.dev20250131) (2024.3.1)
Requirement already satisfied: numpy in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from torchvision==0.22.0.dev20250131) (2.2.3)
Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from torchvision==0.22.0.dev20250131) (10.3.0)
Requirement already satisfied: huggingface_hub in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from timm==1.0.7->-r requirements-examples.txt (line 3)) (0.29.0)
Requirement already satisfied: safetensors in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from timm==1.0.7->-r requirements-examples.txt (line 3)) (0.5.2)
Requirement already satisfied: packaging>=20.0 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from transformers==4.47.1->-r requirements-examples.txt (line 5)) (24.0)
Requirement already satisfied: regex!=2019.12.17 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from transformers==4.47.1->-r requirements-examples.txt (line 5)) (2024.11.6)
Requirement already satisfied: requests in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from transformers==4.47.1->-r requirements-examples.txt (line 5)) (2.31.0)
Requirement already satisfied: tokenizers<0.22,>=0.21 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from transformers==4.47.1->-r requirements-examples.txt (line 5)) (0.21.0)
Requirement already satisfied: tqdm>=4.27 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from transformers==4.47.1->-r requirements-examples.txt (line 5)) (4.66.2)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from sympy==1.13.1->torch==2.7.0.dev20250131) (1.3.0)
Requirement already satisfied: MarkupSafe>=2.0 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from jinja2->torch==2.7.0.dev20250131) (2.1.5)
Requirement already satisfied: charset-normalizer<4,>=2 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from requests->transformers==4.47.1->-r requirements-examples.txt (line 5)) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from requests->transformers==4.47.1->-r requirements-examples.txt (line 5)) (3.7)
Requirement already satisfied: urllib3<3,>=1.21.1 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from requests->transformers==4.47.1->-r requirements-examples.txt (line 5)) (2.2.1)
Requirement already satisfied: certifi>=2017.4.17 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from requests->transformers==4.47.1->-r requirements-examples.txt (line 5)) (2024.2.2)

[notice] A new release of pip is available: 24.0 -> 25.0.1
[notice] To update, run: pip install --upgrade pip
Processing ./third-party/ao
Preparing metadata (setup.py) ... done
Building wheels for collected packages: torchao
Building wheel for torchao (setup.py) ... done
Created wheel for torchao: filename=torchao-0.10.0+git7d87946-py3-none-any.whl size=697650 sha256=6a229157e5684fd7821972abe1382bc40050208fb03c0669aa2e833dc6d5813c
Stored in directory: /private/var/folders/x0/qbr9ry114gvgb1s2jctrp3bm0000gp/T/pip-ephem-wheel-cache-qdsvuaxp/wheels/a8/ba/33/7f6a284842c3d861571102f14a35e95f2587f33d8492c24971
Successfully built torchao
Installing collected packages: torchao
Attempting uninstall: torchao
Found existing installation: torchao 0.10.0+git7d87946
Uninstalling torchao-0.10.0+git7d87946:
Successfully uninstalled torchao-0.10.0+git7d87946
Successfully installed torchao-0.10.0+git7d87946

[notice] A new release of pip is available: 24.0 -> 25.0.1
[notice] To update, run: pip install --upgrade pip
Using pip 24.0 from /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages/pip (python 3.10)
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/nightly/cpu
Processing /Users/yuantingh/Downloads/executorch
Running command Preparing metadata (pyproject.toml)
running dist_info
creating /private/var/folders/x0/qbr9ry114gvgb1s2jctrp3bm0000gp/T/pip-modern-metadata-1jvxmg9m/executorch.egg-info
writing /private/var/folders/x0/qbr9ry114gvgb1s2jctrp3bm0000gp/T/pip-modern-metadata-1jvxmg9m/executorch.egg-info/PKG-INFO
writing dependency_links to /private/var/folders/x0/qbr9ry114gvgb1s2jctrp3bm0000gp/T/pip-modern-metadata-1jvxmg9m/executorch.egg-info/dependency_links.txt
writing entry points to /private/var/folders/x0/qbr9ry114gvgb1s2jctrp3bm0000gp/T/pip-modern-metadata-1jvxmg9m/executorch.egg-info/entry_points.txt
writing requirements to /private/var/folders/x0/qbr9ry114gvgb1s2jctrp3bm0000gp/T/pip-modern-metadata-1jvxmg9m/executorch.egg-info/requires.txt
writing top-level names to /private/var/folders/x0/qbr9ry114gvgb1s2jctrp3bm0000gp/T/pip-modern-metadata-1jvxmg9m/executorch.egg-info/top_level.txt
writing manifest file '/private/var/folders/x0/qbr9ry114gvgb1s2jctrp3bm0000gp/T/pip-modern-metadata-1jvxmg9m/executorch.egg-info/SOURCES.txt'
reading manifest file '/private/var/folders/x0/qbr9ry114gvgb1s2jctrp3bm0000gp/T/pip-modern-metadata-1jvxmg9m/executorch.egg-info/SOURCES.txt'
adding license file 'LICENSE'
writing manifest file '/private/var/folders/x0/qbr9ry114gvgb1s2jctrp3bm0000gp/T/pip-modern-metadata-1jvxmg9m/executorch.egg-info/SOURCES.txt'
creating '/private/var/folders/x0/qbr9ry114gvgb1s2jctrp3bm0000gp/T/pip-modern-metadata-1jvxmg9m/executorch-0.6.0a0+2051a15.dist-info'
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: expecttest in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from executorch==0.6.0a0+2051a15) (0.3.0)
Requirement already satisfied: flatbuffers in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from executorch==0.6.0a0+2051a15) (25.2.10)
Requirement already satisfied: hypothesis in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from executorch==0.6.0a0+2051a15) (6.126.0)
Requirement already satisfied: mpmath==1.3.0 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from executorch==0.6.0a0+2051a15) (1.3.0)
Requirement already satisfied: numpy>=2.0.0 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from executorch==0.6.0a0+2051a15) (2.2.3)
Requirement already satisfied: packaging in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from executorch==0.6.0a0+2051a15) (24.0)
Requirement already satisfied: pandas>=2.2.2 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from executorch==0.6.0a0+2051a15) (2.2.2)
Requirement already satisfied: parameterized in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from executorch==0.6.0a0+2051a15) (0.9.0)
Requirement already satisfied: pytest in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from executorch==0.6.0a0+2051a15) (8.3.4)
Requirement already satisfied: pytest-xdist in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from executorch==0.6.0a0+2051a15) (3.6.1)
Requirement already satisfied: pytest-rerunfailures in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from executorch==0.6.0a0+2051a15) (15.0)
Requirement already satisfied: pyyaml in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from executorch==0.6.0a0+2051a15) (6.0.1)
Requirement already satisfied: ruamel.yaml in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from executorch==0.6.0a0+2051a15) (0.18.10)
Requirement already satisfied: sympy in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from executorch==0.6.0a0+2051a15) (1.13.1)
Requirement already satisfied: tabulate in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from executorch==0.6.0a0+2051a15) (0.9.0)
Requirement already satisfied: typing-extensions in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from executorch==0.6.0a0+2051a15) (4.11.0)
Requirement already satisfied: python-dateutil>=2.8.2 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from pandas>=2.2.2->executorch==0.6.0a0+2051a15) (2.9.0.post0)
Requirement already satisfied: pytz>=2020.1 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from pandas>=2.2.2->executorch==0.6.0a0+2051a15) (2024.1)
Requirement already satisfied: tzdata>=2022.7 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from pandas>=2.2.2->executorch==0.6.0a0+2051a15) (2024.1)
Requirement already satisfied: attrs>=22.2.0 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from hypothesis->executorch==0.6.0a0+2051a15) (23.2.0)
Requirement already satisfied: exceptiongroup>=1.0.0 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from hypothesis->executorch==0.6.0a0+2051a15) (1.2.2)
Requirement already satisfied: sortedcontainers<3.0.0,>=2.1.0 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from hypothesis->executorch==0.6.0a0+2051a15) (2.4.0)
Requirement already satisfied: iniconfig in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from pytest->executorch==0.6.0a0+2051a15) (2.0.0)
Requirement already satisfied: pluggy<2,>=1.5 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from pytest->executorch==0.6.0a0+2051a15) (1.5.0)
Requirement already satisfied: tomli>=1 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from pytest->executorch==0.6.0a0+2051a15) (2.2.1)
Requirement already satisfied: execnet>=2.1 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from pytest-xdist->executorch==0.6.0a0+2051a15) (2.1.1)
Requirement already satisfied: ruamel.yaml.clib>=0.2.7 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from ruamel.yaml->executorch==0.6.0a0+2051a15) (0.2.12)
Requirement already satisfied: six>=1.5 in /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages (from python-dateutil>=2.8.2->pandas>=2.2.2->executorch==0.6.0a0+2051a15) (1.16.0)
Building wheels for collected packages: executorch
Running command Building wheel for executorch (pyproject.toml)
running bdist_wheel
running build
command options for 'CustomBuild':
build_base = pip-out
build_purelib = pip-out/lib
build_platlib = pip-out/lib.macosx-10.9-universal2-cpython-310
build_lib = pip-out/lib.macosx-10.9-universal2-cpython-310
build_scripts = pip-out/scripts-3.10
build_temp = pip-out/temp.macosx-10.9-universal2-cpython-310
plat_name = macosx-10.9-universal2
compiler = None
parallel = 11
debug = None
force = None
executable = /Users/yuantingh/Downloads/venv_nvflare/bin/python3
deleting /Users/yuantingh/Downloads/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out/CMakeCache.txt
Traceback (most recent call last):
File "", line 728, in run
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['cmake', '-S', '/Users/yuantingh/Downloads/executorch', '-B', '/Users/yuantingh/Downloads/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out', '-DBUCK2=', '-DPYTHON_EXECUTABLE=/Users/yuantingh/Downloads/venv_nvflare/bin/python3', '-DCMAKE_PREFIX_PATH=/Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages', '-DCMAKE_BUILD_TYPE=Release', '-DEXECUTORCH_ENABLE_LOGGING=ON', '-DEXECUTORCH_LOG_LEVEL=Info', '-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15', '-DEXECUTORCH_SEPARATE_FLATCC_HOST_PROJECT=OFF', '-DEXECUTORCH_BUILD_PYBIND=ON', '-DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON', '-DEXECUTORCH_BUILD_KERNELS_QUANTIZED_AOT=ON', '-DEXECUTORCH_BUILD_EXTENSION_TRAINING=ON', '-DEXECUTORCH_BUILD_KERNELS_CUSTOM=ON', '-DEXECUTORCH_BUILD_KERNELS_CUSTOM_AOT=ON', '-DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON', '-DEXECUTORCH_BUILD_KERNELS_QUANTIZED_AOT=ON', '-DEXECUTORCH_BUILD_EXTENSION_TRAINING=ON']' returned non-zero exit status 1.

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

Traceback (most recent call last):
File "/Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in
main()
File "/Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages/setuptools/build_meta.py", line 438, in build_wheel
return _build(['bdist_wheel', '--dist-info-dir', str(metadata_directory)])
File "/Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages/setuptools/build_meta.py", line 426, in _build
return self._build_with_temp_dir(
File "/Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages/setuptools/build_meta.py", line 407, in _build_with_temp_dir
self.run_setup()
File "/Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages/setuptools/build_meta.py", line 320, in run_setup
exec(code, locals())
File "", line 823, in
File "/Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages/setuptools/init.py", line 117, in setup
return distutils.core.setup(**attrs)
File "/Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 186, in setup
return run_commands(dist)
File "/Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 202, in run_commands
dist.run_commands()
File "/Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 983, in run_commands
self.run_command(cmd)
File "/Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages/setuptools/dist.py", line 999, in run_command
super().run_command(command)
File "/Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 1002, in run_command
cmd_obj.run()
File "/Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages/setuptools/command/bdist_wheel.py", line 379, in run
self.run_command("build")
File "/Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 339, in run_command
self.distribution.run_command(command)
File "/Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages/setuptools/dist.py", line 999, in run_command
super().run_command(command)
File "/Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 1002, in run_command
cmd_obj.run()
File "", line 748, in run
Exception: CMake Deprecation Warning at backends/xnnpack/third-party/FXdiv/CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.

Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.

CMake Deprecation Warning at backends/xnnpack/third-party/cpuinfo/CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.

Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.

CMake Deprecation Warning at backends/xnnpack/third-party/pthreadpool/CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.

Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.

Command - /Users/yuantingh/Downloads/venv_nvflare/bin/python3;-m;codegen.tools.gen_oplist;--output_path=/Users/yuantingh/Downloads/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out/kernels/portable/portable_ops_lib/selected_operators.yaml;--ops_schema_yaml_path="/Users/yuantingh/Downloads/executorch/kernels/portable/functions.yaml"
Generated files /Users/yuantingh/Downloads/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out/kernels/portable/portable_ops_lib/RegisterCodegenUnboxedKernelsEverything.cpp;/Users/yuantingh/Downloads/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out/kernels/portable/portable_ops_lib/Functions.h;/Users/yuantingh/Downloads/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out/kernels/portable/portable_ops_lib/NativeFunctions.h
'/Users/yuantingh/Downloads/venv_nvflare/bin/python3' '-c' 'import importlib.util; print(importlib.util.find_spec('torch').submodule_search_locations[0])'
Command - /Users/yuantingh/Downloads/venv_nvflare/bin/python3;-m;codegen.tools.gen_oplist;--output_path=/Users/yuantingh/Downloads/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out/kernels/optimized/optimized_ops_lib/selected_operators.yaml;--ops_schema_yaml_path="/Users/yuantingh/Downloads/executorch/kernels/optimized/optimized.yaml"
Generated files /Users/yuantingh/Downloads/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out/kernels/optimized/optimized_ops_lib/RegisterCodegenUnboxedKernelsEverything.cpp;/Users/yuantingh/Downloads/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out/kernels/optimized/optimized_ops_lib/Functions.h;/Users/yuantingh/Downloads/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out/kernels/optimized/optimized_ops_lib/NativeFunctions.h
Command - /Users/yuantingh/Downloads/venv_nvflare/bin/python3;-m;codegen.tools.gen_oplist;--output_path=/Users/yuantingh/Downloads/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out/configurations/optimized_native_cpu_ops_lib/selected_operators.yaml;--ops_schema_yaml_path="/Users/yuantingh/Downloads/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out/configurations/merged.yaml"
Generated files /Users/yuantingh/Downloads/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out/configurations/optimized_native_cpu_ops_lib/RegisterCodegenUnboxedKernelsEverything.cpp;/Users/yuantingh/Downloads/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out/configurations/optimized_native_cpu_ops_lib/Functions.h;/Users/yuantingh/Downloads/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out/configurations/optimized_native_cpu_ops_lib/NativeFunctions.h
CMake Deprecation Warning at third-party/gflags/CMakeLists.txt:73 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.

Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.

CMake Deprecation Warning at third-party/pybind11/CMakeLists.txt:13 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.

Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.

CMake Deprecation Warning at third-party/flatcc/CMakeLists.txt:2 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.

Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.

'/Users/yuantingh/Downloads/venv_nvflare/bin/python3' '-c' 'import importlib.util; print(importlib.util.find_spec('torch').submodule_search_locations[0])'
CMake Warning at /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:22 (message):
static library kineto_LIBRARY-NOTFOUND not found.
Call Stack (most recent call first):
/Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:125 (append_torchlib_if_found)
build/Utils.cmake:389 (find_package)
CMakeLists.txt:769 (find_package_torch)

Command - /Users/yuantingh/Downloads/venv_nvflare/bin/python3;-m;codegen.tools.gen_oplist;--output_path=/Users/yuantingh/Downloads/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out/kernels/quantized/quantized_ops_lib/selected_operators.yaml;--ops_schema_yaml_path="/Users/yuantingh/Downloads/executorch/kernels/quantized/quantized.yaml"
Generated files /Users/yuantingh/Downloads/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out/kernels/quantized/quantized_ops_lib/RegisterCodegenUnboxedKernelsEverything.cpp;/Users/yuantingh/Downloads/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out/kernels/quantized/quantized_ops_lib/Functions.h;/Users/yuantingh/Downloads/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out/kernels/quantized/quantized_ops_lib/NativeFunctions.h;/Users/yuantingh/Downloads/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out/kernels/quantized/quantized_ops_lib/RegisterCPUCustomOps.cpp;/Users/yuantingh/Downloads/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out/kernels/quantized/quantized_ops_lib/RegisterSchema.cpp;/Users/yuantingh/Downloads/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out/kernels/quantized/quantized_ops_lib/CustomOpsNativeFunctions.h
Command - /Users/yuantingh/Downloads/venv_nvflare/bin/python3;-m;codegen.tools.gen_oplist;--output_path=/Users/yuantingh/Downloads/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out/kernels/quantized/quantized_ops_aot_lib/selected_operators.yaml;--root_ops="quantized_decomposed::add.out;quantized_decomposed::choose_qparams.Tensor_out;quantized_decomposed::choose_qparams_per_token_asymmetric.out;quantized_decomposed::dequantize_per_channel.out;quantized_decomposed::dequantize_per_tensor.out;quantized_decomposed::dequantize_per_tensor.Tensor_out;quantized_decomposed::dequantize_per_token.out;quantized_decomposed::mixed_linear.out;quantized_decomposed::mixed_mm.out;quantized_decomposed::quantize_per_channel.out;quantized_decomposed::quantize_per_tensor.out;quantized_decomposed::quantize_per_tensor.Tensor_out;quantized_decomposed::quantize_per_token.out"
Command - /Users/yuantingh/Downloads/venv_nvflare/bin/python3;-m;codegen.tools.gen_oplist;--output_path=/Users/yuantingh/Downloads/executorch/pip-out/temp.macosx-10.9-universal2-cpython-310/cmake-out/kernels/quantized/quantized_ops_pybind_lib/selected_operators.yaml;--ops_schema_yaml_path="/Users/yuantingh/Downloads/executorch/kernels/quantized/quantized.yaml"
CMake Error at extension/flat_tensor/CMakeLists.txt:20 (add_library):
No SOURCES given to target: extension_flat_tensor

CMake Generate step failed. Build files cannot be regenerated correctly.

error: subprocess-exited-with-error

× Building wheel for executorch (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /Users/yuantingh/Downloads/venv_nvflare/bin/python3 /Users/yuantingh/Downloads/venv_nvflare/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /var/folders/x0/qbr9ry114gvgb1s2jctrp3bm0000gp/T/tmph48prrli
cwd: /Users/yuantingh/Downloads/executorch
Building wheel for executorch (pyproject.toml) ... error
ERROR: Failed building wheel for executorch
Failed to build executorch
ERROR: Could not build wheels for executorch, which is required to install pyproject.toml-based projects

[notice] A new release of pip is available: 24.0 -> 25.0.1
[notice] To update, run: pip install --upgrade pip
Traceback (most recent call last):
File "/Users/yuantingh/Downloads/executorch/./install_executorch.py", line 257, in
main(sys.argv[1:])
File "/Users/yuantingh/Downloads/executorch/./install_executorch.py", line 232, in main
subprocess.run(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/Users/yuantingh/Downloads/venv_nvflare/bin/python3', '-m', 'pip', 'install', '.', '--no-build-isolation', '-v', '--extra-index-url', 'https://download.pytorch.org/whl/nightly/cpu']' returned non-zero exit status 1.
"""

Versions

Collecting environment information...
PyTorch version: 2.7.0.dev20250131
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 15.3.1 (arm64)
GCC version: Could not collect
Clang version: 16.0.0 (clang-1600.0.26.6)
CMake version: version 3.31.4
Libc version: N/A

Python version: 3.10.2 (v3.10.2:a58ebcc701, Jan 13 2022, 14:50:16) [Clang 13.0.0 (clang-1300.0.29.30)] (64-bit runtime)
Python platform: macOS-15.3.1-arm64-arm-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Apple M2 Pro

Versions of relevant libraries:
[pip3] executorch==0.6.0a0+2051a15
[pip3] flake8==7.1.2
[pip3] mypy-extensions==1.0.0
[pip3] numpy==2.2.3
[pip3] pytorch-lightning==2.2.3
[pip3] torch==2.7.0.dev20250131
[pip3] torchao==0.10.0+git7d87946
[pip3] torchaudio==2.6.0.dev20250131
[pip3] torchmetrics==1.3.2
[pip3] torchsr==1.0.4
[pip3] torchvision==0.22.0.dev20250131
[conda] Could not collect

cc @larryliu0820 @lucylq @JacobSzwejbka

@JacobSzwejbka
Copy link
Contributor

taking a look

@JacobSzwejbka JacobSzwejbka self-assigned this Mar 6, 2025
@github-project-automation github-project-automation bot moved this to To triage in ExecuTorch Core Mar 6, 2025
@JacobSzwejbka JacobSzwejbka added module: training Issues related to training models on edge devices release notes: build Changes related to build, including dependency upgrades, build flags, optimizations, etc. module: build/install Issues related to the cmake and buck2 builds, and to installing ExecuTorch triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module and removed release notes: build Changes related to build, including dependency upgrades, build flags, optimizations, etc. labels Mar 6, 2025
@JacobSzwejbka
Copy link
Contributor

I am unable to repro this on main this morning.

can you try running

./install_executorch.sh --clean
git submodule sync
git submodule update --init

and then try again?

@YuanTingHsieh
Copy link
Author

@JacobSzwejbka thanks for the fast response.

After re-pulling the main and follow your suggestion

./install_executorch.sh --clean
git submodule sync
git submodule update --init

I can run

./install_executorch.sh --pybind training coreml xnnpack mps

in my machine and things are working.

Thanks very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: build/install Issues related to the cmake and buck2 builds, and to installing ExecuTorch module: training Issues related to training models on edge devices triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
Status: Done
Development

No branches or pull requests

2 participants