diff --git a/.flake/patches/doctest-template-test.patch b/.flake/patches/doctest-template-test.patch deleted file mode 100644 index ca4d0d9a18..0000000000 --- a/.flake/patches/doctest-template-test.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff --git a/scripts/cmake/doctestAddTests.cmake b/scripts/cmake/doctestAddTests.cmake -index 3b25485..d3ba906 100644 ---- a/scripts/cmake/doctestAddTests.cmake -+++ b/scripts/cmake/doctestAddTests.cmake -@@ -56,12 +56,14 @@ foreach(line ${output}) - if("${line}" STREQUAL "===============================================================================" OR "${line}" MATCHES [==[^\[doctest\] ]==]) - continue() - endif() -- set(test ${line}) -+ set(unescaped_test ${line}) -+ # use escape commas to handle properly test cases with commas inside the name -+ string(REPLACE "," "\\," escaped_test ${unescaped_test}) - set(labels "") - if(${add_labels}) - # get test suite that test belongs to - execute_process( -- COMMAND ${TEST_EXECUTOR} "${TEST_EXECUTABLE}" --test-case=${test} --list-test-suites -+ COMMAND ${TEST_EXECUTOR} "${TEST_EXECUTABLE}" --test-case=${escaped_test} --list-test-suites - OUTPUT_VARIABLE labeloutput - RESULT_VARIABLE labelresult - WORKING_DIRECTORY "${TEST_WORKING_DIR}" -@@ -85,24 +87,22 @@ foreach(line ${output}) - - if(NOT "${junit_output_dir}" STREQUAL "") - # turn testname into a valid filename by replacing all special characters with "-" -- string(REGEX REPLACE "[/\\:\"|<>]" "-" test_filename "${test}") -+ string(REGEX REPLACE "[/\\:\"|<>]" "-" test_filename "${unescaped_test}") - set(TEST_JUNIT_OUTPUT_PARAM "--reporters=junit" "--out=${junit_output_dir}/${prefix}${test_filename}${suffix}.xml") - else() - unset(TEST_JUNIT_OUTPUT_PARAM) - endif() -- # use escape commas to handle properly test cases with commas inside the name -- string(REPLACE "," "\\," test_name ${test}) - # ...and add to script - add_command(add_test -- "${prefix}${test}${suffix}" -+ "${prefix}${unescaped_test}${suffix}" - ${TEST_EXECUTOR} - "${TEST_EXECUTABLE}" -- "--test-case=${test_name}" -+ "--test-case=${escaped_test}" - "${TEST_JUNIT_OUTPUT_PARAM}" - ${extra_args} - ) - add_command(set_tests_properties -- "${prefix}${test}${suffix}" -+ "${prefix}${unescaped_test}${suffix}" - PROPERTIES - WORKING_DIRECTORY "${TEST_WORKING_DIR}" - ${properties} diff --git a/.flake/pkgs/bencher-cli.nix b/.flake/pkgs/bencher-cli.nix index bd7b908786..a920da6329 100644 --- a/.flake/pkgs/bencher-cli.nix +++ b/.flake/pkgs/bencher-cli.nix @@ -1,7 +1,7 @@ { stdenv , lib , fetchurl -, alsaLib +, alsa-lib , openssl , zlib , pulseaudio diff --git a/.flake/pkgs/cudnn.nix b/.flake/pkgs/cudnn.nix new file mode 100644 index 0000000000..3c36e19041 --- /dev/null +++ b/.flake/pkgs/cudnn.nix @@ -0,0 +1,13 @@ +{ cudaPackages +, fetchurl +}: + +# Pin the latest cuDNN version with support for NVIDIA Pascal GPUs. +cudaPackages.cudnn.overrideAttrs (finalAttrs: _: { + version = "9.10.2.21"; + + src = fetchurl { + url = "https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/linux-x86_64/cudnn-linux-x86_64-${finalAttrs.version}_cuda12-archive.tar.xz"; + hash = "sha256-0N78vExtrXEf9Mtm0lQDajAMkHGwfHtkGZqsq1NDE8E="; + }; +}) diff --git a/.flake/pkgs/fccf/default.nix b/.flake/pkgs/fccf/default.nix index f792b8606c..8196b436c4 100644 --- a/.flake/pkgs/fccf/default.nix +++ b/.flake/pkgs/fccf/default.nix @@ -39,6 +39,7 @@ stdenv.mkDerivation rec { patches = [ ./json-package-name.patch ./fix-argparse-include.patch + ./fix-cstdint-include.patch ]; cmakeFlags = [ diff --git a/.flake/pkgs/fccf/fix-cstdint-include.patch b/.flake/pkgs/fccf/fix-cstdint-include.patch new file mode 100644 index 0000000000..c7a6a41574 --- /dev/null +++ b/.flake/pkgs/fccf/fix-cstdint-include.patch @@ -0,0 +1,10 @@ +diff --git a/source/sse2_strstr.cpp b/source/sse2_strstr.cpp +index 44441ea..347cafd 100644 +--- a/source/sse2_strstr.cpp ++++ b/source/sse2_strstr.cpp +@@ -1,4 +1,5 @@ + #include ++#include + #include + + #include diff --git a/.flake/pkgs/hpp2plantuml.nix b/.flake/pkgs/hpp2plantuml.nix index d5aba814f1..46ee0eef76 100644 --- a/.flake/pkgs/hpp2plantuml.nix +++ b/.flake/pkgs/hpp2plantuml.nix @@ -1,4 +1,9 @@ -{buildPythonPackage, fetchPypi}: +{ buildPythonPackage +, fetchPypi +, jinja2 +, robotpy-cppheaderparser +, sphinx +}: buildPythonPackage rec { pname = "hpp2plantuml"; @@ -8,4 +13,16 @@ buildPythonPackage rec { inherit pname version format; sha256 = "sha256-PfTJmBypI21AAK3sMojygQfrhnRqcMmVCW4dxGfDfQg="; }; + + # argparse is part of the python 3 standard library, so there is no + # corresponding nixpkgs package to depend on. + pythonRemoveDeps = [ "argparse" ]; + + dependencies = [ + jinja2 + robotpy-cppheaderparser + sphinx + ]; + + pythonImportsCheck = [ "hpp2plantuml" ]; } diff --git a/.flake/pkgs/nixgl/default.nix b/.flake/pkgs/nixgl/default.nix new file mode 100644 index 0000000000..429b3c2481 --- /dev/null +++ b/.flake/pkgs/nixgl/default.nix @@ -0,0 +1,18 @@ +{ applyPatches +, pkgs +, src +}: + +# Need a not-yet-merged PR for nixGL compatibility with NixOS 26.05. +# +# This evaluates to nixGL's package set, not a derivation, so it belongs in a +# let binding rather than in the flake's `packages` output. +import + (applyPatches { + name = "nixGL-patched-source"; + inherit src; + patches = [ ./drop-kernel-override.patch ]; + }) + { + inherit pkgs; + } diff --git a/.flake/pkgs/nixgl/drop-kernel-override.patch b/.flake/pkgs/nixgl/drop-kernel-override.patch new file mode 100644 index 0000000000..e57e07a25a --- /dev/null +++ b/.flake/pkgs/nixgl/drop-kernel-override.patch @@ -0,0 +1,16 @@ +`kernel` parameter is gone as of https://github.com/NixOS/nixpkgs/pull/498612 + +Matching PR for nixGL in https://github.com/nix-community/nixGL/pull/223 +(among other things, not relevant to our use case) +and has not been merged as of 2026-07-27. + +--- a/nixGL.nix ++++ b/nixGL.nix +@@ -86,7 +86,6 @@ + + nvidiaLibsOnly = nvidiaDrivers.override { + libsOnly = true; +- kernel = null; + }; + + nixGLNvidiaBumblebee = writeExecutable { diff --git a/.flake/pkgs/realm.nix b/.flake/pkgs/realm.nix index 336b1c050c..f66da107df 100644 --- a/.flake/pkgs/realm.nix +++ b/.flake/pkgs/realm.nix @@ -13,13 +13,13 @@ in stdenv.mkDerivation rec { pname = "realm"; - version = "2026-02-24"; + version = "2026-07-01"; src = fetchFromGitHub { owner = "StanfordLegion"; repo = "realm"; - rev = "42f7484a80e0bdacaf47d9a758822f5327348dd0"; - sha256 = "sha256-IHiokPmTjEV5df3fr1Xubuyt2N1CFI2fA7Q2TsbxS3Y="; + rev = "dba83452d4a211e3a0c0e5d4849c26ce7b56bba3"; + sha256 = "sha256-dLGmUgupDX0dDErZbuP5ipj2Cwf+rOhVGC/+angRyBY="; }; nativeBuildInputs = [ diff --git a/.flake/pkgs/robotpy-cppheaderparser.nix b/.flake/pkgs/robotpy-cppheaderparser.nix new file mode 100644 index 0000000000..e574205be7 --- /dev/null +++ b/.flake/pkgs/robotpy-cppheaderparser.nix @@ -0,0 +1,22 @@ +{ buildPythonPackage +, fetchPypi +, setuptools +, ply +}: + +buildPythonPackage rec { + pname = "robotpy-cppheaderparser"; + version = "5.1.2"; + pyproject = true; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-FdNQs5NYtFzbH+E4r578zg5jLBtYgwoboboJihdSaYs="; + }; + + build-system = [ setuptools ]; + + dependencies = [ ply ]; + + pythonImportsCheck = [ "CppHeaderParser" ]; +} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 799e3069a9..a22b0f631e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -43,11 +43,40 @@ jobs: run: | proj check cpu-ci + - name: Generate code coverage + run: | + # A toolchain mismatch between the instrumentation and libgcov makes + # every test abort profiling without writing anything, which would + # otherwise surface as a silent 0% report rather than a failure. + gcda_count="$(find build/coverage -name '*.gcda' | wc -l)" + echo "found $gcda_count .gcda files" + if [ "$gcda_count" -eq 0 ]; then + echo "::error::no coverage data was produced by the test run" >&2 + exit 1 + fi + # lcov 2.x treats several classes of gcov disagreement as hard + # errors; gcc emits them routinely for templates, so downgrade them. + lcov_opts=( + --rc geninfo_unexecuted_blocks=1 + --ignore-errors "inconsistent,mismatch,unused,negative,source,empty" + -j "$(nproc)" + ) + lcov "${lcov_opts[@]}" --capture --directory build/coverage --output-file coverage-all.info + # Paths recorded by geninfo are absolute, so anchor on $PWD rather + # than a bare 'lib/*'. + lcov "${lcov_opts[@]}" --extract coverage-all.info "$PWD/lib/*" --output-file coverage-lib.info + lcov "${lcov_opts[@]}" --remove coverage-lib.info '*.dtg.h' '*.dtg.cc' --output-file main_coverage.info + lcov "${lcov_opts[@]}" --list main_coverage.info + - name: Upload code coverage uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} - file: main_coverage.info + files: main_coverage.info + # We hand codecov the one report we generated above; without these it + # searches the tree and runs its gcov plugin over the whole build. + disable_search: true + plugins: noop flags: unittests name: codecov-umbrella fail_ci_if_error: false diff --git a/contributing.dox b/contributing.dox index b86be494c5..7595cfaa61 100644 --- a/contributing.dox +++ b/contributing.dox @@ -189,7 +189,7 @@ We actively welcome your pull requests. Note that we may already be working on t The steps for getting changes merged into %FlexFlow are relatively standard: 1. [Fork the repo](https://github.com/flexflow/flexflow-train/fork) and either create a new branch based on `master`, or just modify `master` directly. -2. If you've added code that should be tested, add tests. The process for adding tests for code under `lib` is documented [here](./lib/README.md#tests). Adding tests for other parts of the code is currently undocumented, so you will \ref contributing-contact-us "contact us" for information on how to do it. +2. If you've added code that should be tested, add tests. The process for adding tests is currently undocumented, so you will \ref contributing-contact-us "contact us" for information on how to do it. 3. Ensure the code builds (i.e., run `proj build`). 4. Ensure the test suite passes (i.e., run `proj test`). 5. Format the code (i.e., run `proj format`). diff --git a/flake.lock b/flake.lock index 233e2265e2..96ed16b784 100644 --- a/flake.lock +++ b/flake.lock @@ -43,16 +43,15 @@ }, "nixpkgs": { "locked": { - "lastModified": 1710162809, - "narHash": "sha256-i2R2bcnQp+85de67yjgZVvJhd6rRnJbSYNpGmB6Leb8=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "ddcd7598b2184008c97e6c9c6a21c5f37590b8d2", - "type": "github" + "lastModified": 315532800, + "narHash": "sha256-DUedXhD2Rg8q4Xyd07Sb90eZGy4gg6W+Vl/WbLNwAZo=", + "rev": "b3fe9581c9061c749abef42b6d4ee7b7c05c33fa", + "type": "tarball", + "url": "https://releases.nixos.org/nixos/26.05/nixos-26.05.5845.b3fe9581c906/nixexprs.tar.xz?lastModified=1784707089" }, "original": { "id": "nixpkgs", - "ref": "nixos-23.11", + "ref": "nixos-26.05", "type": "indirect" } }, @@ -63,37 +62,22 @@ ], "nixpkgs": [ "nixpkgs" - ], - "python38-nixpkgs": "python38-nixpkgs" + ] }, "locked": { - "lastModified": 1781917763, - "narHash": "sha256-Qd8CW+G/orxU9Ne6fNqKAbJL404WeV7/kdY/9TNJ5Lw=", - "ref": "refs/heads/master", - "rev": "f2bdddab299b98fb67612e3c04136949b2339d74", - "revCount": 161, + "lastModified": 1785092161, + "narHash": "sha256-ie84PqMqUQNxAknPBdzKSWIInSS4ZSTCJ0JbISEZTAU=", + "ref": "refs/heads/update-nix", + "rev": "6221d815035398e8fce12a55b79fd7bd7d077965", + "revCount": 162, "type": "git", - "url": "https://git.sr.ht/~lockshaw/proj" + "url": "https://github.com/elliottslaughter/proj.git" }, "original": { + "ref": "refs/heads/update-nix", + "rev": "6221d815035398e8fce12a55b79fd7bd7d077965", "type": "git", - "url": "https://git.sr.ht/~lockshaw/proj" - } - }, - "python38-nixpkgs": { - "locked": { - "lastModified": 1645131486, - "narHash": "sha256-AuWJe0TiqHD6L7Vzcar4QOblMGubKHsuVs3YFMCRYl0=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "7592790b9e02f7f99ddcb1bd33fd44ff8df6a9a7", - "type": "github" - }, - "original": { - "owner": "nixos", - "repo": "nixpkgs", - "rev": "7592790b9e02f7f99ddcb1bd33fd44ff8df6a9a7", - "type": "github" + "url": "https://github.com/elliottslaughter/proj.git" } }, "root": { diff --git a/flake.nix b/flake.nix index ad71cbefb4..4dce6ac943 100644 --- a/flake.nix +++ b/flake.nix @@ -14,11 +14,11 @@ }; inputs = { - nixpkgs.url = "nixpkgs/nixos-23.11"; + nixpkgs.url = "nixpkgs/nixos-26.05"; flake-utils.url = "github:numtide/flake-utils"; proj-repo = { - url = "git+https://git.sr.ht/~lockshaw/proj"; + url = "git+https://github.com/elliottslaughter/proj.git?ref=refs/heads/update-nix&rev=6221d815035398e8fce12a55b79fd7bd7d077965"; inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-utils.follows = "flake-utils"; }; @@ -49,6 +49,8 @@ }); proj = proj-repo.packages.${system}.proj; + + nixgl = pkgs.callPackage ./.flake/pkgs/nixgl { inherit pkgs; src = nixGL; }; in { packages = rec { @@ -56,32 +58,58 @@ cpptrace = pkgs.callPackage ./.flake/pkgs/cpptrace.nix { inherit libdwarf-lite; }; libassert = pkgs.callPackage ./.flake/pkgs/libassert.nix { inherit cpptrace; }; realm = pkgs.callPackage ./.flake/pkgs/realm.nix { }; + cudnn = pkgs.callPackage ./.flake/pkgs/cudnn.nix { }; bencher-cli = pkgs.callPackage ./.flake/pkgs/bencher-cli.nix { }; ffdb = pkgs.callPackage ./.flake/pkgs/ffdb { inherit proj; }; - hpp2plantuml = pkgs.python3Packages.callPackage ./.flake/pkgs/hpp2plantuml.nix { }; + robotpy-cppheaderparser = pkgs.python3Packages.callPackage ./.flake/pkgs/robotpy-cppheaderparser.nix { }; + hpp2plantuml = pkgs.python3Packages.callPackage ./.flake/pkgs/hpp2plantuml.nix { inherit robotpy-cppheaderparser; }; fccf = pkgs.callPackage ./.flake/pkgs/fccf { }; rapidcheckFull = pkgs.symlinkJoin { name = "rapidcheckFull"; paths = (with pkgs; [ rapidcheck.out rapidcheck.dev ]); }; - doctest = pkgs.doctest.overrideAttrs ( old: rec { - version = "2.4.9"; - src = pkgs.fetchFromGitHub { - owner = "doctest"; - repo = "doctest"; - rev = "v${version}"; - sha256 = "sha256-ugmkeX2PN4xzxAZpWgswl4zd2u125Q/ADSKzqTfnd94="; - }; - patches = [ - ./.flake/patches/doctest-template-test.patch - ]; - }); }; devShells = rec { ci = mkShell { shellHook = '' export RC_PARAMS="max_discard_ratio=100" + + # Nix passes dependency include paths through NIX_CFLAGS_COMPILE + # rather than on the compiler command line, so ccache cannot see + # them change. Its manifests reference store paths that are still + # present and unmodified, so bumping a dependency (e.g. fmt) yields + # false cache hits that return objects built against the old + # headers. Folding the flags into the hash invalidates those. + # -frandom-seed is a per-derivation nonce, so it is dropped to keep + # unrelated devshell edits from invalidating the whole cache. + # The flags are reduced to a digest and combined with "%compiler% -v" + # so that the compiler's own identity keeps being hashed too -- + # setting a plain "string:" check would drop it, and a gcc bump that + # left the include paths untouched would then go unnoticed. + ccache_flag_id="$( + printf '%s' "$NIX_CFLAGS_COMPILE" \ + | tr ' ' '\n' \ + | grep -v '^-frandom-seed=' \ + | sha256sum \ + | cut -d' ' -f1 + )" + export CCACHE_COMPILERCHECK="%compiler% -v; echo $ccache_flag_id" + unset ccache_flag_id + + # cudaPackages.backendStdenv pins gcc to a version cuda accepts, + # but the wrapper still puts the default stdenv gcc's library + # directory ahead of it, so -lgcov resolves to a libgcov whose + # format does not match the instrumentation the pinned gcc emits. + # Every coverage run then dies with "Version mismatch" and writes + # no .gcda at all. This directory holds only static archives + # (libgcc, libgcov) and crt objects, so preferring it does not + # affect libstdc++ resolution. + gcc_static_lib_dir="$(dirname "$(''${CXX:-g++} -print-file-name=libgcov.a)")" + case "$gcc_static_lib_dir" in + /*) export NIX_CFLAGS_LINK="-L$gcc_static_lib_dir $NIX_CFLAGS_LINK" ;; + esac + unset gcc_static_lib_dir ''; buildInputs = builtins.concatLists [ @@ -89,19 +117,19 @@ zlib boost nlohmann_json - spdlog + (spdlog.override { fmt = fmt_10; }) range-v3 - fmt + fmt_10 cmakeCurses ccache pkg-config python3 cudatoolkit cudaPackages.cuda_nvcc - cudaPackages.cudnn cudaPackages.nccl cudaPackages.libcublas cudaPackages.cuda_cudart + doctest tl-expected doxygen lcov # for code coverage @@ -115,10 +143,10 @@ proj ]) (with self.packages.${system}; [ + cudnn libassert realm rapidcheckFull - doctest ]) ]; }; @@ -128,9 +156,9 @@ hardeningDisable = [ "all" ]; buildInputs = builtins.concatLists [ - (with nixGL.packages.${system}; [ - nixGLDefault - ]) + [ + nixgl.auto.nixGLDefault + ] ]; }; diff --git a/lib/op-attrs/include/op-attrs/parallel_dim.h b/lib/op-attrs/include/op-attrs/parallel_dim.h index a12951dec9..ec56dd4f26 100644 --- a/lib/op-attrs/include/op-attrs/parallel_dim.h +++ b/lib/op-attrs/include/op-attrs/parallel_dim.h @@ -2,6 +2,7 @@ #define _FLEXFLOW_OP_ATTRS_INCLUDE_OP_ATTRS_PARALLEL_DIM_H #include "op-attrs/parallel_dim.dtg.h" +#include "utils/positive_int/positive_int.h" namespace FlexFlow { @@ -11,7 +12,7 @@ bool is_replica_dim(ParallelDim const &); ParallelDim with_size_set_to(ParallelDim const &, size_t); ParallelDim with_degree_set_to(ParallelDim const &, int); ParallelDim with_is_replica_set_to(ParallelDim const &, bool); -int get_degree(ParallelDim const &); +positive_int get_degree(ParallelDim const &); } // namespace FlexFlow diff --git a/lib/op-attrs/src/op-attrs/parallel_dim.cc b/lib/op-attrs/src/op-attrs/parallel_dim.cc index 26ba2b3fa1..116d72e5be 100644 --- a/lib/op-attrs/src/op-attrs/parallel_dim.cc +++ b/lib/op-attrs/src/op-attrs/parallel_dim.cc @@ -3,8 +3,8 @@ namespace FlexFlow { -int get_degree(ParallelDim const &dim) { - return dim.visit(overload{ +positive_int get_degree(ParallelDim const &dim) { + return dim.visit(overload{ [](ShardParallelDim const &shard_dim) { return shard_dim.degree; }, [](ReplicaParallelDim const &replica_dim) { return replica_dim.degree; diff --git a/lib/realm-execution/test/src/realm-execution/test_e2e.cc b/lib/realm-execution/test/src/realm-execution/test_e2e.cc index 9ba4886b4b..2c72da44a1 100644 --- a/lib/realm-execution/test/src/realm-execution/test_e2e.cc +++ b/lib/realm-execution/test/src/realm-execution/test_e2e.cc @@ -545,7 +545,7 @@ TEST_SUITE(FF_CUDA_TEST_SUITE) { //! [realm-execution example] std::vector fake_args = - make_fake_realm_args(/*num_cpus=*/1_p, /*num_gpus=*/1_n); + make_fake_realm_args(/*num_cpus=*/1_p, /*num_gpus=*/2_n); int fake_argc = fake_args.size(); char **fake_argv = fake_args.data(); diff --git a/lib/utils/include/utils/containers/filter.h b/lib/utils/include/utils/containers/filter.h index 85a413c2c7..1b39dec2cd 100644 --- a/lib/utils/include/utils/containers/filter.h +++ b/lib/utils/include/utils/containers/filter.h @@ -4,6 +4,7 @@ #include #include #include +#include #include #include diff --git a/lib/utils/include/utils/containers/inplace_filter.h b/lib/utils/include/utils/containers/inplace_filter.h index dc0491773f..2e696613ec 100644 --- a/lib/utils/include/utils/containers/inplace_filter.h +++ b/lib/utils/include/utils/containers/inplace_filter.h @@ -3,6 +3,9 @@ #include "utils/containers/filter.h" #include +#include +#include +#include #include #include diff --git a/lib/utils/include/utils/containers/unordered_set_of.h b/lib/utils/include/utils/containers/unordered_set_of.h index 5a8dcd9f55..011ecb515d 100644 --- a/lib/utils/include/utils/containers/unordered_set_of.h +++ b/lib/utils/include/utils/containers/unordered_set_of.h @@ -9,7 +9,7 @@ namespace FlexFlow { template std::unordered_set unordered_set_of(C const &c) { - return std::unordered_set{c.cbegin(), c.cend()}; + return std::unordered_set{c.cbegin(), c.cend()}; } template diff --git a/lib/utils/include/utils/graph/kwarg_dataflow_graph/kwarg_dataflow_input.dtg.toml b/lib/utils/include/utils/graph/kwarg_dataflow_graph/kwarg_dataflow_input.dtg.toml index 5f092f0540..3278ebda48 100644 --- a/lib/utils/include/utils/graph/kwarg_dataflow_graph/kwarg_dataflow_input.dtg.toml +++ b/lib/utils/include/utils/graph/kwarg_dataflow_graph/kwarg_dataflow_input.dtg.toml @@ -13,6 +13,7 @@ template_params = [ ] includes = [ + "utils/fmt/optional.h", "utils/graph/node/node.dtg.h", ] diff --git a/lib/utils/include/utils/graph/kwarg_dataflow_graph/kwarg_dataflow_output.dtg.toml b/lib/utils/include/utils/graph/kwarg_dataflow_graph/kwarg_dataflow_output.dtg.toml index 9a58e2f686..88a90ba00b 100644 --- a/lib/utils/include/utils/graph/kwarg_dataflow_graph/kwarg_dataflow_output.dtg.toml +++ b/lib/utils/include/utils/graph/kwarg_dataflow_graph/kwarg_dataflow_output.dtg.toml @@ -14,6 +14,7 @@ template_params = [ ] includes = [ + "utils/fmt/optional.h", "utils/graph/node/node.dtg.h", "utils/nonnegative_int/nonnegative_int.h", ] diff --git a/lib/utils/src/utils/containers/merge_disjoint_maps.cc b/lib/utils/src/utils/containers/merge_disjoint_maps.cc index cf2d0fd3ec..0adc2896d6 100644 --- a/lib/utils/src/utils/containers/merge_disjoint_maps.cc +++ b/lib/utils/src/utils/containers/merge_disjoint_maps.cc @@ -6,8 +6,8 @@ namespace FlexFlow { using K = ordered_value_type<0>; using V = value_type<1>; -using C = std::vector>; -template std::map merge_disjoint_maps(C const &); +template std::map + merge_disjoint_maps(std::vector> const &); } // namespace FlexFlow diff --git a/lib/utils/src/utils/containers/merge_maps_with_right_dominating.cc b/lib/utils/src/utils/containers/merge_maps_with_right_dominating.cc index dff4708c81..032b8cdaf3 100644 --- a/lib/utils/src/utils/containers/merge_maps_with_right_dominating.cc +++ b/lib/utils/src/utils/containers/merge_maps_with_right_dominating.cc @@ -6,8 +6,8 @@ namespace FlexFlow { using K = ordered_value_type<0>; using V = value_type<1>; -using C = std::vector>; -template std::map merge_maps_with_right_dominating(C const &); +template std::map + merge_maps_with_right_dominating(std::vector> const &); } // namespace FlexFlow diff --git a/lib/utils/src/utils/containers/merge_unordered_maps_with_right_dominating.cc b/lib/utils/src/utils/containers/merge_unordered_maps_with_right_dominating.cc index 9208df8f6a..408beca434 100644 --- a/lib/utils/src/utils/containers/merge_unordered_maps_with_right_dominating.cc +++ b/lib/utils/src/utils/containers/merge_unordered_maps_with_right_dominating.cc @@ -5,9 +5,8 @@ namespace FlexFlow { using K = value_type<0>; using V = value_type<1>; -using C = std::vector>; -template std::unordered_map - merge_unordered_maps_with_right_dominating(C const &); +template std::unordered_map merge_unordered_maps_with_right_dominating( + std::vector> const &); } // namespace FlexFlow