From dc42417f3347e0614ccb3431eafb900045ad1ce6 Mon Sep 17 00:00:00 2001 From: Megvii Engine Team Date: Thu, 30 Sep 2021 15:02:31 +0800 Subject: [PATCH] fix(ci/build): opt macos ci and move bazel to 4.2.1 GitOrigin-RevId: d1494faf0c493675916216aea7ce6b1a9cf5467b --- src/core/impl/comp_node/cuda/comp_node.cpp | 2 +- src/core/impl/graph/seq_sublinear_memory.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/impl/comp_node/cuda/comp_node.cpp b/src/core/impl/comp_node/cuda/comp_node.cpp index 813264445..afb110bae 100644 --- a/src/core/impl/comp_node/cuda/comp_node.cpp +++ b/src/core/impl/comp_node/cuda/comp_node.cpp @@ -279,7 +279,7 @@ public: return m_mem_alloc->get_free_left_and_right(begin_ptr, end_ptr); } - size_t get_max_block_size_available() { + size_t get_max_block_size_available() override { activate(); return m_mem_alloc->get_max_block_size_available(); } diff --git a/src/core/impl/graph/seq_sublinear_memory.cpp b/src/core/impl/graph/seq_sublinear_memory.cpp index a4075a013..f215897fd 100644 --- a/src/core/impl/graph/seq_sublinear_memory.cpp +++ b/src/core/impl/graph/seq_sublinear_memory.cpp @@ -33,7 +33,7 @@ class RNGxorshf { uint64_t s[2]; public: -#if __cplusplus >= 201703L +#if __cplusplus >= 201703L || (defined(__APPLE__) && __cplusplus >= 201402L) typedef uint64_t result_type; static constexpr uint64_t min() { return 0; } static constexpr uint64_t max() { return UINT64_MAX; } @@ -766,7 +766,7 @@ void SeqModifierForSublinearMemory::ActionSearcherSingleCN::search_genetic() { } } m_cur_records = records; -#if __cplusplus >= 201703L +#if __cplusplus >= 201703L || (defined(__APPLE__) && __cplusplus >= 201402L) std::shuffle(perm.begin(), perm.end(), rng); #else std::random_shuffle(perm.begin(), perm.end(), @@ -1119,4 +1119,4 @@ SeqModifierForSublinearMemory::SeqModifierForSublinearMemory( #endif // !MGB_ENABLE_SUBLINEAR -// vim: syntax=cpp.doxygen foldmethod=marker foldmarker=f{{{,f}}} \ No newline at end of file +// vim: syntax=cpp.doxygen foldmethod=marker foldmarker=f{{{,f}}} -- GitLab