Browse Source

fix(ci/build): opt macos ci and move bazel to 4.2.1

GitOrigin-RevId: d1494faf0c
release-1.7
Megvii Engine Team 3 years ago
parent
commit
dc42417f33
2 changed files with 4 additions and 4 deletions
  1. +1
    -1
      src/core/impl/comp_node/cuda/comp_node.cpp
  2. +3
    -3
      src/core/impl/graph/seq_sublinear_memory.cpp

+ 1
- 1
src/core/impl/comp_node/cuda/comp_node.cpp View File

@@ -279,7 +279,7 @@ public:
return m_mem_alloc->get_free_left_and_right(begin_ptr, end_ptr); 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(); activate();
return m_mem_alloc->get_max_block_size_available(); return m_mem_alloc->get_max_block_size_available();
} }


+ 3
- 3
src/core/impl/graph/seq_sublinear_memory.cpp View File

@@ -33,7 +33,7 @@ class RNGxorshf {
uint64_t s[2]; uint64_t s[2];


public: public:
#if __cplusplus >= 201703L
#if __cplusplus >= 201703L || (defined(__APPLE__) && __cplusplus >= 201402L)
typedef uint64_t result_type; typedef uint64_t result_type;
static constexpr uint64_t min() { return 0; } static constexpr uint64_t min() { return 0; }
static constexpr uint64_t max() { return UINT64_MAX; } static constexpr uint64_t max() { return UINT64_MAX; }
@@ -766,7 +766,7 @@ void SeqModifierForSublinearMemory::ActionSearcherSingleCN::search_genetic() {
} }
} }
m_cur_records = records; m_cur_records = records;
#if __cplusplus >= 201703L
#if __cplusplus >= 201703L || (defined(__APPLE__) && __cplusplus >= 201402L)
std::shuffle(perm.begin(), perm.end(), rng); std::shuffle(perm.begin(), perm.end(), rng);
#else #else
std::random_shuffle(perm.begin(), perm.end(), std::random_shuffle(perm.begin(), perm.end(),
@@ -1119,4 +1119,4 @@ SeqModifierForSublinearMemory::SeqModifierForSublinearMemory(


#endif // !MGB_ENABLE_SUBLINEAR #endif // !MGB_ENABLE_SUBLINEAR


// vim: syntax=cpp.doxygen foldmethod=marker foldmarker=f{{{,f}}}
// vim: syntax=cpp.doxygen foldmethod=marker foldmarker=f{{{,f}}}

Loading…
Cancel
Save