Skip to content

Commit

Permalink
repo-sync-2023-08-04T17:42:59+0800 (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
anakinxc authored Aug 4, 2023
1 parent a1627a6 commit 61c652b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 17 deletions.
7 changes: 2 additions & 5 deletions yacl/crypto/base/ecc/ec_point.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ using Array160 =
// a black box
using EcPoint = std::variant<Array32, Array160, AnyPtr, AffinePoint>;

} // namespace yacl::crypto
inline auto format_as(const AffinePoint &ap) { return fmt::streamed(ap); }

namespace fmt {
template <>
struct formatter<yacl::crypto::AffinePoint> : ostream_formatter {};
} // namespace fmt
} // namespace yacl::crypto
9 changes: 2 additions & 7 deletions yacl/link/transport/channel_chunked_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ DECLARE_int32(h2_client_stream_window_size);

}

namespace fmt {
template <>
struct formatter<org::interconnection::link::TransType> : ostream_formatter {};
} // namespace fmt

namespace yacl::link::transport {

namespace ic = org::interconnection;
Expand Down Expand Up @@ -250,8 +245,8 @@ void ChannelChunkedBase::OnRequest(const ic_pb::PushRequest* request,
} else {
response->mutable_header()->set_error_code(ic::ErrorCode::INVALID_REQUEST);
response->mutable_header()->set_error_msg(
fmt::format("unrecongnized trans type={}, from rank={}", trans_type,
request->sender_rank()));
fmt::format("unrecongnized trans type={}, from rank={}",
TransType_Name(trans_type), request->sender_rank()));
}
}

Expand Down
7 changes: 2 additions & 5 deletions yacl/math/mpint/mp_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,8 @@ class MPInt {
friend class MontgomerySpace;
};

inline auto format_as(const MPInt &i) { return fmt::streamed(i); }

} // namespace yacl::math

yacl::math::MPInt operator""_mp(const char *sz, size_t n);
Expand Down Expand Up @@ -400,8 +402,3 @@ MSGPACK_API_VERSION_NAMESPACE(MSGPACK_DEFAULT_API_NS) {
} // namespace adaptor
} // MSGPACK_API_VERSION_NAMESPACE(MSGPACK_DEFAULT_API_NS)
} // namespace msgpack

namespace fmt {
template <>
struct formatter<yacl::math::MPInt> : ostream_formatter {};
} // namespace fmt

0 comments on commit 61c652b

Please sign in to comment.