Skip to content

fbcode/deeplearning/fbgemm/fbgemm_gpu/test/tbe/dram_kv/dram_kv_test.py #22156

fbcode/deeplearning/fbgemm/fbgemm_gpu/test/tbe/dram_kv/dram_kv_test.py

fbcode/deeplearning/fbgemm/fbgemm_gpu/test/tbe/dram_kv/dram_kv_test.py #22156

Workflow file for this run

# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
name: FBGEMM CI
on:
push:
branches:
- main
pull_request:
branches:
- main
# Manual Trigger (for testing only)
#
workflow_dispatch:
concurrency:
# Cancel previous runs in the PR if a new commit is pushed
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build-linux:
if: ${{ github.repository_owner == 'pytorch' }}
runs-on: ${{ matrix.host-machine.instance }}
container:
image: amazonlinux:2023
options: --user root
defaults:
run:
shell: bash
env:
PRELUDE: .github/scripts/setup_env.bash
BUILD_ENV: build_${{ matrix.library-type }}
BUILD_DIR: build_${{ matrix.library-type }}
strategy:
fail-fast: false
matrix:
host-machine: [
{ arch: x86, instance: "linux.12xlarge" },
{ arch: arm, instance: "linux.arm64.m7g.4xlarge" },
]
library-type: [ static, shared ]
compiler: [
{ name: gcc, version: 11.4.0 },
{ name: gcc, version: 14.1.0 },
{ name: clang, version: 16.0.6 }
]
steps:
- name: Setup Build Container
run: yum update -y; yum install -y binutils findutils git pciutils sudo wget which
- name: Checkout the Repository
uses: actions/checkout@v6
with:
submodules: true
- name: Display System Info
run: . $PRELUDE; print_system_info
- name: Setup Miniconda
run: . $PRELUDE; setup_miniconda $HOME/miniconda
- name: Create Conda Environment
run: . $PRELUDE; create_conda_environment $BUILD_ENV 3.14
- name: Set GCC version
if: matrix.compiler.name == 'gcc'
run: echo "GCC_VERSION=${{ matrix.compiler.version }}" >> $GITHUB_ENV
- name: Set LLVM version
if: matrix.compiler.name == 'clang'
run: echo "LLVM_VERSION=${{ matrix.compiler.version }}" >> $GITHUB_ENV
- name: Install C/C++ Compilers
run: . $PRELUDE; install_cxx_compiler $BUILD_ENV ${{ matrix.compiler.name }}
- name: Install Build Tools
run: . $PRELUDE; install_build_tools $BUILD_ENV
- name: Build FBGEMM Library (${{ matrix.library-type }})
run: . $PRELUDE; build_fbgemm_library $BUILD_ENV cmake $BUILD_DIR ${{ matrix.library-type }}
- name: Test FBGEMM Library (${{ matrix.library-type }})
run: . $PRELUDE; test_fbgemm_library $BUILD_ENV $BUILD_DIR
build-macos:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
env:
PRELUDE: .github/scripts/setup_env.bash
BUILD_DIR: build_${{ matrix.library-type }}
strategy:
fail-fast: false
matrix:
os: [ macos-14 ]
library-type: [ static, shared ]
steps:
- name: Checkout the Repository
uses: actions/checkout@v6
with:
submodules: true
- name: Display System Info
run: . $PRELUDE; print_system_info
# Build but skip tests due to lack of support for AVX2
- name: Build FBGEMM Library (${{ matrix.library-type }})
run: |
set -e
mkdir $BUILD_DIR; cd $BUILD_DIR
cmake --version
cmake -DFBGEMM_USE_SANITIZER=address -DFBGEMM_LIBRARY_TYPE=${{ matrix.library-type }} ..
make -j VERBOSE=1
build-bazel:
if: ${{ github.repository_owner == 'pytorch' }}
runs-on: ${{ matrix.host-machine.instance }}
container:
image: amazonlinux:2023
options: --user root
defaults:
run:
shell: bash
env:
PRELUDE: .github/scripts/setup_env.bash
BUILD_ENV: build_bazel
strategy:
fail-fast: false
matrix:
host-machine: [
{ arch: x86, instance: "linux.12xlarge" },
]
compiler: [ "gcc", "clang" ]
steps:
- name: Setup Build Container
run: yum update -y; yum install -y binutils findutils git pciutils sudo wget which
- name: Checkout the Repository
uses: actions/checkout@v6
with:
submodules: true
- name: Display System Info
run: . $PRELUDE; print_system_info
- name: Setup Miniconda
run: . $PRELUDE; setup_miniconda $HOME/miniconda
- name: Create Conda Environment
run: . $PRELUDE; create_conda_environment $BUILD_ENV 3.14
- name: Install C/C++ Compilers
run: . $PRELUDE; install_cxx_compiler $BUILD_ENV ${{ matrix.compiler }}
- name: Install Build Tools
run: . $PRELUDE; install_build_tools $BUILD_ENV
- name: Build FBGEMM Library
run: . $PRELUDE; build_fbgemm_library $BUILD_ENV bazel
- name: Test FBGEMM Library
run: . $PRELUDE; print_exec conda run --no-capture-output -n $BUILD_ENV bazel test -s :*