Skip to content

Add Linux build script for TensorSharp.GGML.Native and make CMake Apple-specific settings conditional#5

Open
zhongkaifu wants to merge 4 commits intomainfrom
codex/add-build-shell-script-for-tensorsharp.ggml.native
Open

Add Linux build script for TensorSharp.GGML.Native and make CMake Apple-specific settings conditional#5
zhongkaifu wants to merge 4 commits intomainfrom
codex/add-build-shell-script-for-tensorsharp.ggml.native

Conversation

@zhongkaifu
Copy link
Copy Markdown
Owner

Motivation

  • Provide an easy way to build the native GGML bridge on Linux as a CPU-only shared library.
  • Ensure the CMake configuration does not require Apple-only languages or Metal when building on Linux.

Description

  • Add TensorSharp.GGML.Native/build-linux.sh, a helper script that configures a Release build directory and builds the GgmlOps target with cmake and cmake --build.
  • Update TensorSharp.GGML.Native/CMakeLists.txt to conditionally enable Objective-C/Objective-C++ and Metal settings only when APPLE is detected, and disable Metal on non-Apple platforms.
  • Document the Linux build steps in README.md and readme_cn.md, showing cd TensorSharp.GGML.Native and bash build-linux.sh and noting the output libGgmlOps.so.

Testing

  • Ran bash TensorSharp.GGML.Native/build-linux.sh on Linux, which completed successfully and produced libGgmlOps.so.
  • The CMake configure and build steps executed without errors (cmake -S ... -B ... -DCMAKE_BUILD_TYPE=Release and cmake --build ... --target GgmlOps).

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant