Skip to content

Commit

Permalink
Merge branch 'master' into merge-substitution-builder
Browse files Browse the repository at this point in the history
  • Loading branch information
victorli2002 authored Jan 15, 2025
2 parents f2c8e7b + 5e7f207 commit 030b0e8
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 180 deletions.
40 changes: 40 additions & 0 deletions .flake/pkgs/ffdb/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{ lib
, stdenv
, makeWrapper
, gdb
, python3
, proj
}:

stdenv.mkDerivation rec {
pname = "ffdb";
version = "0.1";

pythonPath = with python3.pkgs; makePythonPath [
proj
];

dontBuild = true;

nativeBuildInputs = [ makeWrapper ];

src = ./.;

installPhase = ''
mkdir -p $out/share/ffdb
cp ffdb.py $out/share/ffdb
makeWrapper ${gdb}/bin/gdb $out/bin/gdb \
--add-flags "-q -x $out/share/ffdb/ffdb.py" \
--set NIX_PYTHONPATH ${pythonPath} \
--prefix PATH : ${lib.makeBinPath [
python3
]}
cp $out/bin/gdb $out/bin/ffdb
'';

nativeCheckInputs = [
gdb
python3
proj
];
}
7 changes: 7 additions & 0 deletions .flake/pkgs/ffdb/ffdb.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from proj.config_file import get_config_root
from pathlib import Path
import gdb

gdb.execute(f'directory {get_config_root(Path.cwd())}')
gdb.prompt_hook = lambda x: '(ffdb) '
gdb.execute('set history save on')
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# gdb history
.gdb_history

# dtgen files
*.dtg.cc
*.dtg.h
Expand Down
2 changes: 1 addition & 1 deletion cmake/flexflow-utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function(ff_set_cxx_properties target)
CXX_EXTENSIONS NO
)
target_compile_options(${target}
PRIVATE $<$<COMPILE_LANGUAGE:CXX>:> # add C++ compile flags here
PRIVATE $<$<COMPILE_LANGUAGE:CXX>:> "-ffile-prefix-map=${CMAKE_SOURCE_DIR}=." # add C++ compile flags here
)
endfunction()

Expand Down
6 changes: 3 additions & 3 deletions flake.lock

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

11 changes: 7 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,13 @@
mkShell = pkgs.mkShell.override {
stdenv = pkgs.cudaPackages.backendStdenv;
};

proj = proj-repo.packages.${system}.proj;
in
{
packages = {
legion = pkgs.callPackage ./.flake/pkgs/legion.nix { };
ffdb = pkgs.callPackage ./.flake/pkgs/ffdb { inherit proj; };
hpp2plantuml = pkgs.python3Packages.callPackage ./.flake/pkgs/hpp2plantuml.nix { };
rapidcheckFull = pkgs.symlinkJoin {
name = "rapidcheckFull";
Expand Down Expand Up @@ -102,9 +105,7 @@
doxygen
lcov # for code coverage
])
(with proj-repo.packages.${system}; [
proj
])
[ proj ]
(with self.packages.${system}; [
legion
hpp2plantuml
Expand All @@ -128,7 +129,6 @@
gh-markdown-preview
shellcheck
plantuml
gdb
ruff
compdb
jq
Expand All @@ -148,6 +148,9 @@
black
toml
])
(with self.packages.${system}; [
ffdb
])
];
};
};
Expand Down
77 changes: 0 additions & 77 deletions scripts/format.sh

This file was deleted.

95 changes: 0 additions & 95 deletions scripts/gdb/pretty_print.py

This file was deleted.

0 comments on commit 030b0e8

Please sign in to comment.