未验证 提交 d84b918b 编写于 作者: R risemeup1 提交者: GitHub

fix some protobuf update problems (#49875)

* Improved prootbuf upgrades

* Improved prootbuf upgrades

* Improved prootbuf upgrades

* limit protobuf version>=3.20.0
上级 66d3c56e
...@@ -326,6 +326,9 @@ elseif(WITH_IPU) ...@@ -326,6 +326,9 @@ elseif(WITH_IPU)
set(PROTOBUF_VERSION 21.12) set(PROTOBUF_VERSION 21.12)
elseif(WITH_ARM_BRPC) elseif(WITH_ARM_BRPC)
set(PROTOBUF_VERSION 21.12-baidu-ee-common) set(PROTOBUF_VERSION 21.12-baidu-ee-common)
elseif(WIN32)
#Lower version prootbuf is used for widows
set(PROTOBUF_VERSION 3.2)
else() else()
set(PROTOBUF_VERSION 21.12) set(PROTOBUF_VERSION 21.12)
if(WITH_GPU) if(WITH_GPU)
......
...@@ -30,8 +30,9 @@ inline __device__ bool AttemptInsert( ...@@ -30,8 +30,9 @@ inline __device__ bool AttemptInsert(
static_cast<unsigned int>(-1), static_cast<unsigned int>(-1),
static_cast<unsigned int>(id)); static_cast<unsigned int>(id));
if (key == -1 || key == id) { if (key == -1 || key == id) {
atomicMin(reinterpret_cast<unsigned int*>(&key_index[pos]), // NOLINT atomicMin(
static_cast<unsigned int>(index)); // NOLINT reinterpret_cast<unsigned long long int*>(&key_index[pos]), // NOLINT
static_cast<unsigned long long int>(index)); // NOLINT
return true; return true;
} else { } else {
return false; return false;
...@@ -42,8 +43,9 @@ inline __device__ bool AttemptInsert( ...@@ -42,8 +43,9 @@ inline __device__ bool AttemptInsert(
static_cast<unsigned long long int>(-1), // NOLINT static_cast<unsigned long long int>(-1), // NOLINT
static_cast<unsigned long long int>(id)); // NOLINT static_cast<unsigned long long int>(id)); // NOLINT
if (key == -1 || key == id) { if (key == -1 || key == id) {
atomicMin(reinterpret_cast<unsigned int*>(&key_index[pos]), // NOLINT atomicMin(
static_cast<unsigned int>(index)); // NOLINT reinterpret_cast<unsigned long long int*>(&key_index[pos]), // NOLINT
static_cast<unsigned long long int>(index)); // NOLINT
return true; return true;
} else { } else {
return false; return false;
......
requests>=2.20.0 requests>=2.20.0
numpy>=1.13 numpy>=1.13
protobuf>=3.1.0 ; platform_system != "Windows" protobuf>=3.20.0 ; platform_system != "Windows"
protobuf>=3.1.0, <=3.20.2 ; platform_system == "Windows" protobuf>=3.1.0, <=3.20.2 ; platform_system == "Windows"
Pillow Pillow
decorator decorator
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册