Skip to content

Llama runtime is failing with CMake version #10063

@mergennachin

Description

@mergennachin

From https://github.com/pytorch/executorch/tree/main/examples/models/llama

Compile:

cmake -DPYTHON_EXECUTABLE=python \
    -DCMAKE_INSTALL_PREFIX=cmake-out \
    -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 \
    -Bcmake-out .

cmake --build cmake-out -j16 --target install --config Release

Error:

--   FALLBACK_YAML: /Users/mnachin/executorch/configurations/../kernels/portable/functions.yaml
--   OUTPUT_DIR: /Users/mnachin/executorch/cmake-out/configurations
-- Generating operator lib:
--   LIB_NAME: optimized_native_cpu_ops_lib
--   OPS_SCHEMA_YAML: /Users/mnachin/executorch/cmake-out/configurations/merged.yaml
--   ROOT_OPS:
--   INCLUDE_ALL_OPS:
Command - python;-m;codegen.tools.gen_oplist;--output_path=/Users/mnachin/executorch/cmake-out/configurations/optimized_native_cpu_ops_lib/selected_operators.yaml;--ops_schema_yaml_path="/Users/mnachin/executorch/cmake-out/configurations/merged.yaml"
-- Generating kernel bindings:
--   LIB_NAME: optimized_native_cpu_ops_lib
--   FUNCTIONS_YAML: /Users/mnachin/executorch/cmake-out/configurations/merged.yaml
--   CUSTOM_OPS_YAML:
--   ADD_EXCEPTION_BOUNDARY: TRUE
Generated files /Users/mnachin/executorch/cmake-out/configurations/optimized_native_cpu_ops_lib/RegisterCodegenUnboxedKernelsEverything.cpp;/Users/mnachin/executorch/cmake-out/configurations/optimized_native_cpu_ops_lib/Functions.h;/Users/mnachin/executorch/cmake-out/configurations/optimized_native_cpu_ops_lib/NativeFunctions.h
-- Generating operator lib:
--   LIB_NAME: optimized_native_cpu_ops_lib
--   KERNEL_LIBS: optimized_kernels;optimized_portable_kernels
--   DEPS: executorch
CMake Error at third-party/gflags/CMakeLists.txt:73 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from 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.

  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.


-- Configuring incomplete, errors occurred!
make: Makefile: No such file or directory
make: *** No rule to make target `Makefile'.  Stop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions