Browse Source

exclude de_tensor in normal build

tags/v0.7.0-beta
ervinzhang 5 years ago
parent
commit
1f13b3ef6d
4 changed files with 12 additions and 5 deletions
  1. +0
    -2
      mindspore/ccsrc/minddata/dataset/api/CMakeLists.txt
  2. +6
    -1
      mindspore/ccsrc/minddata/dataset/core/tensor.h
  3. +6
    -1
      mindspore/ccsrc/minddata/dataset/include/tensor.h
  4. +0
    -1
      mindspore/lite/CMakeLists.txt

+ 0
- 2
mindspore/ccsrc/minddata/dataset/api/CMakeLists.txt View File

@@ -13,6 +13,4 @@ add_library(cpp-API OBJECT
iterator.cc iterator.cc
transforms.cc transforms.cc
samplers.cc samplers.cc
de_tensor.cc
execute.cc
) )

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

@@ -38,18 +38,21 @@
#include "minddata/dataset/core/data_type.h" #include "minddata/dataset/core/data_type.h"
#include "minddata/dataset/core/tensor_shape.h" #include "minddata/dataset/core/tensor_shape.h"
#include "minddata/dataset/util/status.h" #include "minddata/dataset/util/status.h"
#include "minddata/dataset/include/de_tensor.h"
#ifndef ENABLE_ANDROID #ifndef ENABLE_ANDROID
#include "proto/example.pb.h" #include "proto/example.pb.h"
#else
#include "minddata/dataset/include/de_tensor.h"
#endif #endif


#ifdef ENABLE_PYTHON #ifdef ENABLE_PYTHON
namespace py = pybind11; namespace py = pybind11;
#endif #endif
namespace mindspore { namespace mindspore {
#ifdef ENABLE_ANDROID
namespace tensor { namespace tensor {
class DETensor; class DETensor;
} // namespace tensor } // namespace tensor
#endif
namespace dataset { namespace dataset {
class Tensor; class Tensor;
template <typename T> template <typename T>
@@ -61,7 +64,9 @@ using offset_t = uint32_t; // type of offset va
using TensorPtr = std::shared_ptr<Tensor>; using TensorPtr = std::shared_ptr<Tensor>;


class Tensor { class Tensor {
#ifdef ENABLE_ANDROID
friend class tensor::DETensor; friend class tensor::DETensor;
#endif
public: public:
Tensor() = delete; Tensor() = delete;
Tensor(const Tensor &other) = delete; Tensor(const Tensor &other) = delete;


+ 6
- 1
mindspore/ccsrc/minddata/dataset/include/tensor.h View File

@@ -38,18 +38,21 @@
#include "minddata/dataset/core/data_type.h" #include "minddata/dataset/core/data_type.h"
#include "minddata/dataset/core/tensor_shape.h" #include "minddata/dataset/core/tensor_shape.h"
#include "minddata/dataset/util/status.h" #include "minddata/dataset/util/status.h"
#include "minddata/dataset/include/de_tensor.h"
#ifndef ENABLE_ANDROID #ifndef ENABLE_ANDROID
#include "proto/example.pb.h" #include "proto/example.pb.h"
#else
#include "minddata/dataset/include/de_tensor.h"
#endif #endif


#ifdef ENABLE_PYTHON #ifdef ENABLE_PYTHON
namespace py = pybind11; namespace py = pybind11;
#endif #endif
namespace mindspore { namespace mindspore {
#ifdef ENABLE_ANDROID
namespace tensor { namespace tensor {
class DETensor; class DETensor;
} // namespace tensor } // namespace tensor
#endif
namespace dataset { namespace dataset {
class Tensor; class Tensor;
template <typename T> template <typename T>
@@ -61,7 +64,9 @@ using offset_t = uint32_t; // type of offset va
using TensorPtr = std::shared_ptr<Tensor>; using TensorPtr = std::shared_ptr<Tensor>;


class Tensor { class Tensor {
#ifdef ENABLE_ANDROID
friend class tensor::DETensor; friend class tensor::DETensor;
#endif
public: public:
Tensor() = delete; Tensor() = delete;
Tensor(const Tensor &other) = delete; Tensor(const Tensor &other) = delete;


+ 0
- 1
mindspore/lite/CMakeLists.txt View File

@@ -138,7 +138,6 @@ if (BUILD_MINDDATA)
include_directories(${TOP_DIR}/third_party/libjpeg-turbo/include) include_directories(${TOP_DIR}/third_party/libjpeg-turbo/include)


add_compile_definitions(ENABLE_ANDROID) add_compile_definitions(ENABLE_ANDROID)
add_compile_definitions(ENABLE_EAGER)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/minddata) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/minddata)
endif() endif()




Loading…
Cancel
Save