Skip to content

client:指令格式调试 #20

client:指令格式调试

client:指令格式调试 #20

name: Excuter/omp-simd-linux Build
on: [push, pull_request]
env:
HIGHWAY_VERSION: 1.2.0
jobs:
build:
strategy:
matrix:
os: [ubuntu-22.04] # 只保留 Ubuntu
backend: [ompsimd]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# 系统依赖安装
- name: Install Dependencies (Ubuntu)
if: matrix.os == 'ubuntu-22.04'
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
cmake \
libopenblas-dev \
libyaml-cpp-dev \
libjemalloc-dev \
libgtest-dev \
clang \
git
# 设置 ccache
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
# 构建缓存
- name: Cache Build
uses: actions/cache@v3
with:
path: |
excuter/op-mem-ompsimd/build
excuter/common/build
~/.ccache
key: ${{ runner.os }}-build-${{ hashFiles('**/CMakeLists.txt') }}
restore-keys: |
${{ runner.os }}-build-
# Highway 库安装
- name: Install Highway (Ubuntu)
run: |
# 安装依赖
sudo apt-get install -y libgtest-dev
# 克隆 Highway
git clone --depth 1 --branch ${HIGHWAY_VERSION} https://github.com/google/highway.git
cd highway
mkdir -p build && cd build
# 使用标准的 CMake 构建流程
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DHWY_SYSTEM_GTEST=ON \
-DHWY_ENABLE_TESTS=OFF
# 构建和安装
make -j$(nproc)
sudo make install
sudo ldconfig # 更新动态链接库缓存
# 确保头文件正确安装
sudo cp -r ../hwy /usr/local/include/
# 构建 common 库
- name: Build Common Library
run: |
cd excuter/common
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ..
cmake --build . --config Release -j$(nproc)
# 构建执行器
- name: CMake Build
run: |
cd excuter/op-mem-ompsimd
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ..
cmake --build . --config Release -j$(nproc)