Skip to content

Commit 04a3b06

Browse files
author
Victor Li
committed
Merge remote-tracking branch 'origin/master' into merge-substitution-builder
2 parents f299e7d + fd3d7f1 commit 04a3b06

File tree

303 files changed

+7301
-2859
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

303 files changed

+7301
-2859
lines changed

.flake/pkgs/bencher-cli.nix

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{ stdenv
2+
, lib
3+
, fetchurl
4+
, alsaLib
5+
, openssl
6+
, zlib
7+
, pulseaudio
8+
, autoPatchelfHook
9+
}:
10+
11+
stdenv.mkDerivation rec {
12+
pname = "bencher-cli";
13+
version = "0.4.33";
14+
15+
system = "x86_64-linux";
16+
17+
src = fetchurl {
18+
url = "https://github.com/bencherdev/bencher/releases/download/v${version}/bencher-v${version}-linux-x86-64";
19+
hash = "sha256-3q2ZGSqbcMaUcNMGJN+IsEP/+RlYHnsmiWdJ2oV2qmw=";
20+
};
21+
22+
nativeBuildInputs = [
23+
autoPatchelfHook
24+
];
25+
26+
dontUnpack = true;
27+
28+
installPhase = ''
29+
ls
30+
runHook preInstall
31+
install -m755 -D $src $out/bin/bencher
32+
runHook postInstall
33+
'';
34+
35+
meta = with lib; {
36+
homepage = "https://bencher.dev/";
37+
platforms = platforms.linux;
38+
};
39+
}

.flake/pkgs/cpptrace.nix

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{ fetchFromGitHub
2+
, stdenv
3+
, lib
4+
, cmake
5+
, pkg-config
6+
, zstd
7+
, libdwarf-lite
8+
, libunwind
9+
}:
10+
11+
stdenv.mkDerivation rec {
12+
pname = "cpptrace";
13+
version = "0.7.5";
14+
15+
src = fetchFromGitHub {
16+
owner = "jeremy-rifkin";
17+
repo = "cpptrace";
18+
rev = "v${version}";
19+
sha256 = "sha256-2rDyH9vo47tbqqZrTupAOrMySj4IGKeWX8HBTGjFf+g=";
20+
};
21+
22+
nativeBuildInputs = [
23+
cmake
24+
pkg-config
25+
];
26+
27+
buildInputs = [
28+
zstd
29+
libdwarf-lite
30+
libunwind
31+
];
32+
33+
cmakeFlags = [
34+
"-DBUILD_SHARED_LIBS=On"
35+
"-DCPPTRACE_USE_EXTERNAL_ZSTD=1"
36+
"-DCPPTRACE_USE_EXTERNAL_LIBDWARF=1"
37+
"-DCPPTRACE_STD_FORMAT=0"
38+
"-DCPPTRACE_STATIC_DEFINE=0"
39+
"-DCPPTRACE_UNWIND_WITH_LIBUNWIND=1"
40+
"-DCPPTRACE_FIND_LIBDWARF_WITH_PKGCONFIG=1"
41+
];
42+
43+
meta = with lib; {
44+
description = "Simple, portable, and self-contained stacktrace library for C++11 and newer";
45+
homepage = "https://github.com/jeremy-rifkin/cpptrace";
46+
license = licenses.mit;
47+
};
48+
}

