Skip to content
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

EXECUTORCH_BUILD_TESTS=ON shouldn't require CMAKE_INSTALL_PREFIX=cmake-out for executorch/schema/program_generated.h #7582

Open
swolchok opened this issue Jan 10, 2025 · 2 comments
Labels
module: build Related to buck2 and cmake build triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@swolchok
Copy link
Contributor

🐛 Describe the bug

https://github.com/pytorch/executorch/blob/main/test/run_oss_cpp_tests.sh#L31 sets -DCMAKE_INSTALL_PREFIX=cmake-out . I attempted to use cmake manually, because that should let incremental builds work, and since I wasn't installing anything I left -DCMAKE_INSTALL_PREFIX out, but the build failed:

In file included from /Users/swolchok/src/executorch/runtime/executor/test/tensor_parser_test.cpp:9:
/Users/swolchok/src/executorch/../executorch/runtime/executor/tensor_parser.h:15:10: fatal error: 'executorch/schema/program_generated.h' file not found
   15 | #include <executorch/schema/program_generated.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

I believe this reflects a problem with our cmake setup around this generated header.

Versions

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

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

Python version: 3.12.7 (main, Oct 1 2024, 02:05:46) [Clang 16.0.0 (clang-1600.0.26.3)] (64-bit runtime)
Python platform: macOS-15.2-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 M1 Pro

Versions of relevant libraries:
[pip3] executorch==0.5.0a0+db8f1eb
[pip3] numpy==1.26.4
[pip3] torch==2.6.0.dev20241218
[pip3] torchao==0.8.0+git2e032c6b
[pip3] torchaudio==2.6.0.dev20241218
[pip3] torchsr==1.0.4
[pip3] torchvision==0.22.0.dev20241218
[conda] Could not collect

@lucylq
Copy link
Contributor

lucylq commented Jan 10, 2025

Could you try with #7512 patched?

This seems to be the same issue as #7511

@lucylq lucylq added module: build Related to buck2 and cmake build triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels Jan 10, 2025
@swolchok
Copy link
Contributor Author

Could you try with #7512 patched?

Surprisingly, it didn't help. Exact repro command:

cmake -S . -B cmake-out -DCMAKE_BUILD_TYPE=Release -DEXECUTORCH_USE_CPP_CODE_COVERAGE=ON -DEXECUTORCH_BUILD_TESTS=ON -DEXECUTORCH_BUILD_KERNELS_OPTIMIZED=ON     -DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON \
                                                                   -DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=ON \
                                                                   -DEXECUTORCH_BUILD_EXTENSION_MODULE=ON \
                                                                   -DEXECUTORCH_BUILD_EXTENSION_RUNNER_UTIL=ON \
                                                                   -DEXECUTORCH_BUILD_EXTENSION_TENSOR=ON \
                                                                   -DEXECUTORCH_BUILD_DEVTOOLS=ON \
                                                                   -DEXECUTORCH_BUILD_XNNPACK=ON -DEXECUTORCH_BUILD_PTHREADPOOL=ON && cmake --build cmake-out -j8

I did rm -rf cmake-out between attempts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: build Related to buck2 and cmake build triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

2 participants