Skip to content

Commit

Permalink
Move CI over to proj entirely
Browse files Browse the repository at this point in the history
  • Loading branch information
lockshaw committed Jan 17, 2025
1 parent 798f1ec commit 1225f15
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 128 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/gpu-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
env:
NIXPKGS_ALLOW_UNFREE: 1
with:
arguments: "--accept-flake-config --impure"
arguments: ".#gpu-ci --accept-flake-config --impure"

- name: ccache
uses: hendrikmuhs/[email protected]
Expand All @@ -54,8 +54,6 @@ jobs:
run: |
proj cmake
- name: build test binaries
run: cd build/normal && make -j8 kernels-tests

- name: run tests
run: cd build/normal && ctest --progress --output-on-failure -L "^(kernels-tests)$"
- name: build and run gpu tests
run: |
proj test -j$(nproc) --skip-build-cpu-tests
98 changes: 4 additions & 94 deletions .github/workflows/per-lib-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,113 +42,23 @@ jobs:
env:
NIXPKGS_ALLOW_UNFREE: 1
with:
arguments: "--accept-flake-config --impure"
arguments: ".#ci --accept-flake-config"

- name: ccache
uses: hendrikmuhs/[email protected]

# - name: Install system dependencies
# run: FF_GPU_BACKEND=${{ matrix.gpu_backend }} .github/workflows/helpers/install_dependencies.sh

# - name: Install conda and FlexFlow dependencies
# uses: conda-incubator/setup-miniconda@v2
# with:
# activate-environment: flexflow
# environment-file: packaging/conda/environment.yml
# auto-activate-base: false

- name: Regenerate all dtgen files
run: |
proj dtgen --force
- name: Run cmake
run: |
cmake_${{ matrix.gpu_backend }}.sh
- name: Build utils
run: |
build_target.sh utils
- name: Build op-attrs
run: |
build_target.sh op-attrs
- name: Build pcg
run: |
build_target.sh pcg
- name: Build kernels
run: |
build_target.sh kernels
- name: Build substitutions
run: |
build_target.sh substitutions
- name: Build compiler
run: |
build_target.sh compiler
- name: Build substitution-generator
run: |
build_target.sh substitution-generator
- name: Build local-execution
run: |
build_target.sh local-execution
- name: Build models
run: |
build_target.sh models
proj cmake --dtgen-skip
- name: Build substitution-to-dot
- name: Run build and tests
run: |
build_target.sh substitution-to-dot
proj test -j$(nproc) --coverage --skip-gpu-tests
- name: Build export-model-arch
run: |
build_target.sh export-model-arch
- name: Test utils
run: |
test_target.sh utils
- name: Test op-attrs
run: |
test_target.sh op-attrs
- name: Test pcg
run: |
test_target.sh pcg
- name: Test substitutions
run: |
test_target.sh substitutions
- name: Test compiler
run: |
test_target.sh compiler
- name: Test substitution-generator
run: |
test_target.sh substitution-generator
- name: Test local-execution
run: |
test_target.sh local-execution
- name: Test models
run: |
test_target.sh models
- name: Generate code coverage
run: |
echo "gitwork: $GITHUB_WORKSPACE"
lcov --capture --directory . --output-file main_coverage.info
lcov --extract main_coverage.info "$GITHUB_WORKSPACE/lib/*" --output-file main_coverage.info
lcov --remove main_coverage.info "$GITHUB_WORKSPACE/lib/*.dtg.h" "$GITHUB_WORKSPACE/lib/*.dtg.cc" --output-file main_coverage.info
lcov --list main_coverage.info
- name: Upload code coverage
uses: codecov/codecov-action@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .proj.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ build_targets = [
]

test_targets = [
"kernels-tests",
"utils-tests",
"op-attrs-tests",
"kernels-tests",
"pcg-tests",
"substitutions-tests",
"compiler-tests",
Expand Down
10 changes: 5 additions & 5 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 26 additions & 22 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
flake-utils.url = "github:numtide/flake-utils";

proj-repo = {
url = "github:lockshaw/proj";
url = "github:chenzhuofu/proj";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
Expand Down Expand Up @@ -71,25 +71,20 @@
ci = mkShell {
shellHook = ''
export PATH="$HOME/ff/.scripts/:$PATH"
export NIX_GL=1
export RC_PARAMS="max_discard_ration=100"
export CMAKE_FLAGS="-DFF_USE_EXTERNAL_LEGION=ON \
-DFF_USE_EXTERNAL_NCCL=ON \
-DFF_USE_EXTERNAL_JSON=ON \
-DFF_USE_EXTERNAL_FMT=ON \
-DFF_USE_EXTERNAL_SPDLOG=ON \
-DFF_USE_EXTERNAL_DOCTEST=ON \
-DFF_USE_EXTERNAL_RAPIDCHECK=ON \
-DFF_USE_EXTERNAL_EXPECTED=ON \
-DFF_USE_EXTERNAL_RANGEV3=ON \
-DFF_USE_EXTERNAL_BOOST_PREPROCESSOR=ON \
-DFF_USE_EXTERNAL_TYPE_INDEX=ON"
'';

CMAKE_FLAGS = lib.strings.concatStringsSep " " [
"-DFF_USE_EXTERNAL_LEGION=ON"
"-DFF_USE_EXTERNAL_NCCL=ON"
"-DFF_USE_EXTERNAL_JSON=ON"
"-DFF_USE_EXTERNAL_FMT=ON"
"-DFF_USE_EXTERNAL_SPDLOG=ON"
"-DFF_USE_EXTERNAL_DOCTEST=ON"
"-DFF_USE_EXTERNAL_RAPIDCHECK=ON"
"-DFF_USE_EXTERNAL_EXPECTED=ON"
"-DFF_USE_EXTERNAL_RANGEV3=ON"
"-DFF_USE_EXTERNAL_BOOST_PREPROCESSOR=ON"
"-DFF_USE_EXTERNAL_TYPE_INDEX=ON"
];

RC_PARAMS = "max_discard_ratio=100";

buildInputs = builtins.concatLists [
(with pkgs; [
zlib
Expand All @@ -115,9 +110,6 @@
(with proj-repo.packages.${system}; [
proj
])
(with nixGL.packages.${system}; [
nixGLDefault
])
(with self.packages.${system}; [
legion
hpp2plantuml
Expand All @@ -127,9 +119,17 @@
];
};

gpu-ci = mkShell {
inputsFrom = [ ci ];
buildInputs = builtins.concatLists [
(with nixGL.packages.${system}; [
nixGLDefault
])
];
};

default = mkShell {
inputsFrom = [ ci ];
inherit (ci) CMAKE_FLAGS RC_PARAMS;

VIMPLUGINS = lib.strings.concatStringsSep "," [
"${proj-repo.packages.${system}.proj-nvim}"
Expand Down Expand Up @@ -165,6 +165,10 @@
])
];
};

gpu = mkShell {
inputsFrom = [ gpu-ci default ];
};
};
}
);
Expand Down

0 comments on commit 1225f15

Please sign in to comment.