.flake/pkgs/fccf/default.nix

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{ fetchFromGitHub
2+
, stdenv
3+
, cmake
4+
, pkg-config
5+
, libclang
6+
, libllvm
7+
, lib
8+
, zlib
9+
, argparse
10+
, nlohmann_json
11+
, fmt
12+
}:
13+
14+
stdenv.mkDerivation rec {
15+
pname = "fccf";
16+
version = "03d373fc65e2d7ceeac441ba4bbddfdc25618dff";
17+
18+
src = fetchFromGitHub {
19+
owner = "p-ranav";
20+
repo = "fccf";
21+
rev = version;
22+
sha256 = "sha256-3NdPon5ZfjoGFFgBlb0rzRnfWgSopvAc5Gls2NWHaOE=";
23+
};
24+
25+
nativeBuildInputs = [
26+
cmake
27+
pkg-config
28+
];
29+
30+
buildInputs = [
31+
libclang
32+
libllvm
33+
zlib
34+
argparse
35+
nlohmann_json
36+
fmt
37+
];
38+
39+
patches = [
40+
./json-package-name.patch
41+
./fix-argparse-include.patch
42+
];
43+
44+
cmakeFlags = [
45+
"-DCMAKE_BUILD_TYPE=Release"
46+
"-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS"
47+
];
48+
49+
meta = with lib; {
50+
description = "A command-line tool that quickly searches through C/C++ source code in a directory based on a search string and prints relevant code snippets that match the query";
51+
homepage = "https://github.com/p-ranav/fccf";
52+
license = licenses.mit;
53+
};
54+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/source/main.cpp b/source/main.cpp
2+
index 7e131d3..6c05d89 100644
3+
--- a/source/main.cpp
4+
+++ b/source/main.cpp
5+
@@ -6,7 +6,7 @@
6+
#include <string_view>
7+
#include <vector>
8+
9+
-#include <argparse.hpp>
10+
+#include <argparse/argparse.hpp>
11+
#include <nlohmann/json.hpp>
12+
#include "searcher.hpp"
13+
#include <unistd.h>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index 20bcbbf..923075f 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -48,6 +48,7 @@ FetchContent_MakeAvailable(fmt)
6+
7+
FetchContent_Declare(json
8+
URL https://github.com/nlohmann/json/releases/download/v3.10.5/json.tar.xz
9+
+ FIND_PACKAGE_ARGS NAMES nlohmann_json
10+
)
11+
FetchContent_MakeAvailable(json)
12+

.flake/pkgs/libassert.nix

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{ fetchFromGitHub
2+
, stdenv
3+
, lib
4+
, cmake
5+
, cpptrace
6+
, zstd
7+
}:
8+
9+
stdenv.mkDerivation rec {
10+
pname = "libassert";
11+
version = "2.1.4";
12+
13+
src = fetchFromGitHub {
14+
owner = "jeremy-rifkin";
15+
repo = "libassert";
16+
rev = "v${version}";
17+
sha256 = "sha256-Zkh6JjJqtOf91U01fpP4hKhhXfH7YGInodG8CZxHHXQ=";
18+
};
19+
20+
nativeBuildInputs = [
21+
cmake
22+
];
23+
24+
propagatedBuildInputs = [
25+
cpptrace
26+
zstd
27+
];
28+
29+
cmakeFlags = [
30+
"-DBUILD_SHARED_LIBS=1"
31+
"-DLIBASSERT_USE_EXTERNAL_CPPTRACE=1"
32+
];
33+
34+
meta = with lib; {
35+
description = "The most over-engineered C++ assertion library";
36+
homepage = "https://github.com/jeremy-rifkin/libassert";
37+
license = licenses.mit;
38+
};
39+
}

.flake/pkgs/libdwarf-lite.nix

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
lib,
3+
stdenv,
4+
fetchFromGitHub,
5+
cmake,
6+
}:
7+
8+
stdenv.mkDerivation (finalAttrs: {
9+
pname = "libdwarf-lite";
10+
version = "0.11.1";
11+
12+
src = fetchFromGitHub {
13+
owner = "jeremy-rifkin";
14+
repo = "libdwarf-lite";
15+
rev = "v${finalAttrs.version}";
16+
hash = "sha256-qHikjAG5xuuHquqqKGuiDHXVZSlg/MbNp9JNSAKM/Hs=";
17+
};
18+
19+
outputs = [
20+
"dev"
21+
"lib"
22+
"out"
23+
];
24+
25+
nativeBuildInputs = [ cmake ];
26+
27+
cmakeFlags = [
28+
(lib.cmakeBool "BUILD_DWARFDUMP" false)
29+
(lib.cmakeBool "PIC_ALWAYS" true)
30+
];
31+
32+
meta = {
33+
description = "Minimal libdwarf mirror for faster cloning and configuration";
34+
homepage = "https://github.com/jeremy-rifkin/libdwarf-lite";
35+
license = lib.licenses.lgpl21Only;
36+
maintainers = [ ];
37+
mainProgram = "libdwarf-lite";
38+
platforms = lib.platforms.all;
39+
};
40+
})

.github/runs-on.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
images:
2-
runs-on-gpu-pinned:
2+
flexflow-gpu-ci:
33
platform: "linux"
44
arch: "x64"
5-
owner: "135269210855" # runs-on
6-
name: "runs-on-v2.2-ubuntu22-gpu-x64-20250123194414"
5+
owner: "409719625166" # flexflow
6+
name: "flexflow-gpu-ci"
77

8-
runs-on-cpu-pinned:
9-
platform: "linux"
10-
arch: "x64"
11-
owner: "135269210855" # runs-on
12-
name: "runs-on-v2.2-ubuntu22-full-x64-20250101080516"

.github/workflows/clang-format.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.github/workflows/tests.yml

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ concurrency:
77
jobs:
88
cpu-ci:
99
name: CPU unit tests and build
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-24.04
1111

1212
steps:
1313
- name: Checkout Git Repository
@@ -26,8 +26,8 @@ jobs:
2626
- uses: cachix/cachix-action@v14
2727
with:
2828
name: ff
29-
skipPush: true
30-
# authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
29+
skipPush: ${{ github.head_ref == 'master' }}
30+
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
3131

3232
- name: setup nix develop shell
3333
uses: nicknovitski/[email protected]
@@ -39,17 +39,9 @@ jobs:
3939
- name: ccache
4040
uses: hendrikmuhs/[email protected]
4141

42-
- name: Regenerate all dtgen files
43-
run: |
44-
proj dtgen --force
45-
46-
- name: Run cmake
47-
run: |
48-
proj cmake --dtgen-skip
49-
50-
- name: Run build and tests
42+
- name: Run checks
5143
run: |
52-
proj test --dtgen-skip -j$(nproc) --coverage --skip-gpu-tests
44+
proj check cpu-ci
5345
5446
- name: Upload code coverage
5547
uses: codecov/codecov-action@v4
@@ -65,9 +57,9 @@ jobs:
6557
name: GPU unit tests
6658
needs: cpu-ci
6759
runs-on:
68-
- runs-on
60+
- runs-on=${{ github.run_id }}
6961
- family=g4dn.xlarge
70-
- image=runs-on-gpu-pinned
62+
- image=flexflow-gpu-ci
7163

7264
strategy:
7365
max-parallel: 1
@@ -104,14 +96,6 @@ jobs:
10496
- name: ccache
10597
uses: hendrikmuhs/[email protected]
10698

107-
- name: regenerate all dtgen files
108-
run: |
109-
proj dtgen --force
110-
111-
- name: run cmake
112-
run: |
113-
proj cmake --dtgen-skip
114-
115-
- name: build and run gpu tests
99+
- name: Run checks
116100
run: |
117-
proj test --dtgen-skip -j$(nproc) --skip-build-cpu-tests
101+
proj check gpu-ci

0 commit comments

Comments
 (0)