Browse Source

Removed log_adapter dependency for minddata lite

Brute force fix?

Added missing import

Added removal of new cache functionality

Fix batch

Remove crc and cache optimizer

Remove affine

Remove cut mix batch

Added securec.h

Removed unused crc import

Fixed minor arm64 compile issues for tensor ops

Removed excess code from de_tensor

Added vision import

remove random device ops

Removed commented line

Added extra layer to switch adapter logic

Added securec

Added float fix
tags/v1.1.0
Eric 5 years ago
parent
commit
1f11ccce06
52 changed files with 182 additions and 52 deletions
  1. +3
    -17
      mindspore/ccsrc/minddata/dataset/api/de_tensor.cc
  2. +1
    -1
      mindspore/ccsrc/minddata/dataset/api/python/de_pipeline.cc
  3. +5
    -1
      mindspore/ccsrc/minddata/dataset/core/config_manager.cc
  4. +4
    -0
      mindspore/ccsrc/minddata/dataset/core/data_type.cc
  5. +5
    -1
      mindspore/ccsrc/minddata/dataset/core/tensor.h
  6. +4
    -0
      mindspore/ccsrc/minddata/dataset/core/tensor_shape.cc
  7. +5
    -1
      mindspore/ccsrc/minddata/dataset/engine/cache/cache_grpc_server.cc
  8. +4
    -0
      mindspore/ccsrc/minddata/dataset/engine/data_schema.cc
  9. +0
    -1
      mindspore/ccsrc/minddata/dataset/engine/datasetops/barrier_op.cc
  10. +4
    -0
      mindspore/ccsrc/minddata/dataset/engine/datasetops/cache_lookup_op.cc
  11. +4
    -0
      mindspore/ccsrc/minddata/dataset/engine/datasetops/cache_op.cc
  12. +6
    -0
      mindspore/ccsrc/minddata/dataset/engine/datasetops/dataset_op.cc
  13. +2
    -0
      mindspore/ccsrc/minddata/dataset/engine/datasetops/dataset_op.h
  14. +4
    -0
      mindspore/ccsrc/minddata/dataset/engine/datasetops/epoch_ctrl_op.cc
  15. +4
    -0
      mindspore/ccsrc/minddata/dataset/engine/datasetops/filter_op.cc
  16. +4
    -0
      mindspore/ccsrc/minddata/dataset/engine/datasetops/map_op/map_op.cc
  17. +4
    -0
      mindspore/ccsrc/minddata/dataset/engine/datasetops/project_op.cc
  18. +4
    -0
      mindspore/ccsrc/minddata/dataset/engine/datasetops/rename_op.cc
  19. +4
    -0
      mindspore/ccsrc/minddata/dataset/engine/datasetops/repeat_op.cc
  20. +4
    -0
      mindspore/ccsrc/minddata/dataset/engine/datasetops/shuffle_op.cc
  21. +4
    -0
      mindspore/ccsrc/minddata/dataset/engine/datasetops/skip_op.cc
  22. +4
    -0
      mindspore/ccsrc/minddata/dataset/engine/datasetops/source/mindrecord_op.cc
  23. +4
    -0
      mindspore/ccsrc/minddata/dataset/engine/datasetops/zip_op.cc
  24. +3
    -1
      mindspore/ccsrc/minddata/dataset/engine/execution_tree.cc
  25. +4
    -0
      mindspore/ccsrc/minddata/dataset/engine/gnn/graph_shared_memory.cc
  26. +4
    -0
      mindspore/ccsrc/minddata/dataset/engine/gnn/grpc_async_server.cc
  27. +4
    -0
      mindspore/ccsrc/minddata/dataset/engine/perf/profiling.cc
  28. +4
    -0
      mindspore/ccsrc/minddata/dataset/engine/tdt/tdt_plugin.cc
  29. +4
    -0
      mindspore/ccsrc/minddata/dataset/include/tensor.h
  30. +7
    -6
      mindspore/ccsrc/minddata/dataset/kernels/image/affine_op.cc
  31. +1
    -1
      mindspore/ccsrc/minddata/dataset/kernels/image/cutmix_batch_op.cc
  32. +4
    -0
      mindspore/ccsrc/minddata/dataset/text/vocab.cc
  33. +1
    -1
      mindspore/ccsrc/minddata/dataset/util/arena.cc
  34. +2
    -1
      mindspore/ccsrc/minddata/dataset/util/btree_iterator.tpp
  35. +2
    -1
      mindspore/ccsrc/minddata/dataset/util/buddy.cc
  36. +1
    -1
      mindspore/ccsrc/minddata/dataset/util/circular_pool.cc
  37. +2
    -2
      mindspore/ccsrc/minddata/dataset/util/data_helper.cc
  38. +1
    -1
      mindspore/ccsrc/minddata/dataset/util/data_helper.h
  39. +1
    -2
      mindspore/ccsrc/minddata/dataset/util/intrp_service.h
  40. +1
    -1
      mindspore/ccsrc/minddata/dataset/util/list.h
  41. +1
    -1
      mindspore/ccsrc/minddata/dataset/util/lock.cc
  42. +25
    -0
      mindspore/ccsrc/minddata/dataset/util/log_adapter.h
  43. +2
    -1
      mindspore/ccsrc/minddata/dataset/util/path.cc
  44. +2
    -1
      mindspore/ccsrc/minddata/dataset/util/queue.h
  45. +1
    -1
      mindspore/ccsrc/minddata/dataset/util/random.h
  46. +1
    -0
      mindspore/ccsrc/minddata/dataset/util/services.cc
  47. +1
    -1
      mindspore/ccsrc/minddata/dataset/util/storage_container.cc
  48. +1
    -1
      mindspore/ccsrc/minddata/dataset/util/storage_manager.cc
  49. +1
    -1
      mindspore/ccsrc/minddata/dataset/util/task.cc
  50. +1
    -1
      mindspore/ccsrc/minddata/dataset/util/task.h
  51. +11
    -4
      mindspore/lite/minddata/CMakeLists.txt
  52. +2
    -0
      mindspore/lite/test/ut/src/dataset/eager_test.cc

+ 3
- 17
mindspore/ccsrc/minddata/dataset/api/de_tensor.cc View File

@@ -14,14 +14,13 @@
* limitations under the License.
*/

#include "minddata/dataset/include/de_tensor.h"
#include "minddata/dataset/include/type_id.h"
#include "minddata/dataset/core/constants.h"
#include "minddata/dataset/core/data_type.h"
#include "minddata/dataset/include/de_tensor.h"
#include "minddata/dataset/include/type_id.h"
#include "mindspore/core/ir/dtype/type_id.h"
#include "utils/hashing.h"
#include "mindspore/lite/internal/include/ms_tensor.h"
#include "mindspore/core/utils/convert_utils_base.h"
#include "utils/hashing.h"

namespace mindspore {
namespace tensor {
@@ -124,19 +123,6 @@ int DETensor::ElementsNum() const {
return this->tensor_impl_->Size();
}

std::size_t DETensor::hash() const {
MS_ASSERT(this->tensor_impl_ != nullptr);
auto shape = this->shape();
std::size_t hash_value = std::hash<int>{}(SizeToInt(this->data_type()));
hash_value = hash_combine(hash_value, std::hash<size_t>{}(shape.size()));
// hash all elements may costly, so only take at most 4 elements into account based on
// some experiments.
for (size_t i = 0; (i < shape.size()) && (i < 4); ++i) {
hash_value = hash_combine(hash_value, (std::hash<int>{}(shape[i])));
}
return hash_value;
}

size_t DETensor::Size() const {
MS_ASSERT(this->tensor_impl_ != nullptr);
return this->tensor_impl_->SizeInBytes();


+ 1
- 1
mindspore/ccsrc/minddata/dataset/api/python/de_pipeline.cc View File

@@ -41,6 +41,7 @@
#include "minddata/dataset/engine/datasetops/source/text_file_op.h"
#include "minddata/dataset/engine/datasetops/source/voc_op.h"
#include "minddata/dataset/kernels/py_func_op.h"
#include "minddata/dataset/util/log_adapter.h"
#include "minddata/dataset/util/random.h"
#include "minddata/dataset/util/status.h"
#include "minddata/mindrecord/include/shard_category.h"
@@ -51,7 +52,6 @@
#include "minddata/mindrecord/include/shard_shuffle.h"
#include "minddata/mindrecord/include/shard_writer.h"
#include "pybind11/stl.h"
#include "utils/log_adapter.h"
#include "utils/ms_utils.h"

namespace mindspore {


+ 5
- 1
mindspore/ccsrc/minddata/dataset/core/config_manager.cc View File

@@ -20,7 +20,11 @@
#include <string>
#include <utility>

#include "mindspore/core/utils/log_adapter.h"
#ifndef ENABLE_ANDROID
#include "utils/log_adapter.h"
#else
#include "mindspore/lite/src/common/log_adapter.h"
#endif
#include "minddata/dataset/util/system_pool.h"

namespace mindspore {


+ 4
- 0
mindspore/ccsrc/minddata/dataset/core/data_type.cc View File

@@ -18,7 +18,11 @@
#include "minddata/dataset/core/pybind_support.h"
#endif

#ifndef ENABLE_ANDROID
#include "utils/log_adapter.h"
#else
#include "mindspore/lite/src/common/log_adapter.h"
#endif

namespace mindspore {
namespace dataset {


+ 5
- 1
mindspore/ccsrc/minddata/dataset/core/tensor.h View File

@@ -21,7 +21,11 @@
#include <string>
#include <vector>
#include "./securec.h"
#ifndef ENABLE_ANDROID
#include "utils/log_adapter.h"
#else
#include "mindspore/lite/src/common/log_adapter.h"
#endif
#if defined(_WIN32) || defined(_WIN64)
#undef HAVE_STDDEF_H
#undef HAVE_STDLIB_H
@@ -33,12 +37,12 @@
#include "pybind11/stl.h"
#endif

#include "utils/ms_utils.h"
#include "minddata/dataset/core/constants.h"
#include "minddata/dataset/core/data_type.h"
#include "minddata/dataset/core/tensor_helpers.h"
#include "minddata/dataset/core/tensor_shape.h"
#include "minddata/dataset/util/status.h"
#include "utils/ms_utils.h"
#ifndef ENABLE_ANDROID
#include "proto/example.pb.h"
#else


+ 4
- 0
mindspore/ccsrc/minddata/dataset/core/tensor_shape.cc View File

@@ -20,7 +20,11 @@
#include <limits>

#include "utils/ms_utils.h"
#ifndef ENABLE_ANDROID
#include "utils/log_adapter.h"
#else
#include "mindspore/lite/src/common/log_adapter.h"
#endif
#include "minddata/dataset/core/constants.h"

namespace mindspore {


+ 5
- 1
mindspore/ccsrc/minddata/dataset/engine/cache/cache_grpc_server.cc View File

@@ -13,11 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "minddata/dataset/engine/cache/cache_grpc_server.h"
#include <limits>
#include "minddata/dataset/engine/cache/cache_grpc_server.h"
#include "minddata/dataset/engine/cache/cache_server.h"
#include "minddata/dataset/util/path.h"
#ifndef ENABLE_ANDROID
#include "utils/log_adapter.h"
#else
#include "mindspore/lite/src/common/log_adapter.h"
#endif
namespace mindspore {
namespace dataset {
CacheServerGreeterImpl::CacheServerGreeterImpl(int32_t port, int32_t shared_memory_sz_in_gb)


+ 4
- 0
mindspore/ccsrc/minddata/dataset/engine/data_schema.cc View File

@@ -26,7 +26,11 @@
#include "utils/ms_utils.h"
#include "minddata/dataset/util/status.h"
#include "minddata/dataset/core/tensor_shape.h"
#ifndef ENABLE_ANDROID
#include "utils/log_adapter.h"
#else
#include "mindspore/lite/src/common/log_adapter.h"
#endif

namespace mindspore {
namespace dataset {


+ 0
- 1
mindspore/ccsrc/minddata/dataset/engine/datasetops/barrier_op.cc View File

@@ -21,7 +21,6 @@
#include "minddata/dataset/engine/db_connector.h"
#include "minddata/dataset/core/config_manager.h"
#include "minddata/dataset/core/global_context.h"
#include "utils/log_adapter.h"

namespace mindspore {
namespace dataset {


+ 4
- 0
mindspore/ccsrc/minddata/dataset/engine/datasetops/cache_lookup_op.cc View File

@@ -19,8 +19,12 @@
#include "minddata/dataset/core/constants.h"
#include "minddata/dataset/core/global_context.h"
#include "minddata/dataset/engine/execution_tree.h"
#ifndef ENABLE_ANDROID
#include "utils/log_adapter.h"
#include "utils/system/crc32c.h"
#else
#include "mindspore/lite/src/common/log_adapter.h"
#endif

namespace mindspore {
namespace dataset {


+ 4
- 0
mindspore/ccsrc/minddata/dataset/engine/datasetops/cache_op.cc View File

@@ -26,7 +26,11 @@
#include "minddata/dataset/engine/execution_tree.h"
#include "minddata/dataset/engine/opt/pass.h"
#include "minddata/dataset/util/task_manager.h"
#ifndef ENABLE_ANDROID
#include "utils/log_adapter.h"
#else
#include "mindspore/lite/src/common/log_adapter.h"
#endif

namespace mindspore {
namespace dataset {


+ 6
- 0
mindspore/ccsrc/minddata/dataset/engine/datasetops/dataset_op.cc View File

@@ -30,8 +30,12 @@
#include "minddata/dataset/engine/data_buffer.h"
#include "minddata/dataset/engine/db_connector.h"
#include "minddata/dataset/engine/opt/pass.h"
#ifndef ENABLE_ANDROID
#include "utils/system/crc32c.h"
#include "utils/log_adapter.h"
#else
#include "mindspore/lite/src/common/log_adapter.h"
#endif

namespace mindspore {
namespace dataset {
@@ -385,6 +389,7 @@ Status DatasetOp::FetchRemoveSampler(std::shared_ptr<Sampler> *sampler) {
return Status::OK();
}

#ifndef ENABLE_ANDROID
uint32_t DatasetOp::GenerateCRC(const std::shared_ptr<DatasetOp> &op) {
std::stringstream ss;
op->tree_->Print(ss, op);
@@ -431,6 +436,7 @@ uint32_t DatasetOp::GenerateCRC(const std::shared_ptr<DatasetOp> &op) {
uint32_t cache_crc = system::Crc32c::GetMaskCrc32cValue(ss_str.c_str(), ss_str.length());
return cache_crc;
}
#endif

void DatasetOp::UpdateRepeatAndEpochCounter() {
op_current_repeats_++;


+ 2
- 0
mindspore/ccsrc/minddata/dataset/engine/datasetops/dataset_op.h View File

@@ -338,8 +338,10 @@ class DatasetOp : public std::enable_shared_from_this<DatasetOp> {
/// \return Status error code
Status FetchRemoveSampler(std::shared_ptr<Sampler> *sampler);

#ifndef ENABLE_ANDROID
// Computes a CRC value for the operator
static uint32_t GenerateCRC(const std::shared_ptr<DatasetOp> &op);
#endif

/// \brief A helper templated function for casting "this" pointer to shared_ptr<derived>
/// Similar to shared_from_this, except this one will give you the derived class as shared_ptr


+ 4
- 0
mindspore/ccsrc/minddata/dataset/engine/datasetops/epoch_ctrl_op.cc View File

@@ -22,7 +22,11 @@
#include "minddata/dataset/engine/data_buffer.h"
#include "minddata/dataset/engine/db_connector.h"
#include "minddata/dataset/engine/opt/pass.h"
#ifndef ENABLE_ANDROID
#include "utils/log_adapter.h"
#else
#include "mindspore/lite/src/common/log_adapter.h"
#endif

namespace mindspore {
namespace dataset {


+ 4
- 0
mindspore/ccsrc/minddata/dataset/engine/datasetops/filter_op.cc View File

@@ -29,7 +29,11 @@
#include "minddata/dataset/engine/execution_tree.h"
#include "minddata/dataset/engine/opt/pass.h"
#include "minddata/dataset/kernels/tensor_op.h"
#ifndef ENABLE_ANDROID
#include "utils/log_adapter.h"
#else
#include "mindspore/lite/src/common/log_adapter.h"
#endif
#include "minddata/dataset/util/task_manager.h"

namespace mindspore {


+ 4
- 0
mindspore/ccsrc/minddata/dataset/engine/datasetops/map_op/map_op.cc View File

@@ -31,7 +31,11 @@
#include "minddata/dataset/engine/opt/pass.h"
#include "minddata/dataset/kernels/tensor_op.h"
#include "minddata/dataset/util/task_manager.h"
#ifndef ENABLE_ANDROID
#include "utils/log_adapter.h"
#else
#include "mindspore/lite/src/common/log_adapter.h"
#endif

namespace mindspore {
namespace dataset {


+ 4
- 0
mindspore/ccsrc/minddata/dataset/engine/datasetops/project_op.cc View File

@@ -26,7 +26,11 @@
#include "minddata/dataset/engine/db_connector.h"
#include "minddata/dataset/engine/execution_tree.h"
#include "minddata/dataset/engine/opt/pass.h"
#ifndef ENABLE_ANDROID
#include "utils/log_adapter.h"
#else
#include "mindspore/lite/src/common/log_adapter.h"
#endif

namespace mindspore {
namespace dataset {


+ 4
- 0
mindspore/ccsrc/minddata/dataset/engine/datasetops/rename_op.cc View File

@@ -25,7 +25,11 @@
#include "minddata/dataset/engine/data_buffer.h"
#include "minddata/dataset/engine/db_connector.h"
#include "minddata/dataset/engine/opt/pass.h"
#ifndef ENABLE_ANDROID
#include "utils/log_adapter.h"
#else
#include "mindspore/lite/src/common/log_adapter.h"
#endif

namespace mindspore {
namespace dataset {


+ 4
- 0
mindspore/ccsrc/minddata/dataset/engine/datasetops/repeat_op.cc View File

@@ -23,7 +23,11 @@
#include "minddata/dataset/engine/db_connector.h"
#include "minddata/dataset/engine/opt/pass.h"

#ifndef ENABLE_ANDROID
#include "utils/log_adapter.h"
#else
#include "mindspore/lite/src/common/log_adapter.h"
#endif

namespace mindspore {
namespace dataset {


+ 4
- 0
mindspore/ccsrc/minddata/dataset/engine/datasetops/shuffle_op.cc View File

@@ -34,7 +34,11 @@
#include "minddata/dataset/util/random.h"
#include "minddata/dataset/util/status.h"

#ifndef ENABLE_ANDROID
#include "utils/log_adapter.h"
#else
#include "mindspore/lite/src/common/log_adapter.h"
#endif

namespace mindspore {
namespace dataset {


+ 4
- 0
mindspore/ccsrc/minddata/dataset/engine/datasetops/skip_op.cc View File

@@ -24,7 +24,11 @@
#include "minddata/dataset/engine/execution_tree.h"
#include "minddata/dataset/engine/opt/pass.h"

#ifndef ENABLE_ANDROID
#include "utils/log_adapter.h"
#else
#include "mindspore/lite/src/common/log_adapter.h"
#endif

namespace mindspore {
namespace dataset {


+ 4
- 0
mindspore/ccsrc/minddata/dataset/engine/datasetops/source/mindrecord_op.cc View File

@@ -30,7 +30,11 @@
#include "minddata/dataset/engine/db_connector.h"
#include "minddata/dataset/engine/execution_tree.h"
#include "minddata/dataset/engine/opt/pass.h"
#ifndef ENABLE_ANDROID
#include "utils/log_adapter.h"
#else
#include "mindspore/lite/src/common/log_adapter.h"
#endif

namespace mindspore {
namespace dataset {


+ 4
- 0
mindspore/ccsrc/minddata/dataset/engine/datasetops/zip_op.cc View File

@@ -22,7 +22,11 @@
#include "minddata/dataset/engine/opt/pass.h"
#include "minddata/dataset/core/config_manager.h"
#include "minddata/dataset/core/global_context.h"
#ifndef ENABLE_ANDROID
#include "utils/log_adapter.h"
#else
#include "mindspore/lite/src/common/log_adapter.h"
#endif

namespace mindspore {
namespace dataset {


+ 3
- 1
mindspore/ccsrc/minddata/dataset/engine/execution_tree.cc View File

@@ -25,8 +25,8 @@
#ifndef ENABLE_ANDROID
#include "minddata/dataset/engine/opt/pre/cache_transform_pass.h"
#include "minddata/dataset/engine/opt/post/repeat_pass.h"
#endif
#include "minddata/dataset/engine/opt/pre/cache_error_pass.h"
#endif
#include "minddata/dataset/engine/opt/pre/epoch_injection_pass.h"
#include "mindspore/ccsrc/minddata/dataset/engine/opt/optional/tensor_op_fusion_pass.h"
#include "minddata/dataset/engine/perf/profiling.h"
@@ -236,7 +236,9 @@ Status ExecutionTree::PrepareTreePreAction() {
std::vector<std::unique_ptr<Pass>> pre_actions;
// Construct pre actions
MS_LOG(INFO) << "Running pre pass loops.";
#ifndef ENABLE_ANDROID
pre_actions.push_back(std::make_unique<CacheErrorPass>());
#endif
pre_actions.push_back(std::make_unique<EpochInjectionPass>());
pre_actions.push_back(std::make_unique<RemovalPass>());
#ifndef ENABLE_ANDROID


+ 4
- 0
mindspore/ccsrc/minddata/dataset/engine/gnn/graph_shared_memory.cc View File

@@ -18,7 +18,11 @@

#include <string>

#ifndef ENABLE_ANDROID
#include "utils/log_adapter.h"
#else
#include "mindspore/lite/src/common/log_adapter.h"
#endif

namespace mindspore {
namespace dataset {


+ 4
- 0
mindspore/ccsrc/minddata/dataset/engine/gnn/grpc_async_server.cc View File

@@ -18,7 +18,11 @@
#include <limits>

#include "minddata/dataset/util/task_manager.h"
#ifndef ENABLE_ANDROID
#include "utils/log_adapter.h"
#else
#include "mindspore/lite/src/common/log_adapter.h"
#endif

namespace mindspore {
namespace dataset {


+ 4
- 0
mindspore/ccsrc/minddata/dataset/engine/perf/profiling.cc View File

@@ -24,7 +24,11 @@
#include "minddata/dataset/engine/perf/connector_size.h"
#include "minddata/dataset/engine/perf/connector_throughput.h"
#include "minddata/dataset/engine/perf/dataset_iterator_tracing.h"
#ifndef ENABLE_ANDROID
#include "utils/log_adapter.h"
#else
#include "mindspore/lite/src/common/log_adapter.h"
#endif

namespace mindspore {
namespace dataset {


+ 4
- 0
mindspore/ccsrc/minddata/dataset/engine/tdt/tdt_plugin.cc View File

@@ -15,7 +15,11 @@
*/
#include "minddata/dataset/engine/tdt/tdt_plugin.h"
#include "utils/ms_utils.h"
#ifndef ENABLE_ANDROID
#include "utils/log_adapter.h"
#else
#include "mindspore/lite/src/common/log_adapter.h"
#endif
#include "minddata/dataset/engine/perf/profiling.h"

namespace mindspore {


+ 4
- 0
mindspore/ccsrc/minddata/dataset/include/tensor.h View File

@@ -21,7 +21,11 @@
#include <string>
#include <vector>
#include "./securec.h"
#ifndef ENABLE_ANDROID
#include "utils/log_adapter.h"
#else
#include "mindspore/lite/src/common/log_adapter.h"
#endif
#if defined(_WIN32) || defined(_WIN64)
#undef HAVE_STDDEF_H
#undef HAVE_STDLIB_H


+ 7
- 6
mindspore/ccsrc/minddata/dataset/kernels/image/affine_op.cc View File

@@ -74,12 +74,13 @@ Status AffineOp::Compute(const std::shared_ptr<Tensor> &input, std::shared_ptr<T
float_t cx = ((input_cv->mat().cols - 1) / 2.0);
float_t cy = ((input_cv->mat().rows - 1) / 2.0);
// Calculate RSS
std::vector<float_t> matrix{scale_ * cos(degrees + shear_y) / cos(shear_y),
scale_ * (-1 * cos(degrees + shear_y) * tan(shear_x) / cos(shear_y) - sin(degrees)),
0,
scale_ * sin(degrees + shear_y) / cos(shear_y),
scale_ * (-1 * sin(degrees + shear_y) * tan(shear_x) / cos(shear_y) + cos(degrees)),
0};
std::vector<float_t> matrix{
static_cast<float>(scale_ * cos(degrees + shear_y) / cos(shear_y)),
static_cast<float>(scale_ * (-1 * cos(degrees + shear_y) * tan(shear_x) / cos(shear_y) - sin(degrees))),
0,
static_cast<float>(scale_ * sin(degrees + shear_y) / cos(shear_y)),
static_cast<float>(scale_ * (-1 * sin(degrees + shear_y) * tan(shear_x) / cos(shear_y) + cos(degrees))),
0};
// Compute T * C * RSS * C^-1
matrix[2] = (1 - matrix[0]) * cx - matrix[1] * cy + translation_x;
matrix[5] = (1 - matrix[4]) * cy - matrix[3] * cx + translation_y;


+ 1
- 1
mindspore/ccsrc/minddata/dataset/kernels/image/cutmix_batch_op.cc View File

@@ -182,7 +182,7 @@ Status CutMixBatchOp::Compute(const TensorRow &input, TensorRow *output) {

void CutMixBatchOp::Print(std::ostream &out) const {
out << "CutMixBatchOp: "
<< "image_batch_format: " << image_batch_format_ << "alpha: " << alpha_ << ", probability: " << prob_ << "\n";
<< "\n";
}
} // namespace dataset
} // namespace mindspore

+ 4
- 0
mindspore/ccsrc/minddata/dataset/text/vocab.cc View File

@@ -20,7 +20,11 @@
#include <algorithm>

#include "minddata/dataset/text/vocab.h"
#ifndef ENABLE_ANDROID
#include "utils/log_adapter.h"
#else
#include "mindspore/lite/src/common/log_adapter.h"
#endif

namespace mindspore {
namespace dataset {


+ 1
- 1
mindspore/ccsrc/minddata/dataset/util/arena.cc View File

@@ -16,9 +16,9 @@
#include "minddata/dataset/util/arena.h"
#include <unistd.h>
#include <utility>
#include "minddata/dataset/util/log_adapter.h"
#include "minddata/dataset/util/system_pool.h"
#include "./securec.h"
#include "utils/log_adapter.h"

namespace mindspore {
namespace dataset {


+ 2
- 1
mindspore/ccsrc/minddata/dataset/util/btree_iterator.tpp View File

@@ -15,7 +15,8 @@
#ifndef DATASET_UTIL_BTREE_ITERATOR_H_
#define DATASET_UTIL_BTREE_ITERATOR_H_

#include "utils/log_adapter.h"
#include "./securec.h"
#include "minddata/dataset/util/log_adapter.h"
#include "btree.h"

namespace mindspore {


+ 2
- 1
mindspore/ccsrc/minddata/dataset/util/buddy.cc View File

@@ -16,9 +16,10 @@
#include "minddata/dataset/util/buddy.h"
#include <iomanip>
#include <stdexcept>

#include "minddata/dataset/util/memory_pool.h"
#include "minddata/dataset/util/log_adapter.h"
#include "minddata/dataset/util/system_pool.h"
#include "utils/log_adapter.h"
#include "./securec.h"

inline uint64_t BitLeftShift(uint64_t v, uint64_t n) { return (v << n); }


+ 1
- 1
mindspore/ccsrc/minddata/dataset/util/circular_pool.cc View File

@@ -19,8 +19,8 @@
#include <limits>
#include <utility>
#include "./securec.h"
#include "minddata/dataset/util/log_adapter.h"
#include "minddata/dataset/util/system_pool.h"
#include "utils/log_adapter.h"

namespace mindspore {
namespace dataset {


+ 2
- 2
mindspore/ccsrc/minddata/dataset/util/data_helper.cc View File

@@ -23,11 +23,11 @@
#include <sstream>
#include <nlohmann/json.hpp>

#include "minddata/dataset/util/status.h"
#include "minddata/dataset/core/tensor.h"
#include "minddata/dataset/core/tensor_shape.h"
#include "utils/log_adapter.h"
#include "minddata/dataset/util/log_adapter.h"
#include "minddata/dataset/util/path.h"
#include "minddata/dataset/util/status.h"

namespace mindspore {
namespace dataset {


+ 1
- 1
mindspore/ccsrc/minddata/dataset/util/data_helper.h View File

@@ -30,7 +30,7 @@
#include "minddata/dataset/core/data_type.h"
#include "minddata/dataset/core/tensor.h"
#include "minddata/dataset/core/tensor_shape.h"
#include "utils/log_adapter.h"
#include "minddata/dataset/util/log_adapter.h"
#include "minddata/dataset/util/path.h"
#include "minddata/dataset/util/status.h"



+ 1
- 2
mindspore/ccsrc/minddata/dataset/util/intrp_service.h View File

@@ -23,12 +23,11 @@
#include <utility>
#include "minddata/dataset/util/allocator.h"
#include "minddata/dataset/util/intrp_resource.h"
#include "minddata/dataset/util/log_adapter.h"
#include "minddata/dataset/util/service.h"
#include "minddata/dataset/util/services.h"
#include "minddata/dataset/util/status.h"

#include "utils/log_adapter.h"

namespace mindspore {
namespace dataset {
using SvcAllocator = Allocator<std::pair<const std::string, IntrpResource *>>;


+ 1
- 1
mindspore/ccsrc/minddata/dataset/util/list.h View File

@@ -19,7 +19,7 @@
#include <iostream>
#include <iterator>

#include "utils/log_adapter.h"
#include "minddata/dataset/util/log_adapter.h"

namespace mindspore {
namespace dataset {


+ 1
- 1
mindspore/ccsrc/minddata/dataset/util/lock.cc View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
#include "minddata/dataset/util/lock.h"
#include "utils/log_adapter.h"
#include "minddata/dataset/util/log_adapter.h"

namespace mindspore {
namespace dataset {


+ 25
- 0
mindspore/ccsrc/minddata/dataset/util/log_adapter.h View File

@@ -0,0 +1,25 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_UTIL_LOG_ADAPTER_H_
#define MINDSPORE_CCSRC_MINDDATA_DATASET_UTIL_LOG_ADAPTER_H_

#ifndef ENABLE_ANDROID
#include "utils/log_adapter.h"
#else
#include "mindspore/lite/src/common/log_adapter.h"
#endif

#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_UTIL_LOG_ADAPTER_H_

+ 2
- 1
mindspore/ccsrc/minddata/dataset/util/path.cc View File

@@ -22,8 +22,9 @@
#include <sstream>
#include <utility>

#include "./securec.h"
#include "utils/ms_utils.h"
#include "utils/log_adapter.h"
#include "minddata/dataset/util/log_adapter.h"

namespace mindspore {
namespace dataset {


+ 2
- 1
mindspore/ccsrc/minddata/dataset/util/queue.h View File

@@ -24,9 +24,10 @@
#include <utility>
#include <vector>

#include "./securec.h"
#include "utils/ms_utils.h"
#include "utils/log_adapter.h"
#include "minddata/dataset/util/allocator.h"
#include "minddata/dataset/util/log_adapter.h"
#include "minddata/dataset/util/services.h"
#include "minddata/dataset/util/cond_var.h"
#include "minddata/dataset/util/task_manager.h"


+ 1
- 1
mindspore/ccsrc/minddata/dataset/util/random.h View File

@@ -28,7 +28,7 @@

#include "minddata/dataset/core/config_manager.h"
#include "minddata/dataset/core/global_context.h"
#include "utils/log_adapter.h"
#include "minddata/dataset/util/log_adapter.h"

namespace mindspore {
namespace dataset {


+ 1
- 0
mindspore/ccsrc/minddata/dataset/util/services.cc View File

@@ -22,6 +22,7 @@
#include <stdlib.h>
#endif
#include <unistd.h>
#include "./securec.h"
#include "minddata/dataset/util/circular_pool.h"
#include "minddata/dataset/util/random.h"
#include "minddata/dataset/util/task_manager.h"


+ 1
- 1
mindspore/ccsrc/minddata/dataset/util/storage_container.cc View File

@@ -20,9 +20,9 @@
#include <unistd.h>
#include <vector>
#include "utils/ms_utils.h"
#include "minddata/dataset/util/log_adapter.h"
#include "minddata/dataset/util/path.h"
#include "minddata/dataset/util/status.h"
#include "utils/log_adapter.h"

namespace mindspore {
namespace dataset {


+ 1
- 1
mindspore/ccsrc/minddata/dataset/util/storage_manager.cc View File

@@ -20,9 +20,9 @@
#include <stdexcept>
#include <utility>
#include "utils/ms_utils.h"
#include "minddata/dataset/util/log_adapter.h"
#include "minddata/dataset/util/path.h"
#include "minddata/dataset/util/services.h"
#include "utils/log_adapter.h"

namespace mindspore {
namespace dataset {


+ 1
- 1
mindspore/ccsrc/minddata/dataset/util/task.cc View File

@@ -15,8 +15,8 @@
*/
#include "minddata/dataset/util/task.h"
#include "utils/ms_utils.h"
#include "minddata/dataset/util/log_adapter.h"
#include "minddata/dataset/util/task_manager.h"
#include "utils/log_adapter.h"
#if defined(__ANDROID__) || defined(ANDROID)
#include "minddata/dataset/util/services.h"
#endif


+ 1
- 1
mindspore/ccsrc/minddata/dataset/util/task.h View File

@@ -29,10 +29,10 @@
#include <thread>
#include "minddata/dataset/util/intrp_resource.h"
#include "minddata/dataset/util/list.h"
#include "minddata/dataset/util/log_adapter.h"
#include "minddata/dataset/util/memory_pool.h"
#include "minddata/dataset/util/services.h"
#include "minddata/dataset/util/wait_post.h"
#include "utils/log_adapter.h"

namespace mindspore {
namespace dataset {


+ 11
- 4
mindspore/lite/minddata/CMakeLists.txt View File

@@ -118,8 +118,15 @@ if (BUILD_MINDDATA STREQUAL "full")

list(REMOVE_ITEM MINDDATA_ENGINE_OPT_PRE_SRC_FILES
"${MINDDATA_DIR}/engine/opt/pre/cache_transform_pass.cc"
"${MINDDATA_DIR}/engine/opt/pre/cache_error_pass.cc"
)

#list(REMOVE_ITEM MINDDATA_KERNELS_IMAGE_SRC_FILES
#"${MINDDATA_DIR}/kernels/image/affine_op.cc"
#"${MINDDATA_DIR}/kernels/image/cutmix_batch_op.cc"
#"${MINDDATA_DIR}/kernels/image/random_affine_op.cc"
#)

include_directories("${CMAKE_BINARY_DIR}/minddata/dataset/engine/cache")

if (BUILD_MINDDATA_EXAMPLE AND (PLATFORM_ARM32 OR PLATFORM_ARM64))
@@ -149,8 +156,6 @@ if (BUILD_MINDDATA STREQUAL "full")
${MINDDATA_EXAMPLE_SRC}
${CMAKE_CURRENT_SOURCE_DIR}/../src/common/log_adapter.cc
${CORE_DIR}/utils/ms_utils.cc
${CORE_DIR}/gvar/logging_level.cc
${CCSRC_DIR}/utils/system/crc32c.cc
)

target_link_libraries(minddata-lite
@@ -189,6 +194,10 @@ elseif (BUILD_MINDDATA STREQUAL "lite")
${MINDDATA_DIR}/api/execute.cc
)

list(REMOVE_ITEM MINDDATA_KERNELS_IMAGE_SRC_FILES
"${MINDDATA_DIR}/kernels/image/bounding_box_augment_op.cc"
"${MINDDATA_DIR}/kernels/image/cut_out_op.cc"
)
add_library(minddata-lite SHARED
${MINDDATA_CORE_SRC_FILES}
${MINDDATA_KERNELS_SRC_FILES}
@@ -198,8 +207,6 @@ elseif (BUILD_MINDDATA STREQUAL "lite")
${MINDDATA_DIR}/util/memory_pool.cc
${MINDDATA_DIR}/util/path.cc
${MINDDATA_DIR}/api/transforms.cc
${CORE_DIR}/utils/log_adapter.cc
${CORE_DIR}/gvar/logging_level.cc
)

target_link_libraries(minddata-lite


+ 2
- 0
mindspore/lite/test/ut/src/dataset/eager_test.cc View File

@@ -19,6 +19,8 @@
#include "./securec.h"
#include "minddata/dataset/include/tensor.h"
#include "minddata/dataset/include/datasets.h"
#include "minddata/dataset/include/transforms.h"
#include "minddata/dataset/include/vision.h"
#include "minddata/dataset/include/execute.h"
#include "minddata/dataset/util/path.h"



Loading…
Cancel
Save