Skip to content

Commit

Permalink
fix the build error for utils test
Browse files Browse the repository at this point in the history
  • Loading branch information
lambda7xx committed Oct 29, 2023
1 parent 4efe602 commit 43d7a6e
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
4 changes: 2 additions & 2 deletions lib/utils/include/utils/graph/multidiedge.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ struct InputMultiDiEdge : MultiDiInput {
// different sources resulting from a graph cut
};
FF_VISITABLE_STRUCT(InputMultiDiEdge, dst, dst_idx, uid);
//FF_VISIT_FMTABLE(InputMultiDiEdge);
// FF_VISIT_FMTABLE(InputMultiDiEdge);

struct OutputMultiDiEdge : MultiDiOutput {
req<edge_uid_t> uid; // necessary to differentiate multiple output edges from
// different sources resulting from a graph cut
};
FF_VISITABLE_STRUCT(OutputMultiDiEdge, src, src_idx, uid);
//FF_VISIT_FMTABLE(OutputMultiDiEdge);
// FF_VISIT_FMTABLE(OutputMultiDiEdge);

struct OutputMultiDiEdgeQuery {
query_set<Node> srcs;
Expand Down
4 changes: 2 additions & 2 deletions lib/utils/include/utils/required_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ struct required_inheritance_impl : public T {

using T::T;
required_inheritance_impl() = delete;
required_inheritance_impl(T const &);
required_inheritance_impl(T &&t);
required_inheritance_impl(T const &t) : T(t) {}
required_inheritance_impl(T &&t) : T(std::move(t)) {}

template <typename TT>
required_inheritance_impl(
Expand Down
7 changes: 4 additions & 3 deletions lib/utils/include/utils/stack_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,11 @@ CHECK_HASHABLE(stack_string<1>);
namespace fmt {

template <typename Char, std::size_t MAXSIZE>
struct formatter<::FlexFlow::stack_basic_string<Char, MAXSIZE>> : formatter<fmt::basic_string_view<Char>> {
struct formatter<::FlexFlow::stack_basic_string<Char, MAXSIZE>>
: formatter<fmt::basic_string_view<Char>> {
template <typename FormatContext>
auto format(const ::FlexFlow::stack_basic_string<Char, MAXSIZE>& v, FormatContext &ctx) const
-> decltype(ctx.out()) {
auto format(::FlexFlow::stack_basic_string<Char, MAXSIZE> const &v,
FormatContext &ctx) const -> decltype(ctx.out()) {
using namespace FlexFlow;
auto str_view = format_as(v);
return format_to(ctx.out(), "{}", str_view);
Expand Down
10 changes: 5 additions & 5 deletions lib/utils/include/utils/stack_vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -331,19 +331,19 @@ struct hash<::FlexFlow::stack_vector<T, MAXSIZE>> {
namespace fmt {

template <typename T, std::size_t MAXSIZE>
struct formatter<::FlexFlow::stack_vector<T, MAXSIZE>> : formatter<string_view> {
struct formatter<::FlexFlow::stack_vector<T, MAXSIZE>>
: formatter<string_view> {
template <typename FormatContext>
auto format(const ::FlexFlow::stack_vector<T, MAXSIZE>& v, FormatContext &ctx) const
-> decltype(ctx.out()) {
auto format(::FlexFlow::stack_vector<T, MAXSIZE> const &v,
FormatContext &ctx) const -> decltype(ctx.out()) {
using namespace FlexFlow;
size_t result = 0;
iter_hash(result, v.cbegin(), v.cend());
string_view name(std::to_string(result));
string_view name(std::to_string(result));
return formatter<string_view>::format(name, ctx);
}
};

} // namespace fmt


#endif
1 change: 1 addition & 0 deletions lib/utils/include/utils/vector.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef _FLEXFLOW_UTILS_VECTOR_H
#define _FLEXFLOW_UTILS_VECTOR_H

#include "utils/containers.h"
#include <vector>

template <typename T>
Expand Down
1 change: 1 addition & 0 deletions lib/utils/test/src/test_bidict.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "test/utils/doctest.h"
#include "utils/bidict.h"
#include "utils/containers.h"

using namespace FlexFlow;

Expand Down

0 comments on commit 43d7a6e

Please sign in to comment.