diff --git a/mace/core/runtime/cpu/cpu_runtime.cc b/mace/core/runtime/cpu/cpu_runtime.cc index 671d4cdfdbae34f6c2a4026c6bfceceebe78292c..5e76e49981a0cb3e2209ebce4c88e1ff26d19f40 100644 --- a/mace/core/runtime/cpu/cpu_runtime.cc +++ b/mace/core/runtime/cpu/cpu_runtime.cc @@ -39,7 +39,7 @@ int MaceOpenMPThreadCount = 1; namespace { int GetCPUCount() { - char path[32]; + char path[64]; int cpu_count = 0; int result = 0; diff --git a/mace/kernels/activation.h b/mace/kernels/activation.h index 3159684d109b96c09e3909ffc296f083c0278a4d..47350d913e1faeb2a2686eada01afd22078fba22 100644 --- a/mace/kernels/activation.h +++ b/mace/kernels/activation.h @@ -16,6 +16,7 @@ #define MACE_KERNELS_ACTIVATION_H_ #include +#include #include #include #include diff --git a/mace/kernels/conv_pool_2d_util.cc b/mace/kernels/conv_pool_2d_util.cc index 72a03072ccbf51378e282098f2f5dd752522dfdf..801f206162f2155cd566d055692de8ddf6cbedd6 100644 --- a/mace/kernels/conv_pool_2d_util.cc +++ b/mace/kernels/conv_pool_2d_util.cc @@ -15,6 +15,7 @@ #include "mace/kernels/conv_pool_2d_util.h" #include +#include #include namespace mace { diff --git a/mace/kernels/eltwise.h b/mace/kernels/eltwise.h index 9e9a2be8f9e17cde08665e29c5debce4275e4eb2..e07b45053dd28bf0feee46178ebc18aeda9ebf47 100644 --- a/mace/kernels/eltwise.h +++ b/mace/kernels/eltwise.h @@ -16,6 +16,7 @@ #define MACE_KERNELS_ELTWISE_H_ #include +#include #include #include #include diff --git a/mace/kernels/gather.h b/mace/kernels/gather.h index ddfa14d1d9b978e130162ee58d533810ae18cfec..d8978a63fc497cd6ae218377e955c51e3d1c07c7 100644 --- a/mace/kernels/gather.h +++ b/mace/kernels/gather.h @@ -16,6 +16,7 @@ #define MACE_KERNELS_GATHER_H_ #include +#include #include #include diff --git a/mace/kernels/local_response_norm.h b/mace/kernels/local_response_norm.h index d9eeb7db43d8d8864f3f4a5a2d708fc600adfcab..d53b8f08c6507cf0f5d8272ddd2e597e73435e12 100644 --- a/mace/kernels/local_response_norm.h +++ b/mace/kernels/local_response_norm.h @@ -16,6 +16,7 @@ #define MACE_KERNELS_LOCAL_RESPONSE_NORM_H_ #include +#include #include #include diff --git a/mace/kernels/quantize.h b/mace/kernels/quantize.h index fe52e8d8a6f60b63b34f4cb25be5b73f3214a211..c0280931b0643d1b44a872f96171f1e67d1f2799 100644 --- a/mace/kernels/quantize.h +++ b/mace/kernels/quantize.h @@ -15,6 +15,7 @@ #ifndef MACE_KERNELS_QUANTIZE_H_ #define MACE_KERNELS_QUANTIZE_H_ +#include #include #include #include diff --git a/mace/kernels/resize_bicubic.h b/mace/kernels/resize_bicubic.h index f8953e89bec52d8966d6915b702324de40376776..52f0ee34d1c9b4ed6e298b888868711df20eaf1b 100644 --- a/mace/kernels/resize_bicubic.h +++ b/mace/kernels/resize_bicubic.h @@ -16,6 +16,7 @@ #define MACE_KERNELS_RESIZE_BICUBIC_H_ #include +#include #include #include diff --git a/mace/kernels/sgemm.cc b/mace/kernels/sgemm.cc index ab8310d1eb4221ee4b42ed64a15c944bcb0add8a..a5f15fd0abe5c5d09e6f175dc31c38372eb4f774 100644 --- a/mace/kernels/sgemm.cc +++ b/mace/kernels/sgemm.cc @@ -965,7 +965,7 @@ void SGemm::PackPerBatch(const MatrixMap &src, const index_t width = src.col(); auto src_data = src.batch_data(batch_index); - if (src.major() == Major::RowMajor && order == PackOrder::ColMajor) { + if (src.map_major() == Major::RowMajor && order == PackOrder::ColMajor) { // This is for packing no-transpose lhs. index_t h = 0; #if defined(MACE_ENABLE_NEON) @@ -1011,7 +1011,8 @@ void SGemm::PackPerBatch(const MatrixMap &src, for (index_t ih = h; ih < height; ++ih) { std::copy_n(src_data + ih * width, width, packed_data + ih * width); } - } else if (src.major() == Major::ColMajor && order == PackOrder::ColMajor) { + } else if (src.map_major() == Major::ColMajor && + order == PackOrder::ColMajor) { // This is for packing transpose-needed lhs. index_t h = 0; #if defined(MACE_ENABLE_NEON) @@ -1052,7 +1053,8 @@ void SGemm::PackPerBatch(const MatrixMap &src, packed_data_ptr[w] = src_data_ptr[w * height]; } } - } else if (src.major() == Major::RowMajor && order == PackOrder::RowMajor) { + } else if (src.map_major() == Major::RowMajor && + order == PackOrder::RowMajor) { // This is for packing no-transpose rhs. index_t w = 0; #if defined(MACE_ENABLE_NEON) @@ -1077,7 +1079,8 @@ void SGemm::PackPerBatch(const MatrixMap &src, packed_data_ptr[h] = src_data_ptr[h * width]; } } - } else if (src.major() == Major::ColMajor && order == PackOrder::RowMajor) { + } else if (src.map_major() == Major::ColMajor && + order == PackOrder::RowMajor) { // This is for packing transpose-needed rhs. index_t w = 0; #if defined(MACE_ENABLE_NEON) @@ -1113,7 +1116,7 @@ void SGemm::UnPackPerBatch(const float *packed_data, const index_t width = matrix_map->col(); auto unpacked_data = matrix_map->batch_data(batch_index); - if (matrix_map->major() == Major::RowMajor) { + if (matrix_map->map_major() == Major::RowMajor) { // This is for non-transposed result index_t w = 0; #if defined(MACE_ENABLE_NEON) diff --git a/mace/kernels/sgemm.h b/mace/kernels/sgemm.h index c24c9c03e55047e157208caed5139e3a1b93380f..92a185db4efe71c7a103432a42b09b90f2786482 100644 --- a/mace/kernels/sgemm.h +++ b/mace/kernels/sgemm.h @@ -74,7 +74,7 @@ class MatrixMap { return stride_; } - Major major() const { + Major map_major() const { return major_; } diff --git a/mace/kernels/strided_slice.h b/mace/kernels/strided_slice.h index a5d0eb3828d365f3e38ed4d5f4520e3092997eb8..3f1f2c49b1d888b470a9027278558e71da6800a6 100644 --- a/mace/kernels/strided_slice.h +++ b/mace/kernels/strided_slice.h @@ -16,6 +16,7 @@ #define MACE_KERNELS_STRIDED_SLICE_H_ #include +#include #include #include