forked from mindspore-Ecosystem/mindspore
fix mac compile on clang++13
This commit is contained in:
parent
ccbc5317b5
commit
d05447fd7c
|
@ -23,6 +23,9 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
|||
-Wno-return-std-move -Wno-unused-private-field -Wno-unused-lambda-capture -Wno-sign-compare \
|
||||
-Wno-overloaded-virtual -Wno-unneeded-internal-declaration -Wno-unused-variable -Wno-pessimizing-move \
|
||||
-Wno-inconsistent-missing-override -DHALF_ENABLE_CPP11_USER_LITERALS=0 -D_FORTIFY_SOURCE=2")
|
||||
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 13.1)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wno-unused-but-set-variable")
|
||||
endif()
|
||||
elseif(ENABLE_SYM_FILE)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O2 -g -ggdb -Wl,--allow-shlib-undefined \
|
||||
-DHALF_ENABLE_CPP11_USER_LITERALS=0 -D_FORTIFY_SOURCE=2")
|
||||
|
|
|
@ -102,7 +102,6 @@ Status CacheService::CacheRow(const std::vector<const void *> &buf, row_id_type
|
|||
*row_id_generated = msg->row_id();
|
||||
}
|
||||
auto size_of_this = msg->size_of_this();
|
||||
size_t total_sz = size_of_this;
|
||||
auto column_hdr = msg->column();
|
||||
// Number of tensor buffer should match the number of columns plus one.
|
||||
if (buf.size() != column_hdr->size() + 1) {
|
||||
|
@ -116,7 +115,6 @@ Status CacheService::CacheRow(const std::vector<const void *> &buf, row_id_type
|
|||
all_data.emplace_back(fb, size_of_this);
|
||||
for (auto i = 0; i < column_hdr->size(); ++i) {
|
||||
all_data.emplace_back(buf.at(i + 1), msg->data_sz()->Get(i));
|
||||
total_sz += msg->data_sz()->Get(i);
|
||||
}
|
||||
// Now we cache the buffer.
|
||||
Status rc = cp_->Insert(*row_id_generated, all_data);
|
||||
|
|
Loading…
Reference in New Issue