Open
Description
Hello all
I'm tryng to cross compile executorch
with the armv8-2a-qcom-linux
toolchain for the RubikPi 3 board.
I have tried to setup the DFLATC_EXECUTABLE and DEXECUTORCH_BUILD_FLATC flags but it seems is not working.
This is my cmake config:
cmake \
-DPYTHON_EXECUTABLE=python3 \
-DCMAKE_INSTALL_PREFIX=qcom-aarch64 \
-DCMAKE_TOOLCHAIN_FILE=/home/ubuntu/qcom-wayland_sdk/tmp/sysroots/x86_64/usr/share/cmake/OEToolchainConfig.cmake \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DEXECUTORCH_ENABLE_LOGGING=1 \
-DCMAKE_BUILD_TYPE=Release \
-DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=ON \
-DEXECUTORCH_BUILD_EXTENSION_MODULE=ON \
-DEXECUTORCH_BUILD_EXTENSION_TENSOR=ON \
-DEXECUTORCH_BUILD_XNNPACK=ON \
-DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON \
-DEXECUTORCH_BUILD_KERNELS_OPTIMIZED=ON \
-DEXECUTORCH_BUILD_KERNELS_CUSTOM=ON \
-DFLATBUFFERS_FLATC_EXECUTABLE=$(which flatc) \
-DEXECUTORCH_BUILD_FLATC=OFF \
-DFLATC_EXECUTABLE=/usr/bin/flatc \
-Bqcom-aarch64 .
cmake --build qcom-aarch64 --target install --config Release
But I have an error related to flatc executable:
[ 0%] Generating common_schema headers
cd /home/ubuntu/Documents/Development/Executorch/executorch/schema && /home/ubuntu/Documents/Development/Executorch/executorch/qcom-aarch64/third-party/flatbuffers_external_project/bin/flatc --cpp --cpp-std c++11 --gen-mutable --scoped-enums -o /home/ubuntu/Documents/Development/Executorch/executorch/qcom-aarch64/schema/include/executorch/schema scalar_type.fbs
/bin/sh: 1: /home/ubuntu/Documents/Development/Executorch/executorch/qcom-aarch64/third-party/flatbuffers_external_project/bin/flatc: Exec format error
gmake[2]: *** [schema/CMakeFiles/common_schema.dir/build.make:75: schema/include/executorch/schema/scalar_type_generated.h] Error 126
gmake[2]: Leaving directory '/home/ubuntu/Documents/Development/Executorch/executorch/qcom-aarch64'
gmake[1]: *** [CMakeFiles/Makefile2:1034: schema/CMakeFiles/common_schema.dir/all] Error 2
gmake[1]: Leaving directory '/home/ubuntu/Documents/Development/Executorch/executorch/qcom-aarch64'
gmake: *** [Makefile:139: all] Error 2
Any idea on this?
Versions
(executorch) avilagtz@avilagtz-HP-EliteBook-840-G8-Notebook-PC:~/Documents/Development/Executorch/executorch$ python collect_env.py
Collecting environment information...
PyTorch version: 2.8.0.dev20250325+cpu
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A
OS: Ubuntu 22.04.5 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: 14.0.0-1ubuntu1.1
CMake version: version 3.31.6
Libc version: glibc-2.35
Python version: 3.10.15 (main, Sep 7 2024, 00:20:06) [GCC 11.5.0] (64-bit runtime)
Python platform: Linux-6.8.0-59-generic-x86_64-with-glibc2.35
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:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 39 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Vendor ID: GenuineIntel
Model name: 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz
CPU family: 6
Model: 140
Thread(s) per core: 2
Core(s) per socket: 4
Socket(s): 1
Stepping: 1
CPU max MHz: 4400.0000
CPU min MHz: 400.0000
BogoMIPS: 5222.40
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l2 cdp_l2 ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves split_lock_detect user_shstk dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq rdpid movdiri movdir64b fsrm avx512_vp2intersect md_clear ibt flush_l1d arch_capabilities
Virtualization: VT-x
L1d cache: 192 KiB (4 instances)
L1i cache: 128 KiB (4 instances)
L2 cache: 5 MiB (4 instances)
L3 cache: 8 MiB (1 instance)
NUMA node(s): 1
NUMA node0 CPU(s): 0-7
Vulnerability Gather data sampling: Mitigation; Microcode
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Not affected
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed: Not affected
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI SW loop, KVM SW loop
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
Versions of relevant libraries:
[pip3] numpy==2.2.6
[pip3] pytorch_tokenizers==0.1.0
[pip3] torch==2.8.0.dev20250325+cpu
[pip3] torchao==0.12.0+gitc9b9adc7
[pip3] torchaudio==2.6.0.dev20250325+cpu
[pip3] torchdata==0.11.0
[pip3] torchsr==1.0.4
[pip3] torchtune==0.6.1
[pip3] torchvision==0.22.0.dev20250325+cpu
[conda] numpy 2.2.6 pypi_0 pypi
[conda] pytorch-tokenizers 0.1.0 pypi_0 pypi
[conda] torch 2.8.0.dev20250325+cpu pypi_0 pypi
[conda] torchao 0.12.0+gitc9b9adc7 pypi_0 pypi
[conda] torchaudio 2.6.0.dev20250325+cpu pypi_0 pypi
[conda] torchdata 0.11.0 pypi_0 pypi
[conda] torchsr 1.0.4 pypi_0 pypi
[conda] torchtune 0.6.1 pypi_0 pypi
[conda] torchvision 0.22.0.dev20250325+cpu pypi_0 pypi