forked from mindspore-Ecosystem/mindspore
fix mindspore-static lib generation and fix cast infershape
This commit is contained in:
parent
7148109c06
commit
56df19e09e
|
@ -35,8 +35,9 @@ endif()
|
|||
########################### build nnacl static library ########################
|
||||
string(REPLACE "-fvisibility=hidden" "-fvisibility=default" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
add_library(nnacl STATIC ${KERNEL_SRC} ${TRAIN_SRC} ${ASSEMBLY_SRC})
|
||||
add_library(nnacl_mid OBJECT ${KERNEL_SRC} ${TRAIN_SRC} ${ASSEMBLY_SRC})
|
||||
|
||||
########################### arm64 build optimize library ########################
|
||||
if (PLATFORM_ARM64)
|
||||
add_subdirectory(${NNACL_DIR}/optimize)
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
@ -77,13 +77,14 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-private-field")
|
|||
if (SUPPORT_GPU)
|
||||
add_subdirectory(runtime/kernel/opencl)
|
||||
target_link_libraries(mindspore-lite cpu_kernel_mid opencl_kernel_mid nnacl)
|
||||
target_link_libraries(mindspore-lite_static cpu_kernel_mid opencl_kernel_mid nnacl)
|
||||
target_link_libraries(mindspore-lite_static cpu_kernel_mid opencl_kernel_mid nnacl_mid)
|
||||
else ()
|
||||
target_link_libraries(mindspore-lite cpu_kernel_mid nnacl)
|
||||
target_link_libraries(mindspore-lite_static cpu_kernel_mid nnacl)
|
||||
target_link_libraries(mindspore-lite_static cpu_kernel_mid nnacl_mid)
|
||||
endif ()
|
||||
if (PLATFORM_ARM32 OR PLATFORM_ARM64)
|
||||
target_link_libraries(mindspore-lite log)
|
||||
target_link_libraries(mindspore-lite_static log)
|
||||
endif ()
|
||||
if (BUILD_MINDDATA STREQUAL "lite")
|
||||
target_link_libraries(mindspore-lite minddata_eager_mid minddata-lite)
|
||||
|
|
|
@ -39,8 +39,8 @@ constexpr uint32_t kDoubleNum = 2;
|
|||
constexpr uint32_t kMultiNum = 3;
|
||||
constexpr uint32_t kDimension_4d = 4;
|
||||
|
||||
const std::set<int> kSupportDataType = {kNumberTypeUInt8, kNumberTypeInt8, kNumberTypeInt32, kNumberTypeFloat32,
|
||||
kNumberTypeFloat16};
|
||||
const std::set<int> kSupportDataType = {kNumberTypeBool, kNumberTypeUInt8, kNumberTypeInt8,
|
||||
kNumberTypeInt32, kNumberTypeFloat32, kNumberTypeFloat16};
|
||||
|
||||
#ifdef PRIMITIVE_WRITEABLE
|
||||
using TensorPtr = std::shared_ptr<mindspore::tensor::Tensor>;
|
||||
|
|
Loading…
Reference in New Issue