diff --git a/build.sh b/build.sh index 1aa25301af4..39a5889c03a 100755 --- a/build.sh +++ b/build.sh @@ -682,11 +682,11 @@ build_lite_java_arm64() { cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/lib/libmindspore-lite.so ${JAVA_PATH}/java/app/libs/arm64-v8a/ cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/lib/libmindspore-lite.so ${JAVA_PATH}/native/libs/arm64-v8a/ - cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/minddata/lib/libminddata-lite.so ${JAVA_PATH}/java/app/libs/arm64-v8a/ - cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/minddata/lib/libminddata-lite.so ${JAVA_PATH}/native/libs/arm64-v8a/ + cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/lib/libminddata-lite.so ${JAVA_PATH}/java/app/libs/arm64-v8a/ + cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/lib/libminddata-lite.so ${JAVA_PATH}/native/libs/arm64-v8a/ - cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/minddata/third_party/libjpeg-turbo/lib/*.so ${JAVA_PATH}/java/app/libs/arm64-v8a/ - cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/minddata/third_party/libjpeg-turbo/lib/*.so ${JAVA_PATH}/native/libs/arm64-v8a/ + cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/third_party/libjpeg-turbo/lib/*.so ${JAVA_PATH}/java/app/libs/arm64-v8a/ + cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/third_party/libjpeg-turbo/lib/*.so ${JAVA_PATH}/native/libs/arm64-v8a/ else cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/inference/lib/libmindspore-lite.so ${JAVA_PATH}/java/app/libs/arm64-v8a/ cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/inference/lib/libmindspore-lite.so ${JAVA_PATH}/native/libs/arm64-v8a/ @@ -714,11 +714,11 @@ build_lite_java_arm32() { cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/lib/libmindspore-lite.so ${JAVA_PATH}/java/app/libs/armeabi-v7a/ cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/lib/libmindspore-lite.so ${JAVA_PATH}/native/libs/armeabi-v7a/ - cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/minddata/lib/libminddata-lite.so ${JAVA_PATH}/java/app/libs/armeabi-v7a/ - cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/minddata/lib/libminddata-lite.so ${JAVA_PATH}/native/libs/armeabi-v7a/ + cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/lib/libminddata-lite.so ${JAVA_PATH}/java/app/libs/armeabi-v7a/ + cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/lib/libminddata-lite.so ${JAVA_PATH}/native/libs/armeabi-v7a/ - cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/minddata/third_party/libjpeg-turbo/lib/*.so ${JAVA_PATH}/java/app/libs/armeabi-v7a/ - cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/minddata/third_party/libjpeg-turbo/lib/*.so ${JAVA_PATH}/native/libs/armeabi-v7a/ + cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/third_party/libjpeg-turbo/lib/*.so ${JAVA_PATH}/java/app/libs/armeabi-v7a/ + cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/third_party/libjpeg-turbo/lib/*.so ${JAVA_PATH}/native/libs/armeabi-v7a/ else cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/inference/lib/libmindspore-lite.so ${JAVA_PATH}/java/app/libs/armeabi-v7a/ cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/inference/lib/libmindspore-lite.so ${JAVA_PATH}/native/libs/armeabi-v7a/ @@ -747,11 +747,11 @@ build_lite_java_x86() { cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/lib/libmindspore-lite.so ${JAVA_PATH}/java/linux_x86/libs/ cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/lib/libmindspore-lite.so ${JAVA_PATH}/native/libs/linux_x86/ - cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/minddata/lib/libminddata-lite.so ${JAVA_PATH}/java/linux_x86/libs/ - cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/minddata/lib/libminddata-lite.so ${JAVA_PATH}/native/libs/linux_x86/ + cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/lib/libminddata-lite.so ${JAVA_PATH}/java/linux_x86/libs/ + cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/lib/libminddata-lite.so ${JAVA_PATH}/native/libs/linux_x86/ - cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/minddata/third_party/libjpeg-turbo/lib/*.so* ${JAVA_PATH}/java/linux_x86/libs/ - cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/minddata/third_party/libjpeg-turbo/lib/*.so* ${JAVA_PATH}/native/libs/linux_x86/ + cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/third_party/libjpeg-turbo/lib/*.so* ${JAVA_PATH}/java/linux_x86/libs/ + cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/train/third_party/libjpeg-turbo/lib/*.so* ${JAVA_PATH}/native/libs/linux_x86/ else cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/inference/lib/libmindspore-lite.so ${JAVA_PATH}/java/linux_x86/libs/ cp ${BASEPATH}/mindspore/lite/build/java/${JTARBALL}/inference/lib/libmindspore-lite.so ${JAVA_PATH}/native/libs/linux_x86/ diff --git a/cmake/package.cmake b/cmake/package.cmake index 611fc537b6a..f528c40b0f3 100644 --- a/cmake/package.cmake +++ b/cmake/package.cmake @@ -367,13 +367,13 @@ install( ## Public header files for minddata install( - FILES ${CMAKE_SOURCE_DIR}/mindspore/ccsrc/minddata/dataset/include/constants.h - ${CMAKE_SOURCE_DIR}/mindspore/ccsrc/minddata/dataset/include/transforms.h - ${CMAKE_SOURCE_DIR}/mindspore/ccsrc/minddata/dataset/include/vision.h - ${CMAKE_SOURCE_DIR}/mindspore/ccsrc/minddata/dataset/include/vision_lite.h - ${CMAKE_SOURCE_DIR}/mindspore/ccsrc/minddata/dataset/include/vision_ascend.h - ${CMAKE_SOURCE_DIR}/mindspore/ccsrc/minddata/dataset/include/execute.h - DESTINATION ${INSTALL_BASE_DIR}/include/minddata/dataset/include + FILES ${CMAKE_SOURCE_DIR}/mindspore/ccsrc/minddata/dataset/include/dataset/constants.h + ${CMAKE_SOURCE_DIR}/mindspore/ccsrc/minddata/dataset/include/dataset/transforms.h + ${CMAKE_SOURCE_DIR}/mindspore/ccsrc/minddata/dataset/include/dataset/vision.h + ${CMAKE_SOURCE_DIR}/mindspore/ccsrc/minddata/dataset/include/dataset/vision_lite.h + ${CMAKE_SOURCE_DIR}/mindspore/ccsrc/minddata/dataset/include/dataset/vision_ascend.h + ${CMAKE_SOURCE_DIR}/mindspore/ccsrc/minddata/dataset/include/dataset/execute.h + DESTINATION ${INSTALL_BASE_DIR}/include/dataset COMPONENT mindspore ) diff --git a/cmake/package_lite.cmake b/cmake/package_lite.cmake index efe06de441d..5784ea515b8 100644 --- a/cmake/package_lite.cmake +++ b/cmake/package_lite.cmake @@ -10,9 +10,8 @@ if(SUPPORT_TRAIN) set(RUNTIME_DIR ${RUNTIME_PKG_NAME}/train) set(RUNTIME_INC_DIR ${RUNTIME_PKG_NAME}/train/include) set(RUNTIME_LIB_DIR ${RUNTIME_PKG_NAME}/train/lib) - set(MIND_DATA_INC_DIR ${RUNTIME_PKG_NAME}/train/minddata/include) - set(MIND_DATA_LIB_DIR ${RUNTIME_PKG_NAME}/train/minddata/lib) - set(TURBO_DIR ${RUNTIME_PKG_NAME}/train/minddata/third_party/libjpeg-turbo) + set(MIND_DATA_INC_DIR ${RUNTIME_PKG_NAME}/train/include/dataset) + set(TURBO_DIR ${RUNTIME_PKG_NAME}/train/third_party/libjpeg-turbo) set(MINDSPORE_LITE_LIB_NAME libmindspore-lite-train) set(BENCHMARK_NAME benchmark_train) set(BENCHMARK_ROOT_DIR ${RUNTIME_PKG_NAME}/tools/benchmark_train) @@ -20,31 +19,38 @@ else() set(RUNTIME_DIR ${RUNTIME_PKG_NAME}/inference) set(RUNTIME_INC_DIR ${RUNTIME_PKG_NAME}/inference/include) set(RUNTIME_LIB_DIR ${RUNTIME_PKG_NAME}/inference/lib) - set(MIND_DATA_INC_DIR ${RUNTIME_PKG_NAME}/inference/minddata/include) - set(MIND_DATA_LIB_DIR ${RUNTIME_PKG_NAME}/inference/minddata/lib) - set(TURBO_DIR ${RUNTIME_PKG_NAME}/inference/minddata/third_party/libjpeg-turbo) + set(MIND_DATA_INC_DIR ${RUNTIME_PKG_NAME}/inference/include/dataset) + set(TURBO_DIR ${RUNTIME_PKG_NAME}/inference/third_party/libjpeg-turbo) set(MINDSPORE_LITE_LIB_NAME libmindspore-lite) set(BENCHMARK_NAME benchmark) set(BENCHMARK_ROOT_DIR ${RUNTIME_PKG_NAME}/tools/benchmark) endif() if(BUILD_MINDDATA STREQUAL "full") - install(DIRECTORY ${TOP_DIR}/mindspore/ccsrc/minddata/dataset/liteapi/include/ DESTINATION - ${MIND_DATA_INC_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) + install(FILES + ${TOP_DIR}/mindspore/ccsrc/minddata/dataset/include/dataset/constants.h + ${TOP_DIR}/mindspore/ccsrc/minddata/dataset/include/dataset/data_helper.h + ${TOP_DIR}/mindspore/ccsrc/minddata/dataset/include/dataset/execute.h + ${TOP_DIR}/mindspore/ccsrc/minddata/dataset/include/dataset/iterator.h + ${TOP_DIR}/mindspore/ccsrc/minddata/dataset/include/dataset/samplers.h + ${TOP_DIR}/mindspore/ccsrc/minddata/dataset/include/dataset/transforms.h + ${TOP_DIR}/mindspore/ccsrc/minddata/dataset/include/dataset/vision_lite.h + ${TOP_DIR}/mindspore/ccsrc/minddata/dataset/liteapi/include/datasets.h + DESTINATION ${MIND_DATA_INC_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) if(PLATFORM_ARM64) file(GLOB JPEGTURBO_LIB_LIST ${jpeg_turbo_LIBPATH}/*.so) install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/libminddata-lite.so - DESTINATION ${MIND_DATA_LIB_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) + DESTINATION ${RUNTIME_LIB_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) install(FILES ${JPEGTURBO_LIB_LIST} DESTINATION ${TURBO_DIR}/lib COMPONENT ${RUNTIME_COMPONENT_NAME}) elseif(PLATFORM_ARM32) file(GLOB JPEGTURBO_LIB_LIST ${jpeg_turbo_LIBPATH}/*.so) install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/libminddata-lite.so DESTINATION - ${MIND_DATA_LIB_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) + ${RUNTIME_LIB_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) install(FILES ${JPEGTURBO_LIB_LIST} DESTINATION ${TURBO_DIR}/lib COMPONENT ${RUNTIME_COMPONENT_NAME}) else() install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/libminddata-lite.so DESTINATION - ${MIND_DATA_LIB_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) + ${RUNTIME_LIB_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) install(FILES ${jpeg_turbo_LIBPATH}/libjpeg.so.62.3.0 DESTINATION ${TURBO_DIR}/lib RENAME libjpeg.so.62 COMPONENT ${RUNTIME_COMPONENT_NAME}) install(FILES ${jpeg_turbo_LIBPATH}/libturbojpeg.so.0.2.0 DESTINATION ${TURBO_DIR}/lib @@ -57,16 +63,16 @@ if(BUILD_MINDDATA STREQUAL "wrapper") COMPONENT ${RUNTIME_COMPONENT_NAME} FILES_MATCHING PATTERN "*.h" PATTERN "vision.h" EXCLUDE) if(PLATFORM_ARM64) file(GLOB JPEGTURBO_LIB_LIST ${jpeg_turbo_LIBPATH}/*.so) - install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/libminddata-lite.so DESTINATION ${MIND_DATA_LIB_DIR} + install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/libminddata-lite.so DESTINATION ${RUNTIME_LIB_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) install(FILES ${JPEGTURBO_LIB_LIST} DESTINATION ${TURBO_DIR}/lib COMPONENT ${RUNTIME_COMPONENT_NAME}) elseif(PLATFORM_ARM32) file(GLOB JPEGTURBO_LIB_LIST ${jpeg_turbo_LIBPATH}/*.so) - install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/libminddata-lite.so DESTINATION ${MIND_DATA_LIB_DIR} + install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/libminddata-lite.so DESTINATION ${RUNTIME_LIB_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) install(FILES ${JPEGTURBO_LIB_LIST} DESTINATION ${TURBO_DIR}/lib COMPONENT ${RUNTIME_COMPONENT_NAME}) else() - install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/libminddata-lite.so DESTINATION ${MIND_DATA_LIB_DIR} + install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/libminddata-lite.so DESTINATION ${RUNTIME_LIB_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) install(FILES ${jpeg_turbo_LIBPATH}/libjpeg.so.62.3.0 DESTINATION ${TURBO_DIR}/lib RENAME libjpeg.so.62 COMPONENT ${RUNTIME_COMPONENT_NAME}) @@ -79,21 +85,21 @@ if(BUILD_MINDDATA STREQUAL "lite") install(DIRECTORY ${TOP_DIR}/mindspore/ccsrc/minddata/dataset/include/ DESTINATION ${MIND_DATA_INC_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME} FILES_MATCHING PATTERN "*.h") if(PLATFORM_ARM64) - install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/libminddata-lite.so DESTINATION ${MIND_DATA_LIB_DIR} + install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/libminddata-lite.so DESTINATION ${RUNTIME_LIB_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) install(FILES ${TOP_DIR}/third_party/libjpeg-turbo/lib/libjpeg.so DESTINATION ${TURBO_DIR}/lib COMPONENT ${RUNTIME_COMPONENT_NAME}) install(FILES ${TOP_DIR}/third_party/libjpeg-turbo/lib/libturbojpeg.so DESTINATION ${TURBO_DIR}/lib COMPONENT ${RUNTIME_COMPONENT_NAME}) elseif(PLATFORM_ARM32) - install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/libminddata-lite.so DESTINATION ${MIND_DATA_LIB_DIR} + install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/libminddata-lite.so DESTINATION ${RUNTIME_LIB_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) install(FILES ${TOP_DIR}/third_party/libjpeg-turbo/lib/libjpeg.so DESTINATION ${TURBO_DIR}/lib COMPONENT ${RUNTIME_COMPONENT_NAME}) install(FILES ${TOP_DIR}/third_party/libjpeg-turbo/lib/libturbojpeg.so DESTINATION ${TURBO_DIR}/lib COMPONENT ${RUNTIME_COMPONENT_NAME}) else() - install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/libminddata-lite.so DESTINATION ${MIND_DATA_LIB_DIR} + install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/libminddata-lite.so DESTINATION ${RUNTIME_LIB_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) install(FILES ${TOP_DIR}/third_party/libjpeg-turbo/lib/libjpeg.so.62.3.0 DESTINATION ${TURBO_DIR}/lib RENAME libjpeg.so.62 COMPONENT ${RUNTIME_COMPONENT_NAME}) @@ -107,16 +113,16 @@ if(BUILD_MINDDATA STREQUAL "lite_cv") install(DIRECTORY ${TOP_DIR}/mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv DESTINATION ${MIND_DATA_INC_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME} FILES_MATCHING PATTERN "*.h") install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/libminddata-lite.so - DESTINATION ${MIND_DATA_LIB_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) + DESTINATION ${RUNTIME_LIB_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) elseif(PLATFORM_ARM32) install(DIRECTORY ${TOP_DIR}/mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv DESTINATION ${MIND_DATA_INC_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME} FILES_MATCHING PATTERN "*.h") - install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/libminddata-lite.so DESTINATION ${MIND_DATA_LIB_DIR} + install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/libminddata-lite.so DESTINATION ${RUNTIME_LIB_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) else() install(DIRECTORY ${TOP_DIR}/mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv DESTINATION ${MIND_DATA_INC_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME} FILES_MATCHING PATTERN "*.h") - install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/libminddata-lite.so DESTINATION ${MIND_DATA_LIB_DIR} + install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/libminddata-lite.so DESTINATION ${RUNTIME_LIB_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME}) endif() endif() diff --git a/mindspore/ccsrc/minddata/dataset/CMakeLists.txt b/mindspore/ccsrc/minddata/dataset/CMakeLists.txt index ffc20cdfe1b..125bee998fb 100644 --- a/mindspore/ccsrc/minddata/dataset/CMakeLists.txt +++ b/mindspore/ccsrc/minddata/dataset/CMakeLists.txt @@ -52,7 +52,7 @@ include_directories(${CMAKE_BINARY_DIR}) # for protobuf generated .h include_directories(${CMAKE_SOURCE_DIR}/mindspore) include_directories(${CMAKE_SOURCE_DIR}/mindspore/ccsrc/minddata/mindrecord/include) -include_directories(${CMAKE_SOURCE_DIR}/mindspore/ccsrc/minddata/dataset/include) +include_directories(${CMAKE_SOURCE_DIR}/mindspore/ccsrc/minddata/dataset) include_directories(${CMAKE_SOURCE_DIR}/mindspore/ccsrc/minddata/dataset/kernels/image) ###################################################################### diff --git a/mindspore/ccsrc/minddata/dataset/api/config.cc b/mindspore/ccsrc/minddata/dataset/api/config.cc index ad636a09ec7..11452f018d9 100644 --- a/mindspore/ccsrc/minddata/dataset/api/config.cc +++ b/mindspore/ccsrc/minddata/dataset/api/config.cc @@ -16,7 +16,7 @@ #include "minddata/dataset/core/config_manager.h" #include "minddata/dataset/core/global_context.h" -#include "minddata/dataset/include/config.h" +#include "minddata/dataset/include/dataset/config.h" #include "minddata/dataset/util/log_adapter.h" #include "minddata/dataset/util/status.h" diff --git a/mindspore/ccsrc/minddata/dataset/api/data_helper.cc b/mindspore/ccsrc/minddata/dataset/api/data_helper.cc index f46cea22eba..2309cff92a1 100644 --- a/mindspore/ccsrc/minddata/dataset/api/data_helper.cc +++ b/mindspore/ccsrc/minddata/dataset/api/data_helper.cc @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "minddata/dataset/include/data_helper.h" +#include "minddata/dataset/include/dataset/data_helper.h" #include #include diff --git a/mindspore/ccsrc/minddata/dataset/api/datasets.cc b/mindspore/ccsrc/minddata/dataset/api/datasets.cc index 85684c6e13b..914b0160b42 100644 --- a/mindspore/ccsrc/minddata/dataset/api/datasets.cc +++ b/mindspore/ccsrc/minddata/dataset/api/datasets.cc @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "minddata/dataset/include/datasets.h" +#include "minddata/dataset/include/dataset/datasets.h" #include #include #include @@ -23,9 +23,9 @@ #include "minddata/dataset/core/tensor.h" #include "minddata/dataset/engine/runtime_context.h" -#include "minddata/dataset/include/iterator.h" -#include "minddata/dataset/include/samplers.h" -#include "minddata/dataset/include/transforms.h" +#include "minddata/dataset/include/dataset/iterator.h" +#include "minddata/dataset/include/dataset/samplers.h" +#include "minddata/dataset/include/dataset/transforms.h" #include "minddata/dataset/util/path.h" #include "minddata/dataset/util/status.h" #include "minddata/dataset/core/client.h" diff --git a/mindspore/ccsrc/minddata/dataset/api/execute.cc b/mindspore/ccsrc/minddata/dataset/api/execute.cc index 8d22ae86bf9..d5a64aa9709 100644 --- a/mindspore/ccsrc/minddata/dataset/api/execute.cc +++ b/mindspore/ccsrc/minddata/dataset/api/execute.cc @@ -16,7 +16,7 @@ #include #include -#include "minddata/dataset/include/execute.h" +#include "minddata/dataset/include/dataset/execute.h" #include "minddata/dataset/core/de_tensor.h" #include "minddata/dataset/core/tensor_row.h" #include "minddata/dataset/core/tensor.h" diff --git a/mindspore/ccsrc/minddata/dataset/api/iterator.cc b/mindspore/ccsrc/minddata/dataset/api/iterator.cc index fc208eda088..d3733a471db 100644 --- a/mindspore/ccsrc/minddata/dataset/api/iterator.cc +++ b/mindspore/ccsrc/minddata/dataset/api/iterator.cc @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "minddata/dataset/include/iterator.h" +#include "minddata/dataset/include/dataset/iterator.h" #include "minddata/dataset/engine/consumers/pull_based_tree_consumer.h" #include "minddata/dataset/engine/consumers/tree_consumer.h" #include "minddata/dataset/engine/runtime_context.h" -#include "minddata/dataset/include/datasets.h" +#include "minddata/dataset/include/dataset/datasets.h" namespace mindspore { namespace dataset { diff --git a/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/core/bindings.cc b/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/core/bindings.cc index 6687c55a808..f9a4462269f 100644 --- a/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/core/bindings.cc +++ b/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/core/bindings.cc @@ -21,7 +21,7 @@ #include "minddata/dataset/core/client.h" // DE client #include "minddata/dataset/util/status.h" #include "pybind11/numpy.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" namespace mindspore { namespace dataset { diff --git a/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/engine/ir/datasetops/bindings.cc b/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/engine/ir/datasetops/bindings.cc index 0574aa0e848..7ef87c941d5 100644 --- a/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/engine/ir/datasetops/bindings.cc +++ b/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/engine/ir/datasetops/bindings.cc @@ -18,7 +18,7 @@ #include "minddata/dataset/api/python/pybind_conversion.h" #include "minddata/dataset/api/python/pybind_register.h" #include "minddata/dataset/callback/py_ds_callback.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/engine/serdes.h" #include "minddata/dataset/text/sentence_piece_vocab.h" diff --git a/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/engine/ir/datasetops/source/bindings.cc b/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/engine/ir/datasetops/source/bindings.cc index 593c936241a..04013b80d9c 100644 --- a/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/engine/ir/datasetops/source/bindings.cc +++ b/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/engine/ir/datasetops/source/bindings.cc @@ -17,8 +17,8 @@ #include "minddata/dataset/api/python/pybind_conversion.h" #include "minddata/dataset/api/python/pybind_register.h" -#include "minddata/dataset/include/constants.h" -#include "minddata/dataset/include/datasets.h" +#include "minddata/dataset/include/dataset/constants.h" +#include "minddata/dataset/include/dataset/datasets.h" #include "minddata/dataset/core/config_manager.h" #include "minddata/dataset/core/data_type.h" diff --git a/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/engine/ir/datasetops/source/samplers/bindings.cc b/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/engine/ir/datasetops/source/samplers/bindings.cc index 928e2d23c5a..fe28193078e 100644 --- a/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/engine/ir/datasetops/source/samplers/bindings.cc +++ b/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/engine/ir/datasetops/source/samplers/bindings.cc @@ -19,7 +19,7 @@ #include "minddata/dataset/engine/datasetops/source/sampler/python_sampler.h" #include "minddata/dataset/api/python/pybind_conversion.h" #include "minddata/dataset/api/python/pybind_register.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/core/global_context.h" #include "minddata/dataset/engine/ir/datasetops/source/samplers/samplers_ir.h" diff --git a/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/engine/ir/execute/bindings.cc b/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/engine/ir/execute/bindings.cc index 31255035e53..dad74e4d29e 100644 --- a/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/engine/ir/execute/bindings.cc +++ b/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/engine/ir/execute/bindings.cc @@ -18,7 +18,7 @@ #include "minddata/dataset/api/python/pybind_conversion.h" #include "minddata/dataset/api/python/pybind_register.h" #include "minddata/dataset/core/type_id.h" -#include "minddata/dataset/include/execute.h" +#include "minddata/dataset/include/dataset/execute.h" namespace mindspore { namespace dataset { diff --git a/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/engine/ir/schema/bindings.cc b/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/engine/ir/schema/bindings.cc index 4587900d012..77cbfda20bf 100644 --- a/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/engine/ir/schema/bindings.cc +++ b/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/engine/ir/schema/bindings.cc @@ -19,8 +19,8 @@ #include "minddata/dataset/api/python/pybind_register.h" #include "minddata/dataset/core/global_context.h" #include "minddata/dataset/core/type_id.h" -#include "minddata/dataset/include/constants.h" -#include "minddata/dataset/include/datasets.h" +#include "minddata/dataset/include/dataset/constants.h" +#include "minddata/dataset/include/dataset/datasets.h" namespace mindspore { namespace dataset { diff --git a/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/kernels/ir/bindings.cc b/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/kernels/ir/bindings.cc index aa315bc75cc..f9a5be8d370 100644 --- a/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/kernels/ir/bindings.cc +++ b/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/kernels/ir/bindings.cc @@ -15,7 +15,7 @@ */ #include "pybind11/pybind11.h" -#include "mindspore/ccsrc/minddata/dataset/include/transforms.h" +#include "mindspore/ccsrc/minddata/dataset/include/dataset/transforms.h" #include "minddata/dataset/api/python/pybind_register.h" #include "minddata/dataset/core/global_context.h" diff --git a/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/kernels/ir/image/bindings.cc b/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/kernels/ir/image/bindings.cc index 39828d703a6..fdfd4299a69 100644 --- a/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/kernels/ir/image/bindings.cc +++ b/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/kernels/ir/image/bindings.cc @@ -17,7 +17,7 @@ #include "minddata/dataset/api/python/pybind_conversion.h" #include "minddata/dataset/api/python/pybind_register.h" -#include "minddata/dataset/include/transforms.h" +#include "minddata/dataset/include/dataset/transforms.h" #include "minddata/dataset/kernels/ir/vision/vision_ir.h" namespace mindspore { diff --git a/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/text/bindings.cc b/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/text/bindings.cc index 90b8fd10410..e946e9e88fc 100644 --- a/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/text/bindings.cc +++ b/mindspore/ccsrc/minddata/dataset/api/python/bindings/dataset/text/bindings.cc @@ -20,7 +20,7 @@ #include "minddata/dataset/api/python/pybind_register.h" #include "minddata/dataset/text/vocab.h" #include "minddata/dataset/text/sentence_piece_vocab.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" namespace mindspore { namespace dataset { diff --git a/mindspore/ccsrc/minddata/dataset/api/python/pybind_conversion.h b/mindspore/ccsrc/minddata/dataset/api/python/pybind_conversion.h index 41ff949cddd..a6a33202dd2 100644 --- a/mindspore/ccsrc/minddata/dataset/api/python/pybind_conversion.h +++ b/mindspore/ccsrc/minddata/dataset/api/python/pybind_conversion.h @@ -32,8 +32,8 @@ #include "minddata/dataset/core/type_id.h" #include "minddata/dataset/engine/ir/cache/pre_built_dataset_cache.h" #include "minddata/dataset/engine/ir/datasetops/source/csv_node.h" -#include "minddata/dataset/include/datasets.h" -#include "minddata/dataset/include/samplers.h" +#include "minddata/dataset/include/dataset/datasets.h" +#include "minddata/dataset/include/dataset/samplers.h" #include "minddata/dataset/kernels/ir/data/transforms_ir.h" #include "minddata/dataset/kernels/py_func_op.h" namespace py = pybind11; diff --git a/mindspore/ccsrc/minddata/dataset/api/samplers.cc b/mindspore/ccsrc/minddata/dataset/api/samplers.cc index 66959690288..632a714d333 100644 --- a/mindspore/ccsrc/minddata/dataset/api/samplers.cc +++ b/mindspore/ccsrc/minddata/dataset/api/samplers.cc @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "minddata/dataset/include/samplers.h" +#include "minddata/dataset/include/dataset/samplers.h" #include "minddata/dataset/engine/ir/datasetops/source/samplers/samplers_ir.h" namespace mindspore { diff --git a/mindspore/ccsrc/minddata/dataset/api/text.cc b/mindspore/ccsrc/minddata/dataset/api/text.cc index 15cff07065b..52ec4b333f4 100644 --- a/mindspore/ccsrc/minddata/dataset/api/text.cc +++ b/mindspore/ccsrc/minddata/dataset/api/text.cc @@ -18,10 +18,10 @@ #include #include -#include "minddata/dataset/include/text.h" -#include "mindspore/core/ir/dtype/type_id.h" +#include "minddata/dataset/include/dataset/text.h" #include "minddata/dataset/core/type_id.h" #include "minddata/dataset/text/ir/kernels/text_ir.h" +#include "mindspore/core/ir/dtype/type_id.h" namespace mindspore { namespace dataset { diff --git a/mindspore/ccsrc/minddata/dataset/api/transforms.cc b/mindspore/ccsrc/minddata/dataset/api/transforms.cc index 2fc4dd7bef0..431a9549bcd 100644 --- a/mindspore/ccsrc/minddata/dataset/api/transforms.cc +++ b/mindspore/ccsrc/minddata/dataset/api/transforms.cc @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "minddata/dataset/include/transforms.h" +#include "minddata/dataset/include/dataset/transforms.h" #include diff --git a/mindspore/ccsrc/minddata/dataset/api/vision.cc b/mindspore/ccsrc/minddata/dataset/api/vision.cc index 6a54c435e7a..10db15bffbf 100644 --- a/mindspore/ccsrc/minddata/dataset/api/vision.cc +++ b/mindspore/ccsrc/minddata/dataset/api/vision.cc @@ -14,13 +14,13 @@ * limitations under the License. */ -#include "minddata/dataset/include/vision.h" +#include "minddata/dataset/include/dataset/vision.h" #ifdef ENABLE_ACL -#include "minddata/dataset/include/vision_ascend.h" +#include "minddata/dataset/include/dataset/vision_ascend.h" #include "minddata/dataset/kernels/ir/vision/ascend_vision_ir.h" #endif -#include "minddata/dataset/include/transforms.h" +#include "minddata/dataset/include/dataset/transforms.h" #include "minddata/dataset/kernels/ir/vision/vision_ir.h" #ifndef ENABLE_ANDROID diff --git a/mindspore/ccsrc/minddata/dataset/core/client.h b/mindspore/ccsrc/minddata/dataset/core/client.h index 7b88eb1b66d..b20a6162ec9 100644 --- a/mindspore/ccsrc/minddata/dataset/core/client.h +++ b/mindspore/ccsrc/minddata/dataset/core/client.h @@ -19,7 +19,7 @@ // client.h // Include file for DE client functions -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/core/data_type.h" #include "minddata/dataset/core/tensor.h" #include "minddata/dataset/core/tensor_shape.h" diff --git a/mindspore/ccsrc/minddata/dataset/core/config_manager.h b/mindspore/ccsrc/minddata/dataset/core/config_manager.h index 0fd354ecb64..e7c476d3ab8 100644 --- a/mindspore/ccsrc/minddata/dataset/core/config_manager.h +++ b/mindspore/ccsrc/minddata/dataset/core/config_manager.h @@ -23,7 +23,7 @@ #include -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/util/path.h" #include "minddata/dataset/util/status.h" diff --git a/mindspore/ccsrc/minddata/dataset/core/cv_tensor.cc b/mindspore/ccsrc/minddata/dataset/core/cv_tensor.cc index bd9ff742fc3..0f33d499155 100644 --- a/mindspore/ccsrc/minddata/dataset/core/cv_tensor.cc +++ b/mindspore/ccsrc/minddata/dataset/core/cv_tensor.cc @@ -18,7 +18,7 @@ #include #include -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/core/tensor.h" namespace mindspore { diff --git a/mindspore/ccsrc/minddata/dataset/core/cv_tensor.h b/mindspore/ccsrc/minddata/dataset/core/cv_tensor.h index 988a20a9ae1..1c10a7066f6 100644 --- a/mindspore/ccsrc/minddata/dataset/core/cv_tensor.h +++ b/mindspore/ccsrc/minddata/dataset/core/cv_tensor.h @@ -24,7 +24,7 @@ #include "./securec.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/core/data_type.h" #include "minddata/dataset/core/tensor.h" diff --git a/mindspore/ccsrc/minddata/dataset/core/data_type.h b/mindspore/ccsrc/minddata/dataset/core/data_type.h index c9d7c1c2b93..92df32b3b81 100644 --- a/mindspore/ccsrc/minddata/dataset/core/data_type.h +++ b/mindspore/ccsrc/minddata/dataset/core/data_type.h @@ -29,7 +29,7 @@ namespace py = pybind11; #else #include "base/float16.h" #endif -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" namespace mindspore { namespace dataset { diff --git a/mindspore/ccsrc/minddata/dataset/core/de_tensor.cc b/mindspore/ccsrc/minddata/dataset/core/de_tensor.cc index d176b6fbe0e..ee5768917f7 100644 --- a/mindspore/ccsrc/minddata/dataset/core/de_tensor.cc +++ b/mindspore/ccsrc/minddata/dataset/core/de_tensor.cc @@ -16,7 +16,7 @@ #include "minddata/dataset/core/de_tensor.h" #include "minddata/dataset/core/device_tensor.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/core/type_id.h" #ifndef ENABLE_ANDROID #include "utils/log_adapter.h" diff --git a/mindspore/ccsrc/minddata/dataset/core/device_tensor.h b/mindspore/ccsrc/minddata/dataset/core/device_tensor.h index 1880e532859..bff26ead8a1 100644 --- a/mindspore/ccsrc/minddata/dataset/core/device_tensor.h +++ b/mindspore/ccsrc/minddata/dataset/core/device_tensor.h @@ -20,7 +20,7 @@ #include #include #include "include/api/status.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/core/data_type.h" #include "minddata/dataset/core/tensor.h" #include "minddata/dataset/util/status.h" diff --git a/mindspore/ccsrc/minddata/dataset/core/global_context.h b/mindspore/ccsrc/minddata/dataset/core/global_context.h index 793a5577d47..d7f3b4130eb 100644 --- a/mindspore/ccsrc/minddata/dataset/core/global_context.h +++ b/mindspore/ccsrc/minddata/dataset/core/global_context.h @@ -21,7 +21,7 @@ #include "include/api/status.h" #include "minddata/dataset/core/config_manager.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/util/allocator.h" namespace mindspore { diff --git a/mindspore/ccsrc/minddata/dataset/core/tensor.cc b/mindspore/ccsrc/minddata/dataset/core/tensor.cc index f6030fedf4c..fa3f4535a8e 100644 --- a/mindspore/ccsrc/minddata/dataset/core/tensor.cc +++ b/mindspore/ccsrc/minddata/dataset/core/tensor.cc @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -26,7 +27,7 @@ #include "minddata/dataset/core/type_id.h" #include "utils/ms_utils.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #ifndef ENABLE_ANDROID #include "minddata/dataset/core/cv_tensor.h" diff --git a/mindspore/ccsrc/minddata/dataset/core/tensor.h b/mindspore/ccsrc/minddata/dataset/core/tensor.h index b294afc1306..c9a3aa12509 100644 --- a/mindspore/ccsrc/minddata/dataset/core/tensor.h +++ b/mindspore/ccsrc/minddata/dataset/core/tensor.h @@ -37,7 +37,7 @@ #include "pybind11/stl.h" #endif -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/core/data_type.h" #include "minddata/dataset/core/tensor_helpers.h" #include "minddata/dataset/core/tensor_shape.h" diff --git a/mindspore/ccsrc/minddata/dataset/core/tensor_helpers.h b/mindspore/ccsrc/minddata/dataset/core/tensor_helpers.h index 18733caeb5c..7713414b579 100644 --- a/mindspore/ccsrc/minddata/dataset/core/tensor_helpers.h +++ b/mindspore/ccsrc/minddata/dataset/core/tensor_helpers.h @@ -19,8 +19,8 @@ #include #include -#include "mindspore/ccsrc/minddata/dataset/include/transforms.h" -#include "minddata/dataset/include/constants.h" +#include "mindspore/ccsrc/minddata/dataset/include/dataset/transforms.h" +#include "minddata/dataset/include/dataset/constants.h" namespace mindspore { namespace dataset { diff --git a/mindspore/ccsrc/minddata/dataset/core/tensor_shape.cc b/mindspore/ccsrc/minddata/dataset/core/tensor_shape.cc index 3286b196719..30fdd7dedff 100644 --- a/mindspore/ccsrc/minddata/dataset/core/tensor_shape.cc +++ b/mindspore/ccsrc/minddata/dataset/core/tensor_shape.cc @@ -25,7 +25,7 @@ #else #include "mindspore/lite/src/common/log_adapter.h" #endif -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" namespace mindspore { namespace dataset { diff --git a/mindspore/ccsrc/minddata/dataset/core/tensor_shape.h b/mindspore/ccsrc/minddata/dataset/core/tensor_shape.h index fda138e53a6..38c63c24add 100644 --- a/mindspore/ccsrc/minddata/dataset/core/tensor_shape.h +++ b/mindspore/ccsrc/minddata/dataset/core/tensor_shape.h @@ -31,7 +31,7 @@ namespace py = pybind11; #endif -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/util/status.h" #include "minddata/dataset/core/global_context.h" #include "minddata/dataset/util/allocator.h" diff --git a/mindspore/ccsrc/minddata/dataset/engine/cache/cache_admin_arg.cc b/mindspore/ccsrc/minddata/dataset/engine/cache/cache_admin_arg.cc index abe46bf9667..593ac5da7f5 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/cache/cache_admin_arg.cc +++ b/mindspore/ccsrc/minddata/dataset/engine/cache/cache_admin_arg.cc @@ -29,7 +29,7 @@ #include "minddata/dataset/engine/cache/cache_server.h" #include "minddata/dataset/engine/cache/cache_ipc.h" #include "minddata/dataset/util/path.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" namespace mindspore { namespace dataset { diff --git a/mindspore/ccsrc/minddata/dataset/engine/cache/cache_request.cc b/mindspore/ccsrc/minddata/dataset/engine/cache/cache_request.cc index 590609844e6..70f7983f48c 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/cache/cache_request.cc +++ b/mindspore/ccsrc/minddata/dataset/engine/cache/cache_request.cc @@ -22,7 +22,7 @@ #include #include #include -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/engine/cache/cache_client.h" #include "minddata/dataset/engine/cache/cache_fbb.h" namespace mindspore { diff --git a/mindspore/ccsrc/minddata/dataset/engine/cache/cache_server.cc b/mindspore/ccsrc/minddata/dataset/engine/cache/cache_server.cc index 4f007921001..5a98314f9ab 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/cache/cache_server.cc +++ b/mindspore/ccsrc/minddata/dataset/engine/cache/cache_server.cc @@ -18,7 +18,7 @@ #include #include #include -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/engine/cache/cache_ipc.h" #include "minddata/dataset/engine/cache/cache_service.h" #include "minddata/dataset/engine/cache/cache_request.h" diff --git a/mindspore/ccsrc/minddata/dataset/engine/data_schema.h b/mindspore/ccsrc/minddata/dataset/engine/data_schema.h index 8167bfc3506..d9f556c22ac 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/data_schema.h +++ b/mindspore/ccsrc/minddata/dataset/engine/data_schema.h @@ -23,7 +23,7 @@ #include #include #include -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/core/data_type.h" #include "minddata/dataset/core/tensor_shape.h" #include "minddata/dataset/util/status.h" diff --git a/mindspore/ccsrc/minddata/dataset/engine/datasetops/barrier_op.cc b/mindspore/ccsrc/minddata/dataset/engine/datasetops/barrier_op.cc index 3e161ace444..2f9bb7c1887 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/datasetops/barrier_op.cc +++ b/mindspore/ccsrc/minddata/dataset/engine/datasetops/barrier_op.cc @@ -16,7 +16,7 @@ #include "minddata/dataset/engine/datasetops/barrier_op.h" #include #include -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/engine/db_connector.h" #include "minddata/dataset/core/config_manager.h" diff --git a/mindspore/ccsrc/minddata/dataset/engine/datasetops/cache_lookup_op.cc b/mindspore/ccsrc/minddata/dataset/engine/datasetops/cache_lookup_op.cc index 35745545120..9f192410624 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/datasetops/cache_lookup_op.cc +++ b/mindspore/ccsrc/minddata/dataset/engine/datasetops/cache_lookup_op.cc @@ -15,7 +15,7 @@ */ #include "minddata/dataset/engine/datasetops/cache_lookup_op.h" #include "minddata/dataset/core/config_manager.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/core/global_context.h" #include "minddata/dataset/engine/execution_tree.h" #ifndef ENABLE_ANDROID diff --git a/mindspore/ccsrc/minddata/dataset/engine/datasetops/cache_merge_op.cc b/mindspore/ccsrc/minddata/dataset/engine/datasetops/cache_merge_op.cc index 47a17cabcbe..30898ea27f5 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/datasetops/cache_merge_op.cc +++ b/mindspore/ccsrc/minddata/dataset/engine/datasetops/cache_merge_op.cc @@ -20,7 +20,7 @@ #include #include #include "minddata/dataset/core/config_manager.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/core/global_context.h" #include "minddata/dataset/engine/execution_tree.h" #include "minddata/dataset/util/system_pool.h" diff --git a/mindspore/ccsrc/minddata/dataset/engine/datasetops/cache_op.cc b/mindspore/ccsrc/minddata/dataset/engine/datasetops/cache_op.cc index f51cbf247ab..76ede843ddc 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/datasetops/cache_op.cc +++ b/mindspore/ccsrc/minddata/dataset/engine/datasetops/cache_op.cc @@ -18,7 +18,7 @@ #include #include #include "minddata/dataset/core/config_manager.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/core/global_context.h" #include "minddata/dataset/engine/datasetops/repeat_op.h" #include "minddata/dataset/engine/dataset_iterator.h" diff --git a/mindspore/ccsrc/minddata/dataset/engine/datasetops/dataset_op.h b/mindspore/ccsrc/minddata/dataset/engine/datasetops/dataset_op.h index 40ac7a1f418..d007252115b 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/datasetops/dataset_op.h +++ b/mindspore/ccsrc/minddata/dataset/engine/datasetops/dataset_op.h @@ -24,7 +24,7 @@ #include #include "minddata/dataset/callback/callback_manager.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/engine/db_connector.h" #include "minddata/dataset/util/status.h" diff --git a/mindspore/ccsrc/minddata/dataset/engine/datasetops/map_op/map_op.cc b/mindspore/ccsrc/minddata/dataset/engine/datasetops/map_op/map_op.cc index 89b73ab4c22..9c5c23a9481 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/datasetops/map_op/map_op.cc +++ b/mindspore/ccsrc/minddata/dataset/engine/datasetops/map_op/map_op.cc @@ -21,7 +21,7 @@ #include "minddata/dataset/callback/callback_param.h" #include "minddata/dataset/core/config_manager.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/core/global_context.h" #include "minddata/dataset/engine/datasetops/map_op/cpu_map_job.h" diff --git a/mindspore/ccsrc/minddata/dataset/engine/datasetops/parallel_op.h b/mindspore/ccsrc/minddata/dataset/engine/datasetops/parallel_op.h index 3791e80b4c0..7632bf19254 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/datasetops/parallel_op.h +++ b/mindspore/ccsrc/minddata/dataset/engine/datasetops/parallel_op.h @@ -19,7 +19,7 @@ #include #include #include -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/engine/datasetops/dataset_op.h" #include "minddata/dataset/engine/datasetops/source/io_block.h" #include "minddata/dataset/util/status.h" diff --git a/mindspore/ccsrc/minddata/dataset/engine/datasetops/source/mindrecord_op.cc b/mindspore/ccsrc/minddata/dataset/engine/datasetops/source/mindrecord_op.cc index 1bbfbea8be9..1250d83506b 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/datasetops/source/mindrecord_op.cc +++ b/mindspore/ccsrc/minddata/dataset/engine/datasetops/source/mindrecord_op.cc @@ -22,7 +22,7 @@ #include "utils/ms_utils.h" #include "minddata/dataset/core/config_manager.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/core/global_context.h" #include "minddata/dataset/engine/datasetops/source/sampler/mind_record_sampler.h" diff --git a/mindspore/ccsrc/minddata/dataset/engine/datasetops/zip_op.cc b/mindspore/ccsrc/minddata/dataset/engine/datasetops/zip_op.cc index d089f79294a..a63ebefe424 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/datasetops/zip_op.cc +++ b/mindspore/ccsrc/minddata/dataset/engine/datasetops/zip_op.cc @@ -17,7 +17,7 @@ #include #include #include -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/engine/db_connector.h" #include "minddata/dataset/core/config_manager.h" diff --git a/mindspore/ccsrc/minddata/dataset/engine/db_connector.h b/mindspore/ccsrc/minddata/dataset/engine/db_connector.h index 603c17f34f4..22d4b484071 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/db_connector.h +++ b/mindspore/ccsrc/minddata/dataset/engine/db_connector.h @@ -21,7 +21,7 @@ #include "minddata/dataset/core/tensor_row.h" #include "minddata/dataset/engine/connector.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" namespace mindspore { namespace dataset { diff --git a/mindspore/ccsrc/minddata/dataset/engine/gpu_item_connector.h b/mindspore/ccsrc/minddata/dataset/engine/gpu_item_connector.h index 97f740c3823..680fdc27561 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/gpu_item_connector.h +++ b/mindspore/ccsrc/minddata/dataset/engine/gpu_item_connector.h @@ -23,7 +23,7 @@ #include #include "minddata/dataset/engine/connector.h" #include "minddata/dataset/util/status.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "runtime/device/gpu/blocking_queue.h" using mindspore::device::DataItemGpu; diff --git a/mindspore/ccsrc/minddata/dataset/engine/ir/datasetops/build_sentence_piece_vocab_node.h b/mindspore/ccsrc/minddata/dataset/engine/ir/datasetops/build_sentence_piece_vocab_node.h index 4d668d08db3..55fcd5a5f57 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/ir/datasetops/build_sentence_piece_vocab_node.h +++ b/mindspore/ccsrc/minddata/dataset/engine/ir/datasetops/build_sentence_piece_vocab_node.h @@ -24,7 +24,7 @@ #include #include "minddata/dataset/engine/ir/datasetops/dataset_node.h" -#include "minddata/dataset/include/datasets.h" +#include "minddata/dataset/include/dataset/datasets.h" namespace mindspore { namespace dataset { diff --git a/mindspore/ccsrc/minddata/dataset/engine/ir/datasetops/dataset_node.h b/mindspore/ccsrc/minddata/dataset/engine/ir/datasetops/dataset_node.h index 43c81afa6c0..f93bd821e36 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/ir/datasetops/dataset_node.h +++ b/mindspore/ccsrc/minddata/dataset/engine/ir/datasetops/dataset_node.h @@ -37,7 +37,7 @@ #include "minddata/dataset/engine/datasetops/take_op.h" #include "minddata/dataset/engine/ir/cache/dataset_cache.h" #include "minddata/dataset/engine/ir/datasetops/source/samplers/samplers_ir.h" -#include "minddata/dataset/include/datasets.h" +#include "minddata/dataset/include/dataset/datasets.h" #include "minddata/dataset/util/path.h" #include "minddata/dataset/util/status.h" diff --git a/mindspore/ccsrc/minddata/dataset/engine/ir/datasetops/source/random_node.h b/mindspore/ccsrc/minddata/dataset/engine/ir/datasetops/source/random_node.h index 6728bdae2c6..0758fd2bd91 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/ir/datasetops/source/random_node.h +++ b/mindspore/ccsrc/minddata/dataset/engine/ir/datasetops/source/random_node.h @@ -24,7 +24,7 @@ #include "minddata/dataset/engine/datasetops/source/sampler/sampler.h" #include "minddata/dataset/engine/ir/datasetops/dataset_node.h" -#include "minddata/dataset/include/samplers.h" +#include "minddata/dataset/include/dataset/samplers.h" namespace mindspore { namespace dataset { diff --git a/mindspore/ccsrc/minddata/dataset/engine/jagged_connector.h b/mindspore/ccsrc/minddata/dataset/engine/jagged_connector.h index 1780bf48f56..dea086fe744 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/jagged_connector.h +++ b/mindspore/ccsrc/minddata/dataset/engine/jagged_connector.h @@ -23,7 +23,7 @@ #include "minddata/dataset/engine/connector.h" #include "minddata/dataset/util/status.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" namespace mindspore { namespace dataset { diff --git a/mindspore/ccsrc/minddata/dataset/engine/opt/pre/deep_copy_pass.cc b/mindspore/ccsrc/minddata/dataset/engine/opt/pre/deep_copy_pass.cc index 459bb1d5fe7..fd961d02184 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/opt/pre/deep_copy_pass.cc +++ b/mindspore/ccsrc/minddata/dataset/engine/opt/pre/deep_copy_pass.cc @@ -15,7 +15,7 @@ */ #include -#include "minddata/dataset/include/datasets.h" +#include "minddata/dataset/include/dataset/datasets.h" #include "minddata/dataset/engine/opt/pre/deep_copy_pass.h" #include "minddata/dataset/engine/ir/datasetops/root_node.h" diff --git a/mindspore/ccsrc/minddata/dataset/engine/opt/pre/input_validation_pass.cc b/mindspore/ccsrc/minddata/dataset/engine/opt/pre/input_validation_pass.cc index 3da5b150763..00599f0a4c6 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/opt/pre/input_validation_pass.cc +++ b/mindspore/ccsrc/minddata/dataset/engine/opt/pre/input_validation_pass.cc @@ -15,7 +15,7 @@ */ #include -#include "minddata/dataset/include/datasets.h" +#include "minddata/dataset/include/dataset/datasets.h" #include "minddata/dataset/engine/opt/pre/input_validation_pass.h" namespace mindspore { diff --git a/mindspore/ccsrc/minddata/dataset/engine/perf/cyclic_array.h b/mindspore/ccsrc/minddata/dataset/engine/perf/cyclic_array.h index 15ca8a51181..2d761c052fb 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/perf/cyclic_array.h +++ b/mindspore/ccsrc/minddata/dataset/engine/perf/cyclic_array.h @@ -21,7 +21,7 @@ #include #include #include -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" namespace mindspore { namespace dataset { diff --git a/mindspore/ccsrc/minddata/dataset/engine/perf/perf_data.h b/mindspore/ccsrc/minddata/dataset/engine/perf/perf_data.h index 4a82ca220fa..538b84f3468 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/perf/perf_data.h +++ b/mindspore/ccsrc/minddata/dataset/engine/perf/perf_data.h @@ -18,7 +18,7 @@ #define MINDSPORE_CCSRC_MINDDATA_DATASET_PERF_DATA_H #include -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" namespace mindspore { namespace dataset { diff --git a/mindspore/ccsrc/minddata/dataset/include/config.h b/mindspore/ccsrc/minddata/dataset/include/dataset/config.h similarity index 94% rename from mindspore/ccsrc/minddata/dataset/include/config.h rename to mindspore/ccsrc/minddata/dataset/include/dataset/config.h index 7c0c35ad993..52b05d3f2da 100644 --- a/mindspore/ccsrc/minddata/dataset/include/config.h +++ b/mindspore/ccsrc/minddata/dataset/include/dataset/config.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_CONFIG_H -#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_CONFIG_H +#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_CONFIG_H +#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_CONFIG_H #include #include @@ -83,4 +83,4 @@ inline bool load(std::string file) { return load(StringToChar(file)); } } // namespace dataset } // namespace mindspore -#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_CONFIG_H +#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_CONFIG_H diff --git a/mindspore/ccsrc/minddata/dataset/include/constants.h b/mindspore/ccsrc/minddata/dataset/include/dataset/constants.h similarity index 95% rename from mindspore/ccsrc/minddata/dataset/include/constants.h rename to mindspore/ccsrc/minddata/dataset/include/dataset/constants.h index a2887610811..381a1c63903 100644 --- a/mindspore/ccsrc/minddata/dataset/include/constants.h +++ b/mindspore/ccsrc/minddata/dataset/include/dataset/constants.h @@ -13,8 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_CONSTANTS_H_ -#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_CONSTANTS_H_ +#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_CONSTANTS_H_ +#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_CONSTANTS_H_ #include #include @@ -119,4 +119,4 @@ using row_id_type = int64_t; } // namespace dataset } // namespace mindspore -#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_CONSTANTS_H_ +#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_CONSTANTS_H_ diff --git a/mindspore/ccsrc/minddata/dataset/include/data_helper.h b/mindspore/ccsrc/minddata/dataset/include/dataset/data_helper.h similarity index 99% rename from mindspore/ccsrc/minddata/dataset/include/data_helper.h rename to mindspore/ccsrc/minddata/dataset/include/dataset/data_helper.h index cecce91dc0c..0643fb17ebe 100644 --- a/mindspore/ccsrc/minddata/dataset/include/data_helper.h +++ b/mindspore/ccsrc/minddata/dataset/include/dataset/data_helper.h @@ -13,8 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATA_HELPER_H_ -#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATA_HELPER_H_ +#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_DATA_HELPER_H_ +#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_DATA_HELPER_H_ #include #include @@ -445,4 +445,4 @@ class DataHelper { } // namespace dataset } // namespace mindspore -#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATA_HELPER_H_ +#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_DATA_HELPER_H_ diff --git a/mindspore/ccsrc/minddata/dataset/include/datasets.h b/mindspore/ccsrc/minddata/dataset/include/dataset/datasets.h similarity index 99% rename from mindspore/ccsrc/minddata/dataset/include/datasets.h rename to mindspore/ccsrc/minddata/dataset/include/dataset/datasets.h index 9c6ae2455e3..e0cf036a9e6 100644 --- a/mindspore/ccsrc/minddata/dataset/include/datasets.h +++ b/mindspore/ccsrc/minddata/dataset/include/dataset/datasets.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASETS_H_ -#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASETS_H_ +#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_DATASETS_H_ +#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_DATASETS_H_ #include #include @@ -33,10 +33,10 @@ #include "include/api/dual_abi_helper.h" #include "include/api/types.h" -#include "minddata/dataset/include/iterator.h" -#include "minddata/dataset/include/json_fwd.hpp" -#include "minddata/dataset/include/samplers.h" -#include "minddata/dataset/include/text.h" +#include "include/dataset/iterator.h" +#include "include/dataset/json_fwd.hpp" +#include "include/dataset/samplers.h" +#include "include/dataset/text.h" namespace mindspore { namespace dataset { @@ -1675,4 +1675,4 @@ inline std::shared_ptr Zip(const std::vector #include @@ -23,8 +23,8 @@ #include #include "include/api/context.h" #include "include/api/types.h" -#include "minddata/dataset/include/constants.h" -#include "minddata/dataset/include/transforms.h" +#include "include/dataset/constants.h" +#include "include/dataset/transforms.h" namespace mindspore { namespace dataset { @@ -89,4 +89,4 @@ class Execute { } // namespace dataset } // namespace mindspore -#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_EXECUTE_H_ +#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_EXECUTE_H_ diff --git a/mindspore/ccsrc/minddata/dataset/include/iterator.h b/mindspore/ccsrc/minddata/dataset/include/dataset/iterator.h similarity index 95% rename from mindspore/ccsrc/minddata/dataset/include/iterator.h rename to mindspore/ccsrc/minddata/dataset/include/dataset/iterator.h index 60df46d134b..300a347245d 100644 --- a/mindspore/ccsrc/minddata/dataset/include/iterator.h +++ b/mindspore/ccsrc/minddata/dataset/include/dataset/iterator.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_ITERATOR_H_ -#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_ITERATOR_H_ +#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_ITERATOR_H_ +#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_ITERATOR_H_ #include #include @@ -150,4 +150,4 @@ class PullIterator : public Iterator { }; } // namespace dataset } // namespace mindspore -#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_ITERATOR_H_ +#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_ITERATOR_H_ diff --git a/mindspore/ccsrc/minddata/dataset/include/json_fwd.hpp b/mindspore/ccsrc/minddata/dataset/include/dataset/json_fwd.hpp similarity index 100% rename from mindspore/ccsrc/minddata/dataset/include/json_fwd.hpp rename to mindspore/ccsrc/minddata/dataset/include/dataset/json_fwd.hpp diff --git a/mindspore/ccsrc/minddata/dataset/include/samplers.h b/mindspore/ccsrc/minddata/dataset/include/dataset/samplers.h similarity index 97% rename from mindspore/ccsrc/minddata/dataset/include/samplers.h rename to mindspore/ccsrc/minddata/dataset/include/dataset/samplers.h index 8fe6d99a7f3..d507ba299cc 100644 --- a/mindspore/ccsrc/minddata/dataset/include/samplers.h +++ b/mindspore/ccsrc/minddata/dataset/include/dataset/samplers.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_SAMPLERS_H_ -#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_SAMPLERS_H_ +#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_SAMPLERS_H_ +#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_SAMPLERS_H_ #include #include @@ -248,4 +248,4 @@ class WeightedRandomSampler final : public Sampler { } // namespace dataset } // namespace mindspore -#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_SAMPLERS_H_ +#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_SAMPLERS_H_ diff --git a/mindspore/ccsrc/minddata/dataset/include/text.h b/mindspore/ccsrc/minddata/dataset/include/dataset/text.h similarity index 98% rename from mindspore/ccsrc/minddata/dataset/include/text.h rename to mindspore/ccsrc/minddata/dataset/include/dataset/text.h index 6b8438d252b..78ba4633f0d 100644 --- a/mindspore/ccsrc/minddata/dataset/include/text.h +++ b/mindspore/ccsrc/minddata/dataset/include/dataset/text.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_TEXT_H_ -#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_TEXT_H_ +#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_TEXT_H_ +#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_TEXT_H_ #include #include @@ -25,8 +25,8 @@ #include "include/api/dual_abi_helper.h" #include "include/api/status.h" -#include "minddata/dataset/include/constants.h" -#include "minddata/dataset/include/transforms.h" +#include "include/dataset/constants.h" +#include "include/dataset/transforms.h" namespace mindspore { namespace dataset { @@ -539,4 +539,4 @@ class WhitespaceTokenizer final : public TensorTransform { } // namespace text } // namespace dataset } // namespace mindspore -#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_TEXT_H_ +#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_TEXT_H_ diff --git a/mindspore/ccsrc/minddata/dataset/include/transforms.h b/mindspore/ccsrc/minddata/dataset/include/dataset/transforms.h similarity index 98% rename from mindspore/ccsrc/minddata/dataset/include/transforms.h rename to mindspore/ccsrc/minddata/dataset/include/dataset/transforms.h index 6558b91029e..14791e8f2a5 100644 --- a/mindspore/ccsrc/minddata/dataset/include/transforms.h +++ b/mindspore/ccsrc/minddata/dataset/include/dataset/transforms.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_TRANSFORMS_H_ -#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_TRANSFORMS_H_ +#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_TRANSFORMS_H_ +#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_TRANSFORMS_H_ #include #include @@ -25,7 +25,7 @@ #include "include/api/dual_abi_helper.h" #include "include/api/status.h" #include "include/api/types.h" -#include "minddata/dataset/include/constants.h" +#include "include/dataset/constants.h" namespace mindspore { namespace dataset { @@ -410,4 +410,4 @@ class Unique final : public TensorTransform { } // namespace transforms } // namespace dataset } // namespace mindspore -#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_TRANSFORMS_H_ +#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_TRANSFORMS_H_ diff --git a/mindspore/ccsrc/minddata/dataset/include/vision.h b/mindspore/ccsrc/minddata/dataset/include/dataset/vision.h similarity index 99% rename from mindspore/ccsrc/minddata/dataset/include/vision.h rename to mindspore/ccsrc/minddata/dataset/include/dataset/vision.h index d3050b32453..4aa0f210703 100644 --- a/mindspore/ccsrc/minddata/dataset/include/vision.h +++ b/mindspore/ccsrc/minddata/dataset/include/dataset/vision.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_VISION_H_ -#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_VISION_H_ +#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_VISION_H_ +#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_VISION_H_ #include #include @@ -25,9 +25,9 @@ #include "include/api/dual_abi_helper.h" #include "include/api/status.h" -#include "minddata/dataset/include/constants.h" -#include "minddata/dataset/include/transforms.h" -#include "minddata/dataset/include/vision_lite.h" +#include "include/dataset/constants.h" +#include "include/dataset/transforms.h" +#include "include/dataset/vision_lite.h" namespace mindspore { namespace dataset { @@ -952,4 +952,4 @@ class UniformAugment final : public TensorTransform { } // namespace vision } // namespace dataset } // namespace mindspore -#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_VISION_H_ +#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_VISION_H_ diff --git a/mindspore/ccsrc/minddata/dataset/include/vision_ascend.h b/mindspore/ccsrc/minddata/dataset/include/dataset/vision_ascend.h similarity index 90% rename from mindspore/ccsrc/minddata/dataset/include/vision_ascend.h rename to mindspore/ccsrc/minddata/dataset/include/dataset/vision_ascend.h index 4ae08feab95..bbfe8779964 100644 --- a/mindspore/ccsrc/minddata/dataset/include/vision_ascend.h +++ b/mindspore/ccsrc/minddata/dataset/include/dataset/vision_ascend.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_VISION_ASCEND_H_ -#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_VISION_ASCEND_H_ +#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_VISION_ASCEND_H_ +#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_VISION_ASCEND_H_ #include #include @@ -23,8 +23,8 @@ #include #include #include "include/api/status.h" -#include "minddata/dataset/include/constants.h" -#include "minddata/dataset/include/transforms.h" +#include "include/dataset/constants.h" +#include "include/dataset/transforms.h" namespace mindspore { namespace dataset { @@ -97,4 +97,4 @@ class DvppDecodePng final : public TensorTransform { } // namespace dataset } // namespace mindspore -#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_VISION_ASCEND_H_ +#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_VISION_ASCEND_H_ diff --git a/mindspore/ccsrc/minddata/dataset/include/vision_lite.h b/mindspore/ccsrc/minddata/dataset/include/dataset/vision_lite.h similarity index 97% rename from mindspore/ccsrc/minddata/dataset/include/vision_lite.h rename to mindspore/ccsrc/minddata/dataset/include/dataset/vision_lite.h index cf95b6ea200..5abc3d35d28 100644 --- a/mindspore/ccsrc/minddata/dataset/include/vision_lite.h +++ b/mindspore/ccsrc/minddata/dataset/include/dataset/vision_lite.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_VISION_LITE_H_ -#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_VISION_LITE_H_ +#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_VISION_LITE_H_ +#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_VISION_LITE_H_ #include #include @@ -23,8 +23,8 @@ #include #include #include "include/api/status.h" -#include "minddata/dataset/include/constants.h" -#include "minddata/dataset/include/transforms.h" +#include "include/dataset/constants.h" +#include "include/dataset/transforms.h" namespace mindspore { namespace dataset { @@ -289,4 +289,4 @@ class Rotate final : public TensorTransform { } // namespace vision } // namespace dataset } // namespace mindspore -#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_VISION_LITE_H_ +#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_VISION_LITE_H_ diff --git a/mindspore/ccsrc/minddata/dataset/kernels/data/data_utils.cc b/mindspore/ccsrc/minddata/dataset/kernels/data/data_utils.cc index 21c2c2f898b..33427792d82 100644 --- a/mindspore/ccsrc/minddata/dataset/kernels/data/data_utils.cc +++ b/mindspore/ccsrc/minddata/dataset/kernels/data/data_utils.cc @@ -22,7 +22,7 @@ #include #include -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/core/data_type.h" #ifdef ENABLE_PYTHON #include "minddata/dataset/core/pybind_support.h" diff --git a/mindspore/ccsrc/minddata/dataset/kernels/data/data_utils.h b/mindspore/ccsrc/minddata/dataset/kernels/data/data_utils.h index 88b08112198..ffad45c5c9f 100644 --- a/mindspore/ccsrc/minddata/dataset/kernels/data/data_utils.h +++ b/mindspore/ccsrc/minddata/dataset/kernels/data/data_utils.h @@ -20,7 +20,7 @@ #include #include #include -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #ifndef ENABLE_ANDROID #include "minddata/dataset/core/cv_tensor.h" #endif diff --git a/mindspore/ccsrc/minddata/dataset/kernels/image/dvpp/utils/MDAclProcess.cc b/mindspore/ccsrc/minddata/dataset/kernels/image/dvpp/utils/MDAclProcess.cc index af17f6cfe5c..31ba5ce6fc5 100644 --- a/mindspore/ccsrc/minddata/dataset/kernels/image/dvpp/utils/MDAclProcess.cc +++ b/mindspore/ccsrc/minddata/dataset/kernels/image/dvpp/utils/MDAclProcess.cc @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/core/tensor_shape.h" #include "minddata/dataset/kernels/image/image_utils.h" #include "MDAclProcess.h" diff --git a/mindspore/ccsrc/minddata/dataset/kernels/image/image_utils.cc b/mindspore/ccsrc/minddata/dataset/kernels/image/image_utils.cc index fcd124a68be..92ee12ad4cf 100644 --- a/mindspore/ccsrc/minddata/dataset/kernels/image/image_utils.cc +++ b/mindspore/ccsrc/minddata/dataset/kernels/image/image_utils.cc @@ -24,7 +24,7 @@ #include "minddata/dataset/core/cv_tensor.h" #include "minddata/dataset/core/tensor.h" #include "minddata/dataset/core/tensor_shape.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/kernels/image/math_utils.h" #include "minddata/dataset/kernels/image/resize_cubic_op.h" diff --git a/mindspore/ccsrc/minddata/dataset/kernels/image/lite_image_utils.cc b/mindspore/ccsrc/minddata/dataset/kernels/image/lite_image_utils.cc index a3450d99fd9..2ebf8b4573b 100644 --- a/mindspore/ccsrc/minddata/dataset/kernels/image/lite_image_utils.cc +++ b/mindspore/ccsrc/minddata/dataset/kernels/image/lite_image_utils.cc @@ -19,7 +19,7 @@ #include #include "minddata/dataset/kernels/image/lite_cv/lite_mat.h" #include "minddata/dataset/kernels/image/lite_cv/image_process.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/core/tensor.h" #include "minddata/dataset/core/tensor_shape.h" #include "minddata/dataset/util/random.h" diff --git a/mindspore/ccsrc/minddata/dataset/kernels/image/pad_op.cc b/mindspore/ccsrc/minddata/dataset/kernels/image/pad_op.cc index 84ce3a5360e..e95eb779fbf 100644 --- a/mindspore/ccsrc/minddata/dataset/kernels/image/pad_op.cc +++ b/mindspore/ccsrc/minddata/dataset/kernels/image/pad_op.cc @@ -16,7 +16,7 @@ #include "minddata/dataset/kernels/image/pad_op.h" #include "minddata/dataset/kernels/image/image_utils.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/util/status.h" namespace mindspore { diff --git a/mindspore/ccsrc/minddata/dataset/kernels/image/pad_op.h b/mindspore/ccsrc/minddata/dataset/kernels/image/pad_op.h index 3b84e04d7a3..c6d34763213 100644 --- a/mindspore/ccsrc/minddata/dataset/kernels/image/pad_op.h +++ b/mindspore/ccsrc/minddata/dataset/kernels/image/pad_op.h @@ -22,7 +22,7 @@ #include "minddata/dataset/core/tensor.h" #include "minddata/dataset/kernels/tensor_op.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/util/status.h" namespace mindspore { diff --git a/mindspore/ccsrc/minddata/dataset/kernels/ir/vision/ascend_vision_ir.h b/mindspore/ccsrc/minddata/dataset/kernels/ir/vision/ascend_vision_ir.h index 31488908452..11c3fc7819f 100644 --- a/mindspore/ccsrc/minddata/dataset/kernels/ir/vision/ascend_vision_ir.h +++ b/mindspore/ccsrc/minddata/dataset/kernels/ir/vision/ascend_vision_ir.h @@ -24,8 +24,8 @@ #include #include "include/api/status.h" -#include "minddata/dataset/include/constants.h" -#include "minddata/dataset/include/transforms.h" +#include "minddata/dataset/include/dataset/constants.h" +#include "minddata/dataset/include/dataset/transforms.h" #include "minddata/dataset/kernels/ir/tensor_operation.h" namespace mindspore { diff --git a/mindspore/ccsrc/minddata/dataset/kernels/ir/vision/vision_ir.h b/mindspore/ccsrc/minddata/dataset/kernels/ir/vision/vision_ir.h index 80bfd1fde52..c6db4bdfc00 100644 --- a/mindspore/ccsrc/minddata/dataset/kernels/ir/vision/vision_ir.h +++ b/mindspore/ccsrc/minddata/dataset/kernels/ir/vision/vision_ir.h @@ -24,8 +24,8 @@ #include #include "include/api/status.h" -#include "minddata/dataset/include/constants.h" -#include "minddata/dataset/include/transforms.h" +#include "minddata/dataset/include/dataset/constants.h" +#include "minddata/dataset/include/dataset/transforms.h" #include "minddata/dataset/kernels/ir/tensor_operation.h" namespace mindspore { diff --git a/mindspore/ccsrc/minddata/dataset/liteapi/include/constants.h b/mindspore/ccsrc/minddata/dataset/liteapi/include/constants.h deleted file mode 100644 index d2dfedac6e0..00000000000 --- a/mindspore/ccsrc/minddata/dataset/liteapi/include/constants.h +++ /dev/null @@ -1,112 +0,0 @@ -/** - * Copyright 2019-2021 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_INCLUDE_CONSTANTS_H_ -#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_CONSTANTS_H_ - -#include -#include -#include - -namespace mindspore { -namespace dataset { -// Various type defines for convenience -using uchar = unsigned char; -using dsize_t = int64_t; - -// Target devices to perform map operation -enum class MapTargetDevice { kCpu, kGpu, kAscend310 }; - -// Possible dataset types for holding the data and client type -enum class DatasetType { kUnknown, kArrow, kTf }; - -// Possible flavours of Tensor implementations -enum class TensorImpl { kNone, kFlexible, kCv, kNP }; - -// Possible values for shuffle -enum class ShuffleMode { kFalse = 0, kFiles = 1, kGlobal = 2 }; - -// Possible values for Border types -enum class BorderType { kConstant = 0, kEdge = 1, kReflect = 2, kSymmetric = 3 }; - -// Possible values for Image format types in a batch -enum class ImageBatchFormat { kNHWC = 0, kNCHW = 1 }; - -// Possible values for Image format types -enum class ImageFormat { HWC = 0, CHW = 1, HW = 2 }; - -// Possible interpolation modes -enum class InterpolationMode { kLinear = 0, kNearestNeighbour = 1, kCubic = 2, kArea = 3 }; - -// Possible JiebaMode modes -enum class JiebaMode { kMix = 0, kMp = 1, kHmm = 2 }; - -// Possible values for SPieceTokenizerOutType -enum class SPieceTokenizerOutType { kString = 0, kInt = 1 }; - -// Possible values for SPieceTokenizerLoadType -enum class SPieceTokenizerLoadType { kFile = 0, kModel = 1 }; - -// Possible values for SentencePieceModel -enum class SentencePieceModel { kUnigram = 0, kBpe = 1, kChar = 2, kWord = 3 }; - -// Possible values for NormalizeForm -enum class NormalizeForm { - kNone = 0, - kNfc, - kNfkc, - kNfd, - kNfkd, -}; - -// Possible values for SamplingStrategy -enum class SamplingStrategy { kRandom = 0, kEdgeWeight = 1 }; - -// convenience functions for 32bit int bitmask -inline bool BitTest(uint32_t bits, uint32_t bitMask) { return (bits & bitMask) == bitMask; } - -inline void BitSet(uint32_t *bits, uint32_t bitMask) { *bits |= bitMask; } - -inline void BitClear(uint32_t *bits, uint32_t bitMask) { *bits &= (~bitMask); } - -constexpr int32_t kDeMaxDim = std::numeric_limits::max(); // 2147483647 or 2^32 -1 -constexpr int32_t kDeMaxRank = std::numeric_limits::max(); -constexpr int64_t kDeMaxFreq = std::numeric_limits::max(); // 9223372036854775807 or 2^(64-1) -constexpr int64_t kDeMaxTopk = std::numeric_limits::max(); - -constexpr uint32_t kCfgRowsPerBuffer = 1; -constexpr uint32_t kCfgParallelWorkers = 8; -constexpr uint32_t kCfgWorkerConnectorSize = 16; -constexpr uint32_t kCfgOpConnectorSize = 16; -constexpr int32_t kCfgDefaultRankId = -1; -constexpr uint32_t kCfgDefaultSeed = std::mt19937::default_seed; -constexpr uint32_t kCfgMonitorSamplingInterval = 10; -constexpr uint32_t kCfgCallbackTimeout = 60; // timeout value for callback in seconds -constexpr int32_t kCfgDefaultCachePort = 50052; -constexpr char kCfgDefaultCacheHost[] = "127.0.0.1"; -constexpr int32_t kDftPrefetchSize = 20; -constexpr int32_t kDftNumConnections = 12; -constexpr int32_t kDftAutoNumWorkers = false; - -// Invalid OpenCV type should not be from 0 to 7 (opencv4/opencv2/core/hal/interface.h) -constexpr uint8_t kCVInvalidType = 255; - -using connection_id_type = uint64_t; -using session_id_type = uint32_t; -using row_id_type = int64_t; -} // namespace dataset -} // namespace mindspore - -#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_CONSTANTS_H_ diff --git a/mindspore/ccsrc/minddata/dataset/liteapi/include/data_helper.h b/mindspore/ccsrc/minddata/dataset/liteapi/include/data_helper.h deleted file mode 100644 index cecce91dc0c..00000000000 --- a/mindspore/ccsrc/minddata/dataset/liteapi/include/data_helper.h +++ /dev/null @@ -1,448 +0,0 @@ -/** - * Copyright 2021 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_INCLUDE_DATA_HELPER_H_ -#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATA_HELPER_H_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "include/api/dual_abi_helper.h" -#include "include/api/status.h" - -namespace mindspore { -namespace dataset { - -/// \brief Simple class to do data manipulation, contains helper function to update json files in dataset -class DataHelper { - public: - /// \brief constructor - DataHelper() {} - - /// \brief Destructor - ~DataHelper() = default; - - /// \brief Create an Album dataset while taking in a path to a image folder - /// Creates the output directory if doesn't exist - /// \param[in] in_dir Image folder directory that takes in images - /// \param[in] out_dir Directory containing output json files - Status CreateAlbum(const std::string &in_dir, const std::string &out_dir) { - return CreateAlbumIF(StringToChar(in_dir), StringToChar(out_dir)); - } - - /// \brief Update a json file field with a vector of string values - /// \param in_file The input file name to read in - /// \param key Key of field to write to - /// \param value Value array to write to file - /// \param out_file Optional input for output file path, will write to input file if not specified - /// \return Status The status code returned - Status UpdateArray(const std::string &in_file, const std::string &key, const std::vector &value, - const std::string &out_file = "") { - return UpdateArrayIF(StringToChar(in_file), StringToChar(key), VectorStringToChar(value), StringToChar(out_file)); - } - - /// \brief Update a json file field with a vector of bool values - /// \param in_file The input file name to read in - /// \param key Key of field to write to - /// \param value Value array to write to file - /// \param out_file Optional parameter for output file path, will write to input file if not specified - /// \return Status The status code returned - Status UpdateArray(const std::string &in_file, const std::string &key, const std::vector &value, - const std::string &out_file = "") { - return UpdateArrayIF(StringToChar(in_file), StringToChar(key), value, StringToChar(out_file)); - } - - /// \brief Update a json file field with a vector of int8 values - /// \param in_file The input file name to read in - /// \param key Key of field to write to - /// \param value Value array to write to file - /// \param out_file Optional parameter for output file path, will write to input file if not specified - /// \return Status The status code returned - Status UpdateArray(const std::string &in_file, const std::string &key, const std::vector &value, - const std::string &out_file = "") { - return UpdateArrayIF(StringToChar(in_file), StringToChar(key), value, StringToChar(out_file)); - } - - /// \brief Update a json file field with a vector of uint8 values - /// \param in_file The input file name to read in - /// \param key Key of field to write to - /// \param value Value array to write to file - /// \param out_file Optional parameter for output file path, will write to input file if not specified - /// \return Status The status code returned - Status UpdateArray(const std::string &in_file, const std::string &key, const std::vector &value, - const std::string &out_file = "") { - return UpdateArrayIF(StringToChar(in_file), StringToChar(key), value, StringToChar(out_file)); - } - - /// \brief Update a json file field with a vector of int16 values - /// \param in_file The input file name to read in - /// \param key Key of field to write to - /// \param value Value array to write to file - /// \param out_file Optional parameter for output file path, will write to input file if not specified - /// \return Status The status code returned - Status UpdateArray(const std::string &in_file, const std::string &key, const std::vector &value, - const std::string &out_file = "") { - return UpdateArrayIF(StringToChar(in_file), StringToChar(key), value, StringToChar(out_file)); - } - - /// \brief Update a json file field with a vector of uint16 values - /// \param in_file The input file name to read in - /// \param key Key of field to write to - /// \param value Value array to write to file - /// \param out_file Optional parameter for output file path, will write to input file if not specified - /// \return Status The status code returned - Status UpdateArray(const std::string &in_file, const std::string &key, const std::vector &value, - const std::string &out_file = "") { - return UpdateArrayIF(StringToChar(in_file), StringToChar(key), value, StringToChar(out_file)); - } - - /// \brief Update a json file field with a vector of int32 values - /// \param in_file The input file name to read in - /// \param key Key of field to write to - /// \param value Value array to write to file - /// \param out_file Optional parameter for output file path, will write to input file if not specified - /// \return Status The status code returned - Status UpdateArray(const std::string &in_file, const std::string &key, const std::vector &value, - const std::string &out_file = "") { - return UpdateArrayIF(StringToChar(in_file), StringToChar(key), value, StringToChar(out_file)); - } - - /// \brief Update a json file field with a vector of uint32 values - /// \param in_file The input file name to read in - /// \param key Key of field to write to - /// \param value Value array to write to file - /// \param out_file Optional parameter for output file path, will write to input file if not specified - /// \return Status The status code returned - Status UpdateArray(const std::string &in_file, const std::string &key, const std::vector &value, - const std::string &out_file = "") { - return UpdateArrayIF(StringToChar(in_file), StringToChar(key), value, StringToChar(out_file)); - } - - /// \brief Update a json file field with a vector of int64 values - /// \param in_file The input file name to read in - /// \param key Key of field to write to - /// \param value Value array to write to file - /// \param out_file Optional parameter for output file path, will write to input file if not specified - /// \return Status The status code returned - Status UpdateArray(const std::string &in_file, const std::string &key, const std::vector &value, - const std::string &out_file = "") { - return UpdateArrayIF(StringToChar(in_file), StringToChar(key), value, StringToChar(out_file)); - } - - /// \brief Update a json file field with a vector of uint64 values - /// \param in_file The input file name to read in - /// \param key Key of field to write to - /// \param value Value array to write to file - /// \param out_file Optional parameter for output file path, will write to input file if not specified - /// \return Status The status code returned - Status UpdateArray(const std::string &in_file, const std::string &key, const std::vector &value, - const std::string &out_file = "") { - return UpdateArrayIF(StringToChar(in_file), StringToChar(key), value, StringToChar(out_file)); - } - - /// \brief Update a json file field with a vector of float values - /// \param in_file The input file name to read in - /// \param key Key of field to write to - /// \param value Value array to write to file - /// \param out_file Optional parameter for output file path, will write to input file if not specified - /// \return Status The status code returned - Status UpdateArray(const std::string &in_file, const std::string &key, const std::vector &value, - const std::string &out_file = "") { - return UpdateArrayIF(StringToChar(in_file), StringToChar(key), value, StringToChar(out_file)); - } - - /// \brief Update a json file field with a vector of double values - /// \param in_file The input file name to read in - /// \param key Key of field to write to - /// \param value Value array to write to file - /// \param out_file Optional parameter for output file path, will write to input file if not specified - /// \return Status The status code returned - Status UpdateArray(const std::string &in_file, const std::string &key, const std::vector &value, - const std::string &out_file = "") { - return UpdateArrayIF(StringToChar(in_file), StringToChar(key), value, StringToChar(out_file)); - } - - /// \brief Update a json file field with a string value - /// \param in_file The input file name to read in - /// \param key Key of field to write to - /// \param value Value to write to file - /// \param out_file Optional parameter for output file path, will write to input file if not specified - /// \return Status The status code returned - Status UpdateValue(const std::string &in_file, const std::string &key, const std::string &value, - const std::string &out_file = "") { - return UpdateValueIF(StringToChar(in_file), StringToChar(key), StringToChar(value), StringToChar(out_file)); - } - - /// \brief Update a json file field with a bool value - /// \param in_file The input file name to read in - /// \param key Key of field to write to - /// \param value Value to write to file - /// \param out_file Optional parameter for output file path, will write to input file if not specified - /// \return Status The status code returned - Status UpdateValue(const std::string &in_file, const std::string &key, const bool &value, - const std::string &out_file = "") { - return UpdateValueIF(StringToChar(in_file), StringToChar(key), value, StringToChar(out_file)); - } - - /// \brief Update a json file field with an int8 value - /// \param in_file The input file name to read in - /// \param key Key of field to write to - /// \param value Value to write to file - /// \param out_file Optional parameter for output file path, will write to input file if not specified - /// \return Status The status code returned - Status UpdateValue(const std::string &in_file, const std::string &key, const int8_t &value, - const std::string &out_file = "") { - return UpdateValueIF(StringToChar(in_file), StringToChar(key), value, StringToChar(out_file)); - } - - /// \brief Update a json file field with an uint8 value - /// \param in_file The input file name to read in - /// \param key Key of field to write to - /// \param value Value to write to file - /// \param out_file Optional parameter for output file path, will write to input file if not specified - /// \return Status The status code returned - Status UpdateValue(const std::string &in_file, const std::string &key, const uint8_t &value, - const std::string &out_file = "") { - return UpdateValueIF(StringToChar(in_file), StringToChar(key), value, StringToChar(out_file)); - } - - /// \brief Update a json file field with an int16 value - /// \param in_file The input file name to read in - /// \param key Key of field to write to - /// \param value Value to write to file - /// \param out_file Optional parameter for output file path, will write to input file if not specified - /// \return Status The status code returned - Status UpdateValue(const std::string &in_file, const std::string &key, const int16_t &value, - const std::string &out_file = "") { - return UpdateValueIF(StringToChar(in_file), StringToChar(key), value, StringToChar(out_file)); - } - - /// \brief Update a json file field with an uint16 value - /// \param in_file The input file name to read in - /// \param key Key of field to write to - /// \param value Value to write to file - /// \param out_file Optional parameter for output file path, will write to input file if not specified - /// \return Status The status code returned - Status UpdateValue(const std::string &in_file, const std::string &key, const uint16_t &value, - const std::string &out_file = "") { - return UpdateValueIF(StringToChar(in_file), StringToChar(key), value, StringToChar(out_file)); - } - - /// \brief Update a json file field with an int32 value - /// \param in_file The input file name to read in - /// \param key Key of field to write to - /// \param value Value to write to file - /// \param out_file Optional parameter for output file path, will write to input file if not specified - /// \return Status The status code returned - Status UpdateValue(const std::string &in_file, const std::string &key, const int32_t &value, - const std::string &out_file = "") { - return UpdateValueIF(StringToChar(in_file), StringToChar(key), value, StringToChar(out_file)); - } - - /// \brief Update a json file field with an uint32 value - /// \param in_file The input file name to read in - /// \param key Key of field to write to - /// \param value Value to write to file - /// \param out_file Optional parameter for output file path, will write to input file if not specified - /// \return Status The status code returned - Status UpdateValue(const std::string &in_file, const std::string &key, const uint32_t &value, - const std::string &out_file = "") { - return UpdateValueIF(StringToChar(in_file), StringToChar(key), value, StringToChar(out_file)); - } - - /// \brief Update a json file field with an int64 value - /// \param in_file The input file name to read in - /// \param key Key of field to write to - /// \param value Value to write to file - /// \param out_file Optional parameter for output file path, will write to input file if not specified - /// \return Status The status code returned - Status UpdateValue(const std::string &in_file, const std::string &key, const int64_t &value, - const std::string &out_file = "") { - return UpdateValueIF(StringToChar(in_file), StringToChar(key), value, StringToChar(out_file)); - } - - /// \brief Update a json file field with an uint64 value - /// \param in_file The input file name to read in - /// \param key Key of field to write to - /// \param value Value to write to file - /// \param out_file Optional parameter for output file path, will write to input file if not specified - /// \return Status The status code returned - Status UpdateValue(const std::string &in_file, const std::string &key, const uint64_t &value, - const std::string &out_file = "") { - return UpdateValueIF(StringToChar(in_file), StringToChar(key), value, StringToChar(out_file)); - } - - /// \brief Update a json file field with a float value - /// \param in_file The input file name to read in - /// \param key Key of field to write to - /// \param value Value to write to file - /// \param out_file Optional parameter for output file path, will write to input file if not specified - /// \return Status The status code returned - Status UpdateValue(const std::string &in_file, const std::string &key, const float &value, - const std::string &out_file = "") { - return UpdateValueIF(StringToChar(in_file), StringToChar(key), value, StringToChar(out_file)); - } - - /// \brief Update a json file field with a double value - /// \param in_file The input file name to read in - /// \param key Key of field to write to - /// \param value Value to write to file - /// \param out_file Optional parameter for output file path, will write to input file if not specified - /// \return Status The status code returned - Status UpdateValue(const std::string &in_file, const std::string &key, const double &value, - const std::string &out_file = "") { - return UpdateValueIF(StringToChar(in_file), StringToChar(key), value, StringToChar(out_file)); - } - - /// \brief Template function to write tensor to file - /// \param[in] in_file File to write to - /// \param[in] data Array of type T values - /// \return Status The status code returned - template - Status WriteBinFile(const std::string &in_file, const std::vector &data) { - try { - std::ofstream o(in_file, std::ios::binary | std::ios::out); - if (!o.is_open()) { - return Status(kMDUnexpectedError, "Error opening Bin file to write"); - } - size_t length = data.size(); - o.write(reinterpret_cast(&data[0]), std::streamsize(length * sizeof(T))); - o.close(); - } - // Catch any exception and convert to Status return code - catch (const std::exception &err) { - return Status(kMDUnexpectedError, "Write bin file failed "); - } - return Status::OK(); - } - - /// \brief Write pointer to bin, use pointer to avoid memcpy - /// \param[in] in_file File name to write to - /// \param[in] data Pointer to data - /// \param[in] length Length of values to write from pointer - /// \return Status The status code returned - template - Status WriteBinFile(const std::string &in_file, T *data, size_t length) { - try { - std::ofstream o(in_file, std::ios::binary | std::ios::out); - if (!o.is_open()) { - return Status(kMDUnexpectedError, "Error opening Bin file to write"); - } - o.write(reinterpret_cast(data), std::streamsize(length * sizeof(T))); - o.close(); - } - // Catch any exception and convert to Status return code - catch (const std::exception &err) { - return Status(kMDUnexpectedError, "Write bin file failed "); - } - return Status::OK(); - } - - /// \brief Helper function to copy content of a tensor to buffer - /// \note This function iterates over the tensor in bytes, since - /// \param[in] tensor_addr The memory held by a tensor - /// \param[in] tensor_size The amount of data in bytes in tensor_addr, e.g. tensor->SizeInBytes() - /// \param[out] addr The address to copy tensor data to - /// \param[in] buffer_size The buffer size of addr - /// \return The size of the tensor (bytes copied - size_t DumpData(const unsigned char *tensor_addr, const size_t &tensor_size, void *addr, const size_t &buffer_size); - - /// \brief Helper function to delete key in json file - /// note This function will return okay even if key not found - /// \param[in] in_file Json file to remove key from - /// \param[in] key The key to remove - /// \return Status The status code returned - Status RemoveKey(const std::string &in_file, const std::string &key, const std::string &out_file = "") { - return RemoveKeyIF(StringToChar(in_file), StringToChar(key), StringToChar(out_file)); - } - - /// \brief A print method typically used for debugging - /// \param out - The output stream to write output to - void Print(std::ostream &out) const; - - /// \brief << Stream output operator overload - /// \notes This allows you to write the debug print info using stream operators - /// \param out Reference to the output stream being overloaded - /// \param ds Reference to the DataSchema to display - /// \return The output stream must be returned - friend std::ostream &operator<<(std::ostream &out, const DataHelper &dh) { - dh.Print(out); - return out; - } - - private: - // Helper function for dual ABI support - Status CreateAlbumIF(const std::vector &in_dir, const std::vector &out_dir); - Status UpdateArrayIF(const std::vector &in_file, const std::vector &key, - const std::vector> &value, const std::vector &out_file); - Status UpdateArrayIF(const std::vector &in_file, const std::vector &key, const std::vector &value, - const std::vector &out_file); - Status UpdateArrayIF(const std::vector &in_file, const std::vector &key, const std::vector &value, - const std::vector &out_file); - Status UpdateArrayIF(const std::vector &in_file, const std::vector &key, - const std::vector &value, const std::vector &out_file); - Status UpdateArrayIF(const std::vector &in_file, const std::vector &key, - const std::vector &value, const std::vector &out_file); - Status UpdateArrayIF(const std::vector &in_file, const std::vector &key, - const std::vector &value, const std::vector &out_file); - Status UpdateArrayIF(const std::vector &in_file, const std::vector &key, - const std::vector &value, const std::vector &out_file); - Status UpdateArrayIF(const std::vector &in_file, const std::vector &key, - const std::vector &value, const std::vector &out_file); - Status UpdateArrayIF(const std::vector &in_file, const std::vector &key, - const std::vector &value, const std::vector &out_file); - Status UpdateArrayIF(const std::vector &in_file, const std::vector &key, - const std::vector &value, const std::vector &out_file); - Status UpdateArrayIF(const std::vector &in_file, const std::vector &key, const std::vector &value, - const std::vector &out_file); - Status UpdateArrayIF(const std::vector &in_file, const std::vector &key, const std::vector &value, - const std::vector &out_file); - - Status UpdateValueIF(const std::vector &in_file, const std::vector &key, const std::vector &value, - const std::vector &out_file); - Status UpdateValueIF(const std::vector &in_file, const std::vector &key, const bool &value, - const std::vector &out_file); - Status UpdateValueIF(const std::vector &in_file, const std::vector &key, const int8_t &value, - const std::vector &out_file); - Status UpdateValueIF(const std::vector &in_file, const std::vector &key, const uint8_t &value, - const std::vector &out_file); - Status UpdateValueIF(const std::vector &in_file, const std::vector &key, const int16_t &value, - const std::vector &out_file); - Status UpdateValueIF(const std::vector &in_file, const std::vector &key, const uint16_t &value, - const std::vector &out_file); - Status UpdateValueIF(const std::vector &in_file, const std::vector &key, const int32_t &value, - const std::vector &out_file); - Status UpdateValueIF(const std::vector &in_file, const std::vector &key, const uint32_t &value, - const std::vector &out_file); - Status UpdateValueIF(const std::vector &in_file, const std::vector &key, const int64_t &value, - const std::vector &out_file); - Status UpdateValueIF(const std::vector &in_file, const std::vector &key, const uint64_t &value, - const std::vector &out_file); - Status UpdateValueIF(const std::vector &in_file, const std::vector &key, const float &value, - const std::vector &out_file); - Status UpdateValueIF(const std::vector &in_file, const std::vector &key, const double &value, - const std::vector &out_file); - Status RemoveKeyIF(const std::vector &in_file, const std::vector &key, const std::vector &out_file); -}; -} // namespace dataset -} // namespace mindspore - -#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATA_HELPER_H_ diff --git a/mindspore/ccsrc/minddata/dataset/liteapi/include/datasets.h b/mindspore/ccsrc/minddata/dataset/liteapi/include/datasets.h index eadb609d8f3..5982f178e98 100644 --- a/mindspore/ccsrc/minddata/dataset/liteapi/include/datasets.h +++ b/mindspore/ccsrc/minddata/dataset/liteapi/include/datasets.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASETS_H_ -#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASETS_H_ +#ifndef MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_DATASETS_H_ +#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_DATASETS_H_ #include #include @@ -32,9 +32,9 @@ #include "include/api/dual_abi_helper.h" #include "include/api/types.h" -#include "include/iterator.h" -#include "include/samplers.h" -#include "include/transforms.h" +#include "include/dataset/iterator.h" +#include "include/dataset/samplers.h" +#include "include/dataset/transforms.h" namespace mindspore { namespace dataset { @@ -570,4 +570,4 @@ inline std::shared_ptr Mnist(const std::string &dataset_dir, const } // namespace dataset } // namespace mindspore -#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASETS_H_ +#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_DATASET_DATASETS_H_ diff --git a/mindspore/ccsrc/minddata/dataset/liteapi/include/execute.h b/mindspore/ccsrc/minddata/dataset/liteapi/include/execute.h deleted file mode 100644 index 61ce1650a2c..00000000000 --- a/mindspore/ccsrc/minddata/dataset/liteapi/include/execute.h +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Copyright 2020-2021 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_INCLUDE_EXECUTE_H_ -#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_EXECUTE_H_ - -#include -#include -#include -#include -#include "include/api/context.h" -#include "include/api/types.h" -#include "include/constants.h" -#include "include/transforms.h" - -namespace mindspore { -namespace dataset { -class DeviceResource; -// class to run tensor operations in eager mode -class Execute { - public: - /// \brief Constructor - // FIXME - Temporarily overload Execute to support both TensorOperation and TensorTransform - explicit Execute(std::shared_ptr op, MapTargetDevice deviceType = MapTargetDevice::kCpu); - explicit Execute(std::shared_ptr op, MapTargetDevice deviceType = MapTargetDevice::kCpu); - explicit Execute(std::reference_wrapper op, MapTargetDevice deviceType = MapTargetDevice::kCpu); - explicit Execute(TensorTransform *op, MapTargetDevice deviceType = MapTargetDevice::kCpu); - - explicit Execute(std::vector> ops, - MapTargetDevice deviceType = MapTargetDevice::kCpu); - explicit Execute(std::vector> ops, - MapTargetDevice deviceType = MapTargetDevice::kCpu); - explicit Execute(const std::vector> ops, - MapTargetDevice deviceType = MapTargetDevice::kCpu); - explicit Execute(std::vector ops, MapTargetDevice deviceType = MapTargetDevice::kCpu); - - /// \brief Destructor - ~Execute(); - - /// \brief callable function to execute the TensorOperation in eager mode - /// \param[in] input Tensor to be transformed - /// \param[out] output Transformed tensor - /// \return Status code - Status operator()(const mindspore::MSTensor &input, mindspore::MSTensor *output); - - /// \brief callable function to execute the TensorOperation in eager mode - /// \param[in] input_tensor_list List of Tensor to be transformed - /// \param[out] out Result tensor after transform - /// \return - Status - Status operator()(const std::vector &input_tensor_list, std::vector *out); - - Status DeviceMemoryRelease(); - - std::string AippCfgGenerator(); - - private: - Status ParseTransforms_(); - - Status validate_device_(); - - std::vector> transforms_; - - std::vector> ops_; - - MapTargetDevice device_type_; - - std::shared_ptr device_resource_; - - struct ExtraInfo; - std::shared_ptr info_; -}; - -} // namespace dataset -} // namespace mindspore -#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_EXECUTE_H_ diff --git a/mindspore/ccsrc/minddata/dataset/liteapi/include/iterator.h b/mindspore/ccsrc/minddata/dataset/liteapi/include/iterator.h deleted file mode 100644 index 799dc1d8776..00000000000 --- a/mindspore/ccsrc/minddata/dataset/liteapi/include/iterator.h +++ /dev/null @@ -1,166 +0,0 @@ -/** - * Copyright 2020-2021 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_INCLUDE_ITERATOR_H_ -#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_ITERATOR_H_ - -#include -#include -#include -#include -#include -#include "include/api/dual_abi_helper.h" -#include "include/api/status.h" -#include "include/api/types.h" - -namespace mindspore { -namespace dataset { - -// Forward declare -class ExecutionTree; -class DatasetIterator; -class DatasetOp; -class Tensor; - -class NativeRuntimeContext; -class IteratorConsumer; -class PullBasedIteratorConsumer; - -class Dataset; - -using MSTensorMap = std::unordered_map; -using MSTensorMapChar = std::map, mindspore::MSTensor>; -using MSTensorVec = std::vector; - -// Abstract class for iterating over the dataset. -class Iterator { - public: - /// \brief Constructor - Iterator(); - - /// \brief Destructor - ~Iterator(); - - /// \brief Method for building and launching the pipeline. - /// \param[in] ops - a vector of DatasetOp in the data pipeline. - /// \param[in] num_epochs Number of epochs passed down to EpochCtrlNode, default -1, infinite epochs - /// \return - a Status error code, returns OK if no error encountered. - Status BuildAndLaunchTree(std::shared_ptr ds, int32_t num_epochs); - - /// \brief Function to get the next row from the data pipeline. - /// \note Type of return data is a map(with column name). - /// \param[out] row - the output tensor row. - /// \return - a Status error code, returns OK if no error encountered. - Status GetNextRow(MSTensorMap *row) { - MSTensorMapChar row_; - row_.clear(); - row->clear(); - Status s = GetNextRowCharIF(&row_); - TensorMapCharToString(&row_, row); - return s; - } - - // Char interface(CharIF) of GetNextRow - // This api exists because std::string will constrained by ABI compile macro but char don't. - Status GetNextRowCharIF(MSTensorMapChar *row); - - /// \brief Function to get the next row from the data pipeline. - /// \note Type of return data is a vector(without column name). - /// \param[out] row - the output tensor row. - /// \return - a Status error code, returns OK if no error encountered. - virtual Status GetNextRow(MSTensorVec *row); - - /// \brief Function to shut down the data pipeline. - void Stop(); - - class _Iterator { - public: - explicit _Iterator(Iterator *lt) : lt_{lt}, cur_row_{nullptr} { - if (lt_) { - cur_row_ = new MSTensorMap(); - lt_->GetNextRow(cur_row_); - } - } - - // Destructor - ~_Iterator() { - if (cur_row_) { - delete cur_row_; - } - } - - _Iterator &operator++() { - if (lt_) { - ++ind_; - lt_->GetNextRow(cur_row_); - } - if (cur_row_ && cur_row_->size() == 0) { - delete cur_row_; - cur_row_ = nullptr; - } - return *this; - } // prefix ++ overload - MSTensorMap &operator*() { return *cur_row_; } // dereference operator - MSTensorMap *operator->() { return cur_row_; } - - bool operator!=(const _Iterator &rhs) { return cur_row_ != rhs.cur_row_; } - - private: - int ind_; // the cur node our Iterator points to - Iterator *lt_; - MSTensorMap *cur_row_; - }; - - _Iterator begin() { return _Iterator(this); } - - _Iterator end() { return _Iterator(nullptr); } - - private: - std::unique_ptr runtime_context_; - IteratorConsumer *consumer_; -}; - -class PullIterator : public Iterator { - public: - /// \brief Constructor - PullIterator(); - - /// \brief Function to get next row from the data pipeline. - /// \note Type of return data is a vector(without column name). - /// \param[out] row - the output tensor row. - /// \return Returns true if no error encountered else false. - Status GetNextRow(MSTensorVec *row) override; - - /// \brief Function to get specified rows from the data pipeline. - /// \note Type of return data is a vector(without column name). - /// \note This behavior is subject to change - /// \param[in] num_rows - the number of rows to fetch. - /// \param[out] row - the output tensor row. - /// \return Returns true if no error encountered else false. - Status GetRows(int32_t num_rows, std::vector *row); - - /// \brief Method for building and launching the pipeline. - /// \note Consider making this function protected. - /// \param[in] ds - The root node that calls the function - /// \return - a Status error code, returns OK if no error encountered. - Status BuildAndLaunchTree(std::shared_ptr ds); - - private: - std::unique_ptr pull_consumer_; -}; -} // namespace dataset -} // namespace mindspore -#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_ITERATOR_H_ diff --git a/mindspore/ccsrc/minddata/dataset/liteapi/include/samplers.h b/mindspore/ccsrc/minddata/dataset/liteapi/include/samplers.h deleted file mode 100644 index 8fe6d99a7f3..00000000000 --- a/mindspore/ccsrc/minddata/dataset/liteapi/include/samplers.h +++ /dev/null @@ -1,251 +0,0 @@ -/** - * Copyright 2020-2021 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_INCLUDE_SAMPLERS_H_ -#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_SAMPLERS_H_ - -#include -#include - -namespace mindspore { -namespace dataset { - -// Forward declare -class SamplerObj; - -// Abstract class to represent a sampler in the data pipeline. -/// \class Sampler samplers.h -/// \brief An abstract base class to represent a sampler in the data pipeline. -class Sampler : std::enable_shared_from_this { - friend class AlbumDataset; - friend class CelebADataset; - friend class Cifar10Dataset; - friend class Cifar100Dataset; - friend class CLUEDataset; - friend class CocoDataset; - friend class CSVDataset; - friend class ImageFolderDataset; - friend class ManifestDataset; - friend class MindDataDataset; - friend class MnistDataset; - friend class RandomDataDataset; - friend class TextFileDataset; - friend class TFRecordDataset; - friend class VOCDataset; - friend std::shared_ptr SelectSampler(int64_t, bool, int32_t, int32_t); - - public: - /// \brief Constructor - Sampler() {} - - /// \brief Destructor - ~Sampler() = default; - - /// \brief A virtual function to add a child sampler. - /// \param[in] child The child sampler to be added as a children of this sampler. - virtual void AddChild(std::shared_ptr child) { children_.push_back(child); } - - protected: - /// \brief Pure virtual function to convert a Sampler class into an IR Sampler object. - /// \return shared pointer to the newly created TensorOperation. - virtual std::shared_ptr Parse() const = 0; - - std::vector> children_; -}; - -/// \brief A class to represent a Distributed Sampler in the data pipeline. -/// \notes A Sampler that accesses a shard of the dataset. -class DistributedSampler final : public Sampler { - friend std::shared_ptr SelectSampler(int64_t, bool, int32_t, int32_t); - - public: - /// \brief Constructor - /// \param[in] num_shards - Number of shards to divide the dataset into. - /// \param[in] shard_id - Shard ID of the current shard within num_shards. - /// \param[in] shuffle - If true, the indices are shuffled. - /// \param[in] num_samples - The number of samples to draw (default to all elements). - /// \param[in] seed - The seed in use when shuffle is true. - /// \param[in] offset - The starting position where access to elements in the dataset begins. - /// \param[in] even_dist - If true, each shard would return the same number of rows (default to true). - /// If false the total rows returned by all the shards would not have overlap. - explicit DistributedSampler(int64_t num_shards, int64_t shard_id, bool shuffle = true, int64_t num_samples = 0, - uint32_t seed = 1, int64_t offset = -1, bool even_dist = true); - /// \brief Destructor. - ~DistributedSampler() = default; - - protected: - /// \brief Function to convert a Sampler into an IR SamplerObj. - /// \return shared pointer to the newly created SamplerObj. - std::shared_ptr Parse() const override; - - private: - int64_t num_shards_; - int64_t shard_id_; - bool shuffle_; - int64_t num_samples_; - uint32_t seed_; - int64_t offset_; - bool even_dist_; -}; - -/// \brief A class to represent a PK Sampler in the data pipeline. -/// \notes Samples K elements for each P class in the dataset. -/// This will sample all classes. -class PKSampler final : public Sampler { - friend std::shared_ptr SelectSampler(int64_t, bool, int32_t, int32_t); - - public: - /// \brief Constructor - /// \param[in] num_val - Number of elements to sample for each class. - /// \param[in] shuffle - If true, the class IDs are shuffled. - /// \param[in] num_samples - The number of samples to draw (default to all elements). - explicit PKSampler(int64_t num_val, bool shuffle = false, int64_t num_samples = 0); - - /// \brief Destructor. - ~PKSampler() = default; - - protected: - /// \brief Function to convert a Sampler into an IR SamplerObj. - /// \return shared pointer to the newly created SamplerObj. - std::shared_ptr Parse() const override; - - private: - int64_t num_val_; - bool shuffle_; - int64_t num_samples_; -}; - -/// \brief A class to represent a Random Sampler in the data pipeline. -/// \notes Samples the elements randomly. -class RandomSampler final : public Sampler { - friend std::shared_ptr SelectSampler(int64_t, bool, int32_t, int32_t); - - public: - /// \brief Constructor - /// \param[in] replacement - If true, put the sample ID back for the next draw. - /// \param[in] num_samples - The number of samples to draw (default to all elements). - explicit RandomSampler(bool replacement = false, int64_t num_samples = 0); - - /// \brief Destructor. - ~RandomSampler() = default; - - protected: - /// \brief Function to convert a Sampler into an IR SamplerObj. - /// \return shared pointer to the newly created SamplerObj. - std::shared_ptr Parse() const override; - - private: - bool replacement_; - int64_t num_samples_; -}; - -/// \brief A class to represent a Sequential Sampler in the data pipeline. -/// \notes Samples the dataset elements sequentially, same as not having a sampler. -class SequentialSampler final : public Sampler { - friend std::shared_ptr SelectSampler(int64_t, bool, int32_t, int32_t); - - public: - /// \brief Constructor - /// \param[in] start_index - Index to start sampling at (default to start at first id). - /// \param[in] num_samples - The number of samples to draw (default to all elements). - explicit SequentialSampler(int64_t start_index = 0, int64_t num_samples = 0); - - /// \brief Destructor. - ~SequentialSampler() = default; - - protected: - /// \brief Function to convert a Sampler into an IR SamplerObj. - /// \return shared pointer to the newly created SamplerObj. - std::shared_ptr Parse() const override; - - private: - int64_t start_index_; - int64_t num_samples_; -}; - -/// \brief A class to represent a Subset Sampler in the data pipeline. -/// \notes Samples the elements from a sequence of indices. -class SubsetSampler : public Sampler { - friend std::shared_ptr SelectSampler(int64_t, bool, int32_t, int32_t); - - public: - /// \brief Constructor - /// \param[in] indices - A vector sequence of indices. - /// \param[in] num_samples - The number of samples to draw (default to all elements). - explicit SubsetSampler(std::vector indices, int64_t num_samples = 0); - - /// \brief Destructor. - ~SubsetSampler() = default; - - protected: - /// \brief Function to convert a Sampler into an IR SamplerObj. - /// \return shared pointer to the newly created SamplerObj. - std::shared_ptr Parse() const override; - - std::vector indices_; - int64_t num_samples_; -}; - -/// \brief A class to represent a Subset Random Sampler in the data pipeline. -/// \notes Samples the elements randomly from a sequence of indices. -class SubsetRandomSampler final : public SubsetSampler { - friend std::shared_ptr SelectSampler(int64_t, bool, int32_t, int32_t); - - public: - /// \brief Constructor - /// \param[in] indices - A vector sequence of indices. - /// \param[in] num_samples - The number of samples to draw (default to all elements). - explicit SubsetRandomSampler(std::vector indices, int64_t num_samples = 0); - - /// \brief Destructor. - ~SubsetRandomSampler() = default; - - protected: - /// \brief Function to convert a Sampler into an IR SamplerObj. - /// \return shared pointer to the newly created SamplerObj. - std::shared_ptr Parse() const override; -}; - -/// \brief A class to represent a Weighted Random Sampler in the data pipeline. -/// \notes Samples the elements from [0, len(weights) - 1] randomly with the given -/// weights (probabilities). -class WeightedRandomSampler final : public Sampler { - friend std::shared_ptr SelectSampler(int64_t, bool, int32_t, int32_t); - - public: - /// \brief Constructor - /// \param[in] weights - A vector sequence of weights, not necessarily summing up to 1. - /// \param[in] num_samples - The number of samples to draw (default to all elements). - /// \param[in] replacement - If true, put the sample ID back for the next draw. - explicit WeightedRandomSampler(std::vector weights, int64_t num_samples = 0, bool replacement = true); - - /// \brief Destructor. - ~WeightedRandomSampler() = default; - - protected: - /// \brief Function to convert a Sampler into an IR SamplerObj. - /// \return shared pointer to the newly created SamplerObj. - std::shared_ptr Parse() const override; - - private: - std::vector weights_; - int64_t num_samples_; - bool replacement_; -}; - -} // namespace dataset -} // namespace mindspore -#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_SAMPLERS_H_ diff --git a/mindspore/ccsrc/minddata/dataset/liteapi/include/transforms.h b/mindspore/ccsrc/minddata/dataset/liteapi/include/transforms.h deleted file mode 100644 index e4f37ffa430..00000000000 --- a/mindspore/ccsrc/minddata/dataset/liteapi/include/transforms.h +++ /dev/null @@ -1,243 +0,0 @@ -/** - * Copyright 2020-2021 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_INCLUDE_TRANSFORMS_H_ -#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_TRANSFORMS_H_ - -#include -#include -#include -#include - -#include "include/api/dual_abi_helper.h" -#include "include/api/status.h" -#include "include/constants.h" - -namespace mindspore { -namespace dataset { - -class TensorOperation; - -// We need the following two groups of forward declaration to friend the class in class TensorTransform. -namespace transforms { -class Compose; -class RandomApply; -class RandomChoice; -} // namespace transforms - -namespace vision { -class BoundingBoxAugment; -class RandomSelectSubpolicy; -class UniformAugment; -} // namespace vision - -// Abstract class to represent a tensor transform operation in the data pipeline. -/// \class TensorTransform transforms.h -/// \brief A base class to represent a tensor transform operation in the data pipeline. -class TensorTransform : public std::enable_shared_from_this { - friend class Dataset; - friend class Execute; - friend class transforms::Compose; - friend class transforms::RandomApply; - friend class transforms::RandomChoice; - friend class vision::BoundingBoxAugment; - friend class vision::RandomSelectSubpolicy; - friend class vision::UniformAugment; - - public: - /// \brief Constructor - TensorTransform() {} - - /// \brief Destructor - ~TensorTransform() = default; - - protected: - /// \brief Pure virtual function to convert a TensorTransform class into a IR TensorOperation object. - /// \return shared pointer to the newly created TensorOperation. - virtual std::shared_ptr Parse() = 0; - - /// \brief Virtual function to convert a TensorTransform class into a IR TensorOperation object. - /// \param[in] env A string to determine the running environment - /// \return shared pointer to the newly created TensorOperation. - virtual std::shared_ptr Parse(const MapTargetDevice &env) { return nullptr; } -}; - -// Transform operations for performing data transformation. -namespace transforms { - -/// \brief Compose Op. -/// \notes Compose a list of transforms into a single transform. -class Compose final : public TensorTransform { - public: - /// \brief Constructor. - /// \param[in] transforms A vector of raw pointers to TensorTransform objects to be applied. - explicit Compose(const std::vector &transforms); - /// \brief Constructor. - /// \param[in] transforms A vector of shared pointers to TensorTransform objects to be applied. - explicit Compose(const std::vector> &transforms); - /// \brief Constructor. - /// \param[in] transforms A vector of TensorTransform objects to be applied. - explicit Compose(const std::vector> &transforms); - - /// \brief Destructor - ~Compose() = default; - - protected: - /// \brief Function to convert TensorTransform object into a TensorOperation object. - /// \return Shared pointer to TensorOperation object. - std::shared_ptr Parse() override; - - private: - struct Data; - std::shared_ptr data_; -}; - -/// \brief Duplicate Op. -/// \notes Duplicate the input tensor to a new output tensor. -/// The input tensor is carried over to the output list. -class Duplicate final : public TensorTransform { - public: - /// \brief Constructor. - Duplicate(); - - /// \brief Destructor - ~Duplicate() = default; - - protected: - /// \brief Function to convert TensorTransform object into a TensorOperation object. - /// \return Shared pointer to TensorOperation object. - std::shared_ptr Parse() override; -}; - -/// \brief OneHot Op. -/// \notes Convert the labels into OneHot format. -class OneHot final : public TensorTransform { - public: - /// \brief Constructor. - /// \param[in] num_classes number of classes. - explicit OneHot(int32_t num_classes); - - /// \brief Destructor - ~OneHot() = default; - - protected: - /// \brief Function to convert TensorTransform object into a TensorOperation object. - /// \return Shared pointer to TensorOperation object. - std::shared_ptr Parse() override; - - private: - struct Data; - std::shared_ptr data_; -}; - -/// \brief RandomApply Op. -/// \notes Randomly perform a series of transforms with a given probability. -class RandomApply final : public TensorTransform { - public: - /// \brief Constructor. - /// \param[in] transforms A vector of raw pointers to TensorTransform objects to be applied. - /// \param[in] prob The probability to apply the transformation list (default=0.5) - explicit RandomApply(const std::vector &transforms, double prob = 0.5); - /// \brief Constructor. - /// \param[in] transforms A vector of shared pointers to TensorTransform objects to be applied. - /// \param[in] prob The probability to apply the transformation list (default=0.5) - explicit RandomApply(const std::vector> &transforms, double prob = 0.5); - /// \brief Constructor. - /// \param[in] transforms A vector of TensorTransform objects to be applied. - /// \param[in] prob The probability to apply the transformation list (default=0.5) - explicit RandomApply(const std::vector> &transforms, double prob = 0.5); - - /// \brief Destructor - ~RandomApply() = default; - - protected: - /// \brief Function to convert TensorTransform object into a TensorOperation object. - /// \return Shared pointer to TensorOperation object. - std::shared_ptr Parse() override; - - private: - struct Data; - std::shared_ptr data_; -}; - -/// \brief RandomChoice Op. -/// \notes Randomly selects one transform from a list of transforms to perform operation. -class RandomChoice final : public TensorTransform { - public: - /// \brief Constructor. - /// \param[in] transforms A vector of raw pointers to TensorTransform objects to be applied. - explicit RandomChoice(const std::vector &transforms); - /// \brief Constructor. - /// \param[in] transforms A vector of shared pointers to TensorTransform objects to be applied. - explicit RandomChoice(const std::vector> &transforms); - /// \brief Constructor. - /// \param[in] transforms A vector of TensorTransform objects to be applied. - explicit RandomChoice(const std::vector> &transforms); - - /// \brief Destructor - ~RandomChoice() = default; - - protected: - /// \brief Function to convert TensorTransform object into a TensorOperation object. - /// \return Shared pointer to TensorOperation object. - std::shared_ptr Parse() override; - - private: - struct Data; - std::shared_ptr data_; -}; - -/// \brief TypeCast Op. -/// \notes Tensor operation to cast to a given MindSpore data type. -class TypeCast final : public TensorTransform { - public: - /// \brief Constructor. - /// \param[in] data_type mindspore::DataType to be cast to. - explicit TypeCast(mindspore::DataType data_type); - - /// \brief Destructor - ~TypeCast() = default; - - protected: - /// \brief Function to convert TensorTransform object into a TensorOperation object. - /// \return Shared pointer to TensorOperation object. - std::shared_ptr Parse() override; - - private: - struct Data; - std::shared_ptr data_; -}; - -/// \brief Unique Op. -/// \notes Return an output tensor containing all the unique elements of the input tensor in -/// the same order that they occur in the input tensor. -class Unique final : public TensorTransform { - public: - /// \brief Constructor. - Unique(); - - /// \brief Destructor - ~Unique() = default; - - protected: - /// \brief Function to convert TensorTransform object into a TensorOperation object. - /// \return Shared pointer to TensorOperation object. - std::shared_ptr Parse() override; -}; -} // namespace transforms -} // namespace dataset -} // namespace mindspore -#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_TRANSFORMS_H_ diff --git a/mindspore/ccsrc/minddata/dataset/liteapi/include/vision_lite.h b/mindspore/ccsrc/minddata/dataset/liteapi/include/vision_lite.h deleted file mode 100644 index 12efd86f475..00000000000 --- a/mindspore/ccsrc/minddata/dataset/liteapi/include/vision_lite.h +++ /dev/null @@ -1,292 +0,0 @@ -/** - * Copyright 2020-2021 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_INCLUDE_VISION_LITE_H_ -#define MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_VISION_LITE_H_ - -#include -#include -#include -#include -#include -#include "include/api/status.h" -#include "include/constants.h" -#include "include/transforms.h" - -namespace mindspore { -namespace dataset { - -// Transform operations for performing computer vision. -namespace vision { - -// Forward Declarations -class RotateOperation; - -/// \brief Affine TensorTransform. -/// \notes Apply affine transform on input image. -class Affine final : public TensorTransform { - public: - /// \brief Constructor. - /// \param[in] degrees The degrees to rotate the image by - /// \param[in] translation The value representing vertical and horizontal translation (default = {0.0, 0.0}) - /// The first value represent the x axis translation while the second represents y axis translation. - /// \param[in] scale The scaling factor for the image (default = 0.0) - /// \param[in] shear A float vector of size 2, representing the shear degrees (default = {0.0, 0.0}) - /// \param[in] interpolation An enum for the mode of interpolation - /// \param[in] fill_value A vector representing the value to fill the area outside the transform - /// in the output image. If 1 value is provided, it is used for all RGB channels. - /// If 3 values are provided, it is used to fill R, G, B channels respectively. - explicit Affine(float_t degrees, const std::vector &translation = {0.0, 0.0}, float scale = 0.0, - const std::vector &shear = {0.0, 0.0}, - InterpolationMode interpolation = InterpolationMode::kNearestNeighbour, - const std::vector &fill_value = {0, 0, 0}); - - /// \brief Destructor. - ~Affine() = default; - - /// \brief Function to convert TensorTransform object into a TensorOperation object. - /// \return Shared pointer to TensorOperation object. - std::shared_ptr Parse() override; - - private: - struct Data; - std::shared_ptr data_; -}; - -/// \brief CenterCrop TensorTransform. -/// \notes Crops the input image at the center to the given size. -class CenterCrop final : public TensorTransform { - public: - /// \brief Constructor. - /// \param[in] size A vector representing the output size of the cropped image. - /// If size is a single value, a square crop of size (size, size) is returned. - /// If size has 2 values, it should be (height, width). - explicit CenterCrop(std::vector size); - - /// \brief Destructor. - ~CenterCrop() = default; - - protected: - /// \brief Function to convert TensorTransform object into a TensorOperation object. - /// \return Shared pointer to TensorOperation object. - std::shared_ptr Parse() override; - - std::shared_ptr Parse(const MapTargetDevice &env) override; - - private: - struct Data; - std::shared_ptr data_; -}; - -/// \brief ResizePreserveAR TensorTransform. -/// \notes Keep the original picture ratio and fill the rest. -class ResizePreserveAR final : public TensorTransform { - public: - /// \brief Constructor. - /// \param[in] height The height of image output value after resizing. - /// \param[in] width The width of image output value after resizing. - /// \param[in] img_orientation Angle method of image rotation. - ResizePreserveAR(int32_t height, int32_t width, int32_t img_orientation = 0); - - /// \brief Destructor. - ~ResizePreserveAR() = default; - - protected: - /// \brief Function to convert TensorTransform object into a TensorOperation object. - /// \return Shared pointer to TensorOperation object. - std::shared_ptr Parse() override; - - private: - struct Data; - std::shared_ptr data_; -}; - -/// \brief RGB2GRAY TensorTransform. -/// \notes Convert RGB image or color image to grayscale image -class RGB2GRAY : public TensorTransform { - public: - /// \brief Constructor. - RGB2GRAY() = default; - - /// \brief Destructor. - ~RGB2GRAY() = default; - - protected: - /// \brief Function to convert TensorTransform object into a TensorOperation object. - /// \return Shared pointer to TensorOperation object. - std::shared_ptr Parse() override; -}; - -/// \brief Crop TensorTransform. -/// \notes Crop an image based on location and crop size -class Crop final : public TensorTransform { - public: - /// \brief Constructor. - /// \param[in] coordinates Starting location of crop. Must be a vector of two values, in the form of {x_coor, y_coor} - /// \param[in] size Size of the cropped area. - /// If size is a single value, a square crop of size (size, size) is returned. - /// If size has 2 values, it should be (height, width). - Crop(std::vector coordinates, std::vector size); - - /// \brief Destructor. - ~Crop() = default; - - protected: - /// \brief Function to convert TensorTransform object into a TensorOperation object. - /// \return Shared pointer to TensorOperation object. - std::shared_ptr Parse() override; - - private: - struct Data; - std::shared_ptr data_; -}; - -/// \brief Decode TensorTransform. -/// \notes Decode the input image in RGB mode. -class Decode final : public TensorTransform { - public: - /// \brief Constructor. - /// \param[in] rgb A boolean of whether to decode in RGB mode or not. - explicit Decode(bool rgb = true); - - /// \brief Destructor. - ~Decode() = default; - - protected: - /// \brief Function to convert TensorTransform object into a TensorOperation object. - /// \return Shared pointer to TensorOperation object. - std::shared_ptr Parse() override; - - std::shared_ptr Parse(const MapTargetDevice &env) override; - - private: - struct Data; - std::shared_ptr data_; -}; - -/// \brief Normalize TensorTransform. -/// \notes Normalize the input image with respect to mean and standard deviation. -class Normalize final : public TensorTransform { - public: - /// \brief Constructor. - /// \param[in] mean A vector of mean values for each channel, w.r.t channel order. - /// The mean values must be in range [0.0, 255.0]. - /// \param[in] std A vector of standard deviations for each channel, w.r.t. channel order. - /// The standard deviation values must be in range (0.0, 255.0] - Normalize(std::vector mean, std::vector std); - - /// \brief Destructor. - ~Normalize() = default; - - protected: - /// \brief Function to convert TensorTransform object into a TensorOperation object. - /// \return Shared pointer to TensorOperation object. - std::shared_ptr Parse() override; - - std::shared_ptr Parse(const MapTargetDevice &env) override; - - private: - struct Data; - std::shared_ptr data_; -}; - -/// \brief RandomAffine TensorTransform. -/// \notes Applies a Random Affine transformation on input image in RGB or Greyscale mode. -class RandomAffine final : public TensorTransform { - public: - /// \brief Constructor. - /// \param[in] degrees A float vector of size 2, representing the starting and ending degree - /// \param[in] translate_range A float vector of size 2 or 4, representing percentages of translation on x and y axes. - /// if size is 2, (min_dx, max_dx, 0, 0) - /// if size is 4, (min_dx, max_dx, min_dy, max_dy) - /// all values are in range [-1, 1] - /// \param[in] scale_range A float vector of size 2, representing the starting and ending scales in the range. - /// \param[in] shear_ranges A float vector of size 2 or 4, representing the starting and ending shear degrees - /// vertically and horizontally. - /// if size is 2, (min_shear_x, max_shear_x, 0, 0) - /// if size is 4, (min_shear_x, max_shear_x, min_shear_y, max_shear_y) - /// \param[in] interpolation An enum for the mode of interpolation - /// \param[in] fill_value A vector representing the value to fill the area outside the transform - /// in the output image. If 1 value is provided, it is used for all RGB channels. - /// If 3 values are provided, it is used to fill R, G, B channels respectively. - explicit RandomAffine(const std::vector °rees, - const std::vector &translate_range = {0.0, 0.0, 0.0, 0.0}, - const std::vector &scale_range = {1.0, 1.0}, - const std::vector &shear_ranges = {0.0, 0.0, 0.0, 0.0}, - InterpolationMode interpolation = InterpolationMode::kNearestNeighbour, - const std::vector &fill_value = {0, 0, 0}); - - /// \brief Destructor. - ~RandomAffine() = default; - - /// \brief Function to convert TensorTransform object into a TensorOperation object. - /// \return Shared pointer to TensorOperation object. - std::shared_ptr Parse() override; - - private: - struct Data; - std::shared_ptr data_; -}; - -/// \brief Resize TensorTransform. -/// \notes Resize the input image to the given size. -class Resize final : public TensorTransform { - public: - /// \brief Constructor. - /// \param[in] size A vector representing the output size of the resized image. - /// If size is a single value, the image will be resized to this value with - /// the same image aspect ratio. If size has 2 values, it should be (height, width). - /// \param[in] interpolation An enum for the mode of interpolation - explicit Resize(std::vector size, InterpolationMode interpolation = InterpolationMode::kLinear); - - /// \brief Destructor. - ~Resize() = default; - - protected: - /// \brief Function to convert TensorTransform object into a TensorOperation object. - /// \return Shared pointer to TensorOperation object. - std::shared_ptr Parse() override; - - std::shared_ptr Parse(const MapTargetDevice &env) override; - - private: - struct Data; - std::shared_ptr data_; -}; - -/// \brief Rotate TensorTransform. -/// \notes Rotate the input image using a specified angle id. -class Rotate final : public TensorTransform { - public: - /// \brief Constructor. - Rotate(); - - /// \brief Destructor. - ~Rotate() = default; - - protected: - /// \brief Function to convert TensorTransform object into a TensorOperation object. - /// \return Shared pointer to TensorOperation object. - std::shared_ptr Parse() override; - - private: - std::shared_ptr op_; -}; - -} // namespace vision -} // namespace dataset -} // namespace mindspore -#endif // MINDSPORE_CCSRC_MINDDATA_DATASET_INCLUDE_VISION_LITE_H_ diff --git a/mindspore/ccsrc/minddata/dataset/text/kernels/data_utils.h b/mindspore/ccsrc/minddata/dataset/text/kernels/data_utils.h index 3dfd87df60d..55e5802ece0 100644 --- a/mindspore/ccsrc/minddata/dataset/text/kernels/data_utils.h +++ b/mindspore/ccsrc/minddata/dataset/text/kernels/data_utils.h @@ -20,7 +20,7 @@ #include #include #include "minddata/dataset/util/status.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/core/data_type.h" #include "minddata/dataset/core/tensor.h" #include "minddata/dataset/core/cv_tensor.h" diff --git a/mindspore/ccsrc/minddata/dataset/text/kernels/jieba_tokenizer_op.h b/mindspore/ccsrc/minddata/dataset/text/kernels/jieba_tokenizer_op.h index 2f4f1f8d11f..2b80fa973c3 100644 --- a/mindspore/ccsrc/minddata/dataset/text/kernels/jieba_tokenizer_op.h +++ b/mindspore/ccsrc/minddata/dataset/text/kernels/jieba_tokenizer_op.h @@ -19,7 +19,7 @@ #include #include #include "cppjieba/Jieba.hpp" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/kernels/tensor_op.h" #include "minddata/dataset/util/status.h" diff --git a/mindspore/ccsrc/minddata/dataset/text/kernels/sentence_piece_tokenizer_op.h b/mindspore/ccsrc/minddata/dataset/text/kernels/sentence_piece_tokenizer_op.h index cca02199c19..3e1ce187f1c 100644 --- a/mindspore/ccsrc/minddata/dataset/text/kernels/sentence_piece_tokenizer_op.h +++ b/mindspore/ccsrc/minddata/dataset/text/kernels/sentence_piece_tokenizer_op.h @@ -23,7 +23,7 @@ #include #include -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/kernels/tensor_op.h" #include "minddata/dataset/util/status.h" #include "minddata/dataset/text/sentence_piece_vocab.h" diff --git a/mindspore/ccsrc/minddata/dataset/text/sentence_piece_vocab.h b/mindspore/ccsrc/minddata/dataset/text/sentence_piece_vocab.h index 1c6a678f6b6..4520c2b6040 100644 --- a/mindspore/ccsrc/minddata/dataset/text/sentence_piece_vocab.h +++ b/mindspore/ccsrc/minddata/dataset/text/sentence_piece_vocab.h @@ -22,7 +22,7 @@ #include #include #include "minddata/dataset/util/status.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" namespace mindspore { namespace dataset { diff --git a/mindspore/lite/CMakeLists.txt b/mindspore/lite/CMakeLists.txt index e5406d4f0a1..748bf646044 100644 --- a/mindspore/lite/CMakeLists.txt +++ b/mindspore/lite/CMakeLists.txt @@ -119,7 +119,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/runtime/kernel/arm) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/) include_directories(${TOP_DIR}/third_party) include_directories(${CMAKE_BINARY_DIR}) -include_directories(${CCSRC_DIR}/minddata/dataset/liteapi) +include_directories(${CCSRC_DIR}/minddata/dataset) include(${TOP_DIR}/cmake/utils.cmake) include(${TOP_DIR}/cmake/dependency_utils.cmake) diff --git a/mindspore/lite/examples/train_lenet/prepare_and_run.sh b/mindspore/lite/examples/train_lenet/prepare_and_run.sh index d2757f4d236..62e8f349973 100755 --- a/mindspore/lite/examples/train_lenet/prepare_and_run.sh +++ b/mindspore/lite/examples/train_lenet/prepare_and_run.sh @@ -85,8 +85,7 @@ cp scripts/*.sh ${PACKAGE}/ # Copy the shared MindSpore ToD library tar -xzf ${TARBALL} mv mindspore-*/train/lib ${PACKAGE}/ -mv mindspore-*/train/minddata/lib/* ${PACKAGE}/lib/ -mv mindspore-*/train/minddata/third_party/libjpeg-turbo/lib/* ${PACKAGE}/lib/ +mv mindspore-*/train/third_party/libjpeg-turbo/lib/* ${PACKAGE}/lib/ if [ "${TARGET}" == "arm64" ]; then tar -xzf ${TARBALL} --wildcards --no-anchored hiai_ddk mv mindspore-*/train/third_party/hiai_ddk/lib/* ${PACKAGE}/lib/ diff --git a/mindspore/lite/examples/train_lenet/src/net_runner.cc b/mindspore/lite/examples/train_lenet/src/net_runner.cc index 50006373550..4b2ec6e64b2 100644 --- a/mindspore/lite/examples/train_lenet/src/net_runner.cc +++ b/mindspore/lite/examples/train_lenet/src/net_runner.cc @@ -29,9 +29,9 @@ #include "include/train/accuracy_metrics.h" #include "include/train/classification_train_accuracy_monitor.h" #include "src/utils.h" -#include "include/datasets.h" -#include "include/vision_lite.h" -#include "include/transforms.h" +#include "include/dataset/datasets.h" +#include "include/dataset/vision_lite.h" +#include "include/dataset/transforms.h" using mindspore::dataset::Dataset; using mindspore::dataset::Mnist; diff --git a/mindspore/lite/examples/train_lenet/src/net_runner.h b/mindspore/lite/examples/train_lenet/src/net_runner.h index eb9845255c5..f1b1b894413 100644 --- a/mindspore/lite/examples/train_lenet/src/net_runner.h +++ b/mindspore/lite/examples/train_lenet/src/net_runner.h @@ -26,7 +26,7 @@ #include "include/train/train_loop.h" #include "include/train/accuracy_metrics.h" #include "include/ms_tensor.h" -#include "include/datasets.h" +#include "include/dataset/datasets.h" #include "include/model.h" using mindspore::dataset::Dataset; diff --git a/mindspore/lite/examples/transfer_learning/prepare_and_run.sh b/mindspore/lite/examples/transfer_learning/prepare_and_run.sh index 21b12876706..a75b400dbd5 100755 --- a/mindspore/lite/examples/transfer_learning/prepare_and_run.sh +++ b/mindspore/lite/examples/transfer_learning/prepare_and_run.sh @@ -80,8 +80,7 @@ cp scripts/*.sh ${PACKAGE}/ # Copy the shared MindSpore ToD library tar -xzf ${TARBALL} mv mindspore-*/train/lib ${PACKAGE}/ -mv mindspore-*/train/minddata/lib/* ${PACKAGE}/lib/ -mv mindspore-*/train/minddata/third_party/libjpeg-turbo/lib/* ${PACKAGE}/lib/ +mv mindspore-*/train/third_party/libjpeg-turbo/lib/* ${PACKAGE}/lib/ if [ "${TARGET}" == "arm64" ]; then tar -xzf ${TARBALL} --wildcards --no-anchored hiai_ddk mv mindspore-*/train/third_party/hiai_ddk/lib/* ${PACKAGE}/lib/ diff --git a/mindspore/lite/minddata/CMakeLists.txt b/mindspore/lite/minddata/CMakeLists.txt index 4e7843d18db..50f95f4906c 100644 --- a/mindspore/lite/minddata/CMakeLists.txt +++ b/mindspore/lite/minddata/CMakeLists.txt @@ -102,6 +102,7 @@ AUX_SOURCE_DIRECTORY(${MINDDATA_DIR}/kernels/image/lite_cv MINDDATA_KERNELS_IMA AUX_SOURCE_DIRECTORY(${MINDDATA_DIR}/kernels/ir MINDDATA_KERNELS_IR_SRC_FILES) if(BUILD_MINDDATA STREQUAL "full") + include_directories("${MINDDATA_DIR}") include_directories("${MINDDATA_DIR}/kernels/image") include_directories("${MINDDATA_DIR}/liteapi") include_directories("${TOP_DIR}") diff --git a/mindspore/lite/minddata/example/CMakeLists.txt b/mindspore/lite/minddata/example/CMakeLists.txt index e4745bb5835..a5ac3ac6288 100644 --- a/mindspore/lite/minddata/example/CMakeLists.txt +++ b/mindspore/lite/minddata/example/CMakeLists.txt @@ -4,10 +4,8 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -fPIC -std=c++17") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-sign-compare") -set(MD_DIR "${CMAKE_CURRENT_SOURCE_DIR}/mindspore-lite-1.2.0-inference-linux-x64/minddata") -set(MS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/mindspore-lite-1.2.0-inference-linux-x64/") +set(MS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/mindspore-lite-1.2.0-inference-linux-x64/inference") -include_directories(${MD_DIR}) include_directories(${MS_DIR}) @@ -16,9 +14,9 @@ add_executable(testlenet ) target_link_libraries(testlenet - ${MD_DIR}/lib/libminddata-lite.so - ${MD_DIR}/third_party/libjpeg-turbo/lib/libjpeg.so.62 - ${MD_DIR}/third_party/libjpeg-turbo/lib/libturbojpeg.so.0 + ${MS_DIR}/lib/libminddata-lite.so + ${MS_DIR}/third_party/libjpeg-turbo/lib/libjpeg.so.62 + ${MS_DIR}/third_party/libjpeg-turbo/lib/libturbojpeg.so.0 ${MS_DIR}/lib/libmindspore-lite.so pthread) @@ -27,8 +25,8 @@ add_executable(testresize ) target_link_libraries(testresize - ${MD_DIR}/lib/libminddata-lite.so - ${MD_DIR}/third_party/libjpeg-turbo/lib/libjpeg.so.62 - ${MD_DIR}/third_party/libjpeg-turbo/lib/libturbojpeg.so.0 + ${MS_DIR}/lib/libminddata-lite.so + ${MS_DIR}/third_party/libjpeg-turbo/lib/libjpeg.so.62 + ${MS_DIR}/third_party/libjpeg-turbo/lib/libturbojpeg.so.0 ${MS_DIR}/lib/libmindspore-lite.so pthread) \ No newline at end of file diff --git a/mindspore/lite/minddata/example/testlenet.cpp b/mindspore/lite/minddata/example/testlenet.cpp index cb7b2ed5d51..7b9ce56b365 100644 --- a/mindspore/lite/minddata/example/testlenet.cpp +++ b/mindspore/lite/minddata/example/testlenet.cpp @@ -24,10 +24,10 @@ #include #include -#include "include/datasets.h" -#include "include/iterator.h" -#include "include/vision_lite.h" -#include "include/transforms.h" +#include "include/dataset/datasets.h" +#include "include/dataset/iterator.h" +#include "include/dataset/vision_lite.h" +#include "include/dataset/transforms.h" #include "include/api/types.h" using mindspore::dataset::Dataset; diff --git a/mindspore/lite/minddata/example/testresize.cpp b/mindspore/lite/minddata/example/testresize.cpp index d54dc93f1b1..a751340f6f9 100644 --- a/mindspore/lite/minddata/example/testresize.cpp +++ b/mindspore/lite/minddata/example/testresize.cpp @@ -26,10 +26,10 @@ #include #include -#include "include/datasets.h" -#include "include/iterator.h" -#include "include/vision_lite.h" -#include "include/transforms.h" +#include "include/dataset/datasets.h" +#include "include/dataset/iterator.h" +#include "include/dataset/vision_lite.h" +#include "include/dataset/transforms.h" #include "include/api/types.h" using mindspore::dataset::Album; diff --git a/mindspore/lite/minddata/wrapper/MDToDApi.cc b/mindspore/lite/minddata/wrapper/MDToDApi.cc index 642ddb35816..44ff25105c1 100644 --- a/mindspore/lite/minddata/wrapper/MDToDApi.cc +++ b/mindspore/lite/minddata/wrapper/MDToDApi.cc @@ -25,11 +25,11 @@ #include #include "album_op_android.h" //NOLINT -#include "minddata/dataset/include/execute.h" -#include "minddata/dataset/include/type_id.h" +#include "minddata/dataset/include/dataset/execute.h" +#include "minddata/dataset/include/dataset/type_id.h" #include "minddata/dataset/util/path.h" -#include "minddata/dataset/include/vision.h" -#include "minddata/dataset/include/data_helper.h" +#include "minddata/dataset/include/dataset/vision.h" +#include "minddata/dataset/include/dataset/data_helper.h" #include "minddata/dataset/core/de_tensor.h" #include "include/api/types.h" #if defined(__ANDROID__) || defined(ANDROID) diff --git a/mindspore/lite/minddata/wrapper/jni-example.cc b/mindspore/lite/minddata/wrapper/jni-example.cc index ed6b58725bc..0622f906760 100644 --- a/mindspore/lite/minddata/wrapper/jni-example.cc +++ b/mindspore/lite/minddata/wrapper/jni-example.cc @@ -19,7 +19,7 @@ #include #include #include -#include "minddata/dataset/include/datasets.h" +#include "minddata/dataset/include/dataset/datasets.h" #include "minddata/dataset/util/path.h" #if defined(__ANDROID__) || defined(ANDROID) #include diff --git a/mindspore/lite/minddata/wrapper/x86-example.cc b/mindspore/lite/minddata/wrapper/x86-example.cc index 9b51789daa7..97c4a897d19 100644 --- a/mindspore/lite/minddata/wrapper/x86-example.cc +++ b/mindspore/lite/minddata/wrapper/x86-example.cc @@ -16,7 +16,7 @@ #include #include -#include "minddata/dataset/include/datasets.h" +#include "minddata/dataset/include/dataset/datasets.h" using Dataset = mindspore::dataset::Dataset; using Iterator = mindspore::dataset::Iterator; diff --git a/mindspore/lite/src/train/train_loop.cc b/mindspore/lite/src/train/train_loop.cc index fd4b26525c7..0455712febb 100644 --- a/mindspore/lite/src/train/train_loop.cc +++ b/mindspore/lite/src/train/train_loop.cc @@ -21,7 +21,7 @@ #include #include "include/errorcode.h" #include "include/train/train_session.h" -#include "include/iterator.h" +#include "include/dataset/iterator.h" #include "src/common/log_adapter.h" namespace mindspore { diff --git a/mindspore/lite/src/train/train_loop.h b/mindspore/lite/src/train/train_loop.h index a1d3170e9f7..0e4fee84f94 100644 --- a/mindspore/lite/src/train/train_loop.h +++ b/mindspore/lite/src/train/train_loop.h @@ -23,8 +23,8 @@ #include "include/errorcode.h" #include "include/train/train_loop.h" #include "include/train/metrics.h" -#include "include/datasets.h" -#include "include/iterator.h" +#include "include/dataset/datasets.h" +#include "include/dataset/iterator.h" #include "src/common/log_adapter.h" namespace mindspore { diff --git a/mindspore/lite/test/run_benchmark_nets.sh b/mindspore/lite/test/run_benchmark_nets.sh index b051931521c..0b57f3bc387 100644 --- a/mindspore/lite/test/run_benchmark_nets.sh +++ b/mindspore/lite/test/run_benchmark_nets.sh @@ -408,7 +408,7 @@ function Run_Converter() { function Run_x86() { echo 'cd '${x86_path}'/mindspore-lite-'${version}'-inference-linux-x64' >> "${run_x86_log_file}" cd ${x86_path}/mindspore-lite-${version}-inference-linux-x64 || return 1 - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./inference/lib:./inference/minddata/lib + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./inference/lib cp tools/benchmark/benchmark ./ || exit 1 # Run tf converted models: @@ -717,7 +717,7 @@ function Run_x86_sse() { cd ${x86_path}/sse || exit 1 tar -zxf mindspore-lite-${version}-inference-linux-x64.tar.gz || exit 1 cd ${x86_path}/sse/mindspore-lite-${version}-inference-linux-x64 || return 1 - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./inference/lib:./inference/minddata/lib + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./inference/lib cp tools/benchmark/benchmark ./ || exit 1 # Run tflite converted models: @@ -989,7 +989,7 @@ function Run_x86_avx() { cd ${x86_path}/avx || exit 1 tar -zxf mindspore-lite-${version}-inference-linux-x64.tar.gz || exit 1 cd ${x86_path}/avx/mindspore-lite-${version}-inference-linux-x64 || return 1 - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./inference/lib:./inference/minddata/lib + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./inference/lib cp tools/benchmark/benchmark ./ || exit 1 # Run tflite converted models: @@ -1263,8 +1263,8 @@ function Run_arm64() { # If build with minddata, copy the minddata related libs cd ${benchmark_test_path} || exit 1 - if [ -f ${arm64_path}/mindspore-lite-${version}-inference-android-aarch64/inference/minddata/lib/libminddata-lite.so ]; then - cp -a ${arm64_path}/mindspore-lite-${version}-inference-android-aarch64/inference/minddata/lib/libminddata-lite.so ${benchmark_test_path}/libminddata-lite.so || exit 1 + if [ -f ${arm64_path}/mindspore-lite-${version}-inference-android-aarch64/inference/lib/libminddata-lite.so ]; then + cp -a ${arm64_path}/mindspore-lite-${version}-inference-android-aarch64/inference/lib/libminddata-lite.so ${benchmark_test_path}/libminddata-lite.so || exit 1 fi cp -a ${arm64_path}/mindspore-lite-${version}-inference-android-aarch64/inference/third_party/hiai_ddk/lib/libhiai.so ${benchmark_test_path}/libhiai.so || exit 1 cp -a ${arm64_path}/mindspore-lite-${version}-inference-android-aarch64/inference/third_party/hiai_ddk/lib/libhiai_ir.so ${benchmark_test_path}/libhiai_ir.so || exit 1 @@ -1684,8 +1684,8 @@ function Run_arm32() { # If build with minddata, copy the minddata related libs cd ${benchmark_test_path} || exit 1 - if [ -f ${arm32_path}/mindspore-lite-${version}-inference-android-aarch32/inference/minddata/lib/libminddata-lite.so ]; then - cp -a ${arm32_path}/mindspore-lite-${version}-inference-android-aarch32/inference/minddata/lib/libminddata-lite.so ${benchmark_test_path}/libminddata-lite.so || exit 1 + if [ -f ${arm32_path}/mindspore-lite-${version}-inference-android-aarch32/inference/lib/libminddata-lite.so ]; then + cp -a ${arm32_path}/mindspore-lite-${version}-inference-android-aarch32/inference/lib/libminddata-lite.so ${benchmark_test_path}/libminddata-lite.so || exit 1 fi cp -a ${arm32_path}/mindspore-lite-${version}-inference-android-aarch32/inference/lib/libmindspore-lite.so ${benchmark_test_path}/libmindspore-lite.so || exit 1 @@ -1738,8 +1738,8 @@ function Run_arm64_fp16() { # If build with minddata, copy the minddata related libs cd ${benchmark_test_path} || exit 1 - if [ -f ${arm64_path}/mindspore-lite-${version}-inference-android-aarch64/inference/minddata/lib/libminddata-lite.so ]; then - cp -a ${arm64_path}/mindspore-lite-${version}-inference-android-aarch64/inference/minddata/lib/libminddata-lite.so ${benchmark_test_path}/libminddata-lite.so || exit 1 + if [ -f ${arm64_path}/mindspore-lite-${version}-inference-android-aarch64/inference/lib/libminddata-lite.so ]; then + cp -a ${arm64_path}/mindspore-lite-${version}-inference-android-aarch64/inference/lib/libminddata-lite.so ${benchmark_test_path}/libminddata-lite.so || exit 1 fi cp -a ${arm64_path}/mindspore-lite-${version}-inference-android-aarch64/inference/third_party/hiai_ddk/lib/libhiai.so ${benchmark_test_path}/libhiai.so || exit 1 cp -a ${arm64_path}/mindspore-lite-${version}-inference-android-aarch64/inference/third_party/hiai_ddk/lib/libhiai_ir.so ${benchmark_test_path}/libhiai_ir.so || exit 1 @@ -2084,8 +2084,8 @@ function Run_gpu() { # If build with minddata, copy the minddata related libs cd ${benchmark_test_path} || exit 1 - if [ -f ${arm64_path}/mindspore-lite-${version}-inference-android-aarch64/inference/minddata/lib/libminddata-lite.so ]; then - cp -a ${arm64_path}/mindspore-lite-${version}-inference-android-aarch64/inference/minddata/lib/libminddata-lite.so ${benchmark_test_path}/libminddata-lite.so || exit 1 + if [ -f ${arm64_path}/mindspore-lite-${version}-inference-android-aarch64/inference/lib/libminddata-lite.so ]; then + cp -a ${arm64_path}/mindspore-lite-${version}-inference-android-aarch64/inference/lib/libminddata-lite.so ${benchmark_test_path}/libminddata-lite.so || exit 1 fi cp -a ${arm64_path}/mindspore-lite-${version}-inference-android-aarch64/inference/third_party/hiai_ddk/lib/libhiai.so ${benchmark_test_path}/libhiai.so || exit 1 cp -a ${arm64_path}/mindspore-lite-${version}-inference-android-aarch64/inference/third_party/hiai_ddk/lib/libhiai_ir.so ${benchmark_test_path}/libhiai_ir.so || exit 1 @@ -2236,8 +2236,8 @@ function Run_npu() { # If build with minddata, copy the minddata related libs cd ${benchmark_test_path} || exit 1 - if [ -f ${arm64_path}/mindspore-lite-${version}-inference-android-aarch64/inference/minddata/lib/libminddata-lite.so ]; then - cp -a ${arm64_path}/mindspore-lite-${version}-inference-android-aarch64/inference/minddata/lib/libminddata-lite.so ${benchmark_test_path}/libminddata-lite.so || exit 1 + if [ -f ${arm64_path}/mindspore-lite-${version}-inference-android-aarch64/inference/lib/libminddata-lite.so ]; then + cp -a ${arm64_path}/mindspore-lite-${version}-inference-android-aarch64/inference/lib/libminddata-lite.so ${benchmark_test_path}/libminddata-lite.so || exit 1 fi cp -a ${arm64_path}/mindspore-lite-${version}-inference-android-aarch64/inference/third_party/hiai_ddk/lib/libhiai.so ${benchmark_test_path}/libhiai.so || exit 1 cp -a ${arm64_path}/mindspore-lite-${version}-inference-android-aarch64/inference/third_party/hiai_ddk/lib/libhiai_ir.so ${benchmark_test_path}/libhiai_ir.so || exit 1 diff --git a/mindspore/lite/test/run_net_train.sh b/mindspore/lite/test/run_net_train.sh index 4c847020286..3824cf0bf25 100755 --- a/mindspore/lite/test/run_net_train.sh +++ b/mindspore/lite/test/run_net_train.sh @@ -74,7 +74,7 @@ function Run_Converter() { # Run on x86 platform: function Run_x86() { cd ${x86_path}/mindspore-lite-${version}-train-linux-x64 || return 1 - export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:./train/lib:./train/minddata/lib:./train/minddata/third_party/libjpeg-turbo/lib + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:./train/lib:./train/third_party/libjpeg-turbo/lib # Run mindspore converted train models: fail=0 while read line; do @@ -137,10 +137,10 @@ function Run_arm() { # If build with minddata, copy the minddata related libs cd ${benchmark_train_test_path} || exit 1 - if [ -f ${arm_path}/mindspore-lite-${version_arm}-train-android-${process_unit}/train/minddata/lib/libminddata-lite.so ]; then - cp -a ${arm_path}/mindspore-lite-${version_arm}-train-android-${process_unit}/train/minddata/third_party/libjpeg-turbo/lib/libjpeg.so ${benchmark_train_test_path}/libjpeg.so || exit 1 - cp -a ${arm_path}/mindspore-lite-${version_arm}-train-android-${process_unit}/train/minddata/third_party/libjpeg-turbo/lib/libturbojpeg.so ${benchmark_train_test_path}/libturbojpeg.so || exit 1 - cp -a ${arm_path}/mindspore-lite-${version_arm}-train-android-${process_unit}/train/minddata/lib/libminddata-lite.so ${benchmark_train_test_path}/libminddata-lite.so || exit 1 + if [ -f ${arm_path}/mindspore-lite-${version_arm}-train-android-${process_unit}/train/lib/libminddata-lite.so ]; then + cp -a ${arm_path}/mindspore-lite-${version_arm}-train-android-${process_unit}/train/third_party/libjpeg-turbo/lib/libjpeg.so ${benchmark_train_test_path}/libjpeg.so || exit 1 + cp -a ${arm_path}/mindspore-lite-${version_arm}-train-android-${process_unit}/train/third_party/libjpeg-turbo/lib/libturbojpeg.so ${benchmark_train_test_path}/libturbojpeg.so || exit 1 + cp -a ${arm_path}/mindspore-lite-${version_arm}-train-android-${process_unit}/train/lib/libminddata-lite.so ${benchmark_train_test_path}/libminddata-lite.so || exit 1 fi if [ "$1" == arm64 ]; then cp -a ${arm_path}/mindspore-lite-${version_arm}-train-android-${process_unit}/train/third_party/hiai_ddk/lib/libhiai.so ${benchmark_train_test_path}/libhiai.so || exit 1 diff --git a/mindspore/lite/test/ut/src/dataset/eager_test.cc b/mindspore/lite/test/ut/src/dataset/eager_test.cc index 0d5eba5088b..66d4e74df7d 100644 --- a/mindspore/lite/test/ut/src/dataset/eager_test.cc +++ b/mindspore/lite/test/ut/src/dataset/eager_test.cc @@ -17,11 +17,11 @@ #include "common/common_test.h" #include "gtest/gtest.h" #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/include/dataset/tensor.h" +#include "minddata/dataset/include/dataset/datasets.h" +#include "minddata/dataset/include/dataset/transforms.h" +#include "minddata/dataset/include/dataset/vision.h" +#include "minddata/dataset/include/dataset/execute.h" #include "minddata/dataset/util/path.h" #include "mindspore/lite/src/common/log_adapter.h" #include "include/api/types.h" diff --git a/model_zoo/official/cv/crnn/ascend310_infer/src/main.cc b/model_zoo/official/cv/crnn/ascend310_infer/src/main.cc index 63f01ee1006..d2f836d9076 100644 --- a/model_zoo/official/cv/crnn/ascend310_infer/src/main.cc +++ b/model_zoo/official/cv/crnn/ascend310_infer/src/main.cc @@ -28,9 +28,9 @@ #include "include/api/context.h" #include "include/api/serialization.h" #include "include/api/types.h" -#include "include/minddata/dataset/include/vision.h" -#include "include/minddata/dataset/include/execute.h" -#include "minddata/dataset/include/vision.h" +#include "include/minddata/dataset/include/dataset/vision.h" +#include "include/minddata/dataset/include/dataset/execute.h" +#include "minddata/dataset/include/dataset/vision.h" #include "inc/utils.h" diff --git a/model_zoo/official/cv/ctpn/ascend310_infer/src/main.cc b/model_zoo/official/cv/ctpn/ascend310_infer/src/main.cc index ed15f7b4d1b..026e62329a0 100644 --- a/model_zoo/official/cv/ctpn/ascend310_infer/src/main.cc +++ b/model_zoo/official/cv/ctpn/ascend310_infer/src/main.cc @@ -26,10 +26,10 @@ #include #include "../inc/utils.h" -#include "minddata/dataset/include/execute.h" -#include "minddata/dataset/include/transforms.h" -#include "minddata/dataset/include/vision.h" -#include "minddata/dataset/include/vision_ascend.h" +#include "minddata/dataset/include/dataset/execute.h" +#include "minddata/dataset/include/dataset/transforms.h" +#include "minddata/dataset/include/dataset/vision.h" +#include "minddata/dataset/include/dataset/vision_ascend.h" #include "include/api/types.h" #include "include/api/model.h" #include "include/api/serialization.h" diff --git a/model_zoo/official/cv/deeplabv3/ascend310_infer/src/main.cc b/model_zoo/official/cv/deeplabv3/ascend310_infer/src/main.cc index 6064c7a7cc1..82612373e43 100644 --- a/model_zoo/official/cv/deeplabv3/ascend310_infer/src/main.cc +++ b/model_zoo/official/cv/deeplabv3/ascend310_infer/src/main.cc @@ -28,8 +28,8 @@ #include "include/api/model.h" #include "include/api/types.h" #include "include/api/serialization.h" -#include "include/minddata/dataset/include/vision.h" -#include "include/minddata/dataset/include/execute.h" +#include "include/minddata/dataset/include/dataset/vision.h" +#include "include/minddata/dataset/include/dataset/execute.h" #include "../inc/utils.h" using mindspore::Context; diff --git a/model_zoo/official/cv/deeptext/ascend310_infer/src/main.cc b/model_zoo/official/cv/deeptext/ascend310_infer/src/main.cc index 66532a03b7e..2bbe5448fac 100644 --- a/model_zoo/official/cv/deeptext/ascend310_infer/src/main.cc +++ b/model_zoo/official/cv/deeptext/ascend310_infer/src/main.cc @@ -26,10 +26,10 @@ #include #include "../inc/utils.h" -#include "minddata/dataset/include/execute.h" -#include "minddata/dataset/include/transforms.h" -#include "minddata/dataset/include/vision.h" -#include "minddata/dataset/include/vision_ascend.h" +#include "minddata/dataset/include/dataset/execute.h" +#include "minddata/dataset/include/dataset/transforms.h" +#include "minddata/dataset/include/dataset/vision.h" +#include "minddata/dataset/include/dataset/vision_ascend.h" #include "include/api/types.h" #include "include/api/model.h" #include "include/api/serialization.h" diff --git a/model_zoo/official/cv/resnet/ascend310_infer/src/main.cc b/model_zoo/official/cv/resnet/ascend310_infer/src/main.cc index 5bfaf218f03..84a1c29ae6a 100644 --- a/model_zoo/official/cv/resnet/ascend310_infer/src/main.cc +++ b/model_zoo/official/cv/resnet/ascend310_infer/src/main.cc @@ -28,10 +28,10 @@ #include "include/api/context.h" #include "include/api/types.h" #include "include/api/serialization.h" -#include "minddata/dataset/include/vision_ascend.h" -#include "minddata/dataset/include/execute.h" -#include "minddata/dataset/include/transforms.h" -#include "minddata/dataset/include/vision.h" +#include "minddata/dataset/include/dataset/vision_ascend.h" +#include "minddata/dataset/include/dataset/execute.h" +#include "minddata/dataset/include/dataset/transforms.h" +#include "minddata/dataset/include/dataset/vision.h" #include "inc/utils.h" using mindspore::dataset::vision::Decode; diff --git a/model_zoo/official/cv/ssd/ascend310_infer/src/main.cc b/model_zoo/official/cv/ssd/ascend310_infer/src/main.cc index 6a361815d22..533f3251f30 100644 --- a/model_zoo/official/cv/ssd/ascend310_infer/src/main.cc +++ b/model_zoo/official/cv/ssd/ascend310_infer/src/main.cc @@ -28,9 +28,9 @@ #include "include/api/context.h" #include "include/api/types.h" #include "include/api/serialization.h" -#include "include/minddata/dataset/include/vision_ascend.h" -#include "include/minddata/dataset/include/execute.h" -#include "include/minddata/dataset/include/vision.h" +#include "include/minddata/dataset/include/dataset/vision_ascend.h" +#include "include/minddata/dataset/include/dataset/execute.h" +#include "include/minddata/dataset/include/dataset/vision.h" #include "inc/utils.h" using mindspore::Context; diff --git a/model_zoo/official/cv/unet/ascend310_infer/src/main.cc b/model_zoo/official/cv/unet/ascend310_infer/src/main.cc index cfb4e971a45..8e8742e9aae 100644 --- a/model_zoo/official/cv/unet/ascend310_infer/src/main.cc +++ b/model_zoo/official/cv/unet/ascend310_infer/src/main.cc @@ -28,8 +28,8 @@ #include "include/api/model.h" #include "include/api/serialization.h" #include "include/api/context.h" -#include "include/minddata/dataset/include/execute.h" -#include "include/minddata/dataset/include/vision.h" +#include "include/minddata/dataset/include/dataset/execute.h" +#include "include/minddata/dataset/include/dataset/vision.h" #include "../inc/utils.h" #include "include/api/types.h" diff --git a/model_zoo/official/cv/yolov4/ascend310_infer/src/main.cc b/model_zoo/official/cv/yolov4/ascend310_infer/src/main.cc index 11bf2a836be..4971fba68ab 100644 --- a/model_zoo/official/cv/yolov4/ascend310_infer/src/main.cc +++ b/model_zoo/official/cv/yolov4/ascend310_infer/src/main.cc @@ -28,8 +28,8 @@ #include "include/api/model.h" #include "include/api/serialization.h" #include "include/api/context.h" -#include "include/minddata/dataset/include/execute.h" -#include "include/minddata/dataset/include/vision_ascend.h" +#include "include/minddata/dataset/include/dataset/execute.h" +#include "include/minddata/dataset/include/dataset/vision_ascend.h" #include "../inc/utils.h" #include "include/api/types.h" diff --git a/tests/st/cpp/CMakeLists.txt b/tests/st/cpp/CMakeLists.txt index e92887e4c22..5ae2a787825 100644 --- a/tests/st/cpp/CMakeLists.txt +++ b/tests/st/cpp/CMakeLists.txt @@ -3,6 +3,7 @@ include_directories(${MS_CCSRC_PATH}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/stub/runtime/) include_directories(${CMAKE_SOURCE_DIR}/mindspore/ccsrc) +include_directories(${CMAKE_SOURCE_DIR}/mindspore/ccsrc/minddata/dataset) include_directories(${CMAKE_SOURCE_DIR}/mindspore/core) include_directories(${CMAKE_BINARY_DIR}) include_directories(${CUDA_INCLUDE_DIRS}) diff --git a/tests/st/cpp/dataset/test_de.cc b/tests/st/cpp/dataset/test_de.cc index 79e6c7b083c..f55e92edadc 100644 --- a/tests/st/cpp/dataset/test_de.cc +++ b/tests/st/cpp/dataset/test_de.cc @@ -18,11 +18,11 @@ #include #include "common/common_test.h" #include "include/api/types.h" -#include "minddata/dataset/include/execute.h" -#include "minddata/dataset/include/transforms.h" -#include "minddata/dataset/include/vision.h" +#include "minddata/dataset/include/dataset/execute.h" +#include "minddata/dataset/include/dataset/transforms.h" +#include "minddata/dataset/include/dataset/vision.h" #ifdef ENABLE_ACL -#include "minddata/dataset/include/vision_ascend.h" +#include "minddata/dataset/include/dataset/vision_ascend.h" #endif #include "minddata/dataset/kernels/tensor_op.h" #include "include/api/model.h" diff --git a/tests/st/cpp/model/test_zero_copy.cc b/tests/st/cpp/model/test_zero_copy.cc index 892412a2ce2..4b68ee86192 100644 --- a/tests/st/cpp/model/test_zero_copy.cc +++ b/tests/st/cpp/model/test_zero_copy.cc @@ -21,11 +21,11 @@ #include #include "common/common_test.h" #include "include/api/types.h" -#include "minddata/dataset/include/execute.h" -#include "minddata/dataset/include/transforms.h" -#include "minddata/dataset/include/vision.h" +#include "minddata/dataset/include/dataset/execute.h" +#include "minddata/dataset/include/dataset/transforms.h" +#include "minddata/dataset/include/dataset/vision.h" #ifdef ENABLE_ACL -#include "minddata/dataset/include/vision_ascend.h" +#include "minddata/dataset/include/dataset/vision_ascend.h" #endif #include "minddata/dataset/kernels/tensor_op.h" #include "include/api/model.h" diff --git a/tests/ut/cpp/CMakeLists.txt b/tests/ut/cpp/CMakeLists.txt index 323fe53b1f8..e4c630c178e 100644 --- a/tests/ut/cpp/CMakeLists.txt +++ b/tests/ut/cpp/CMakeLists.txt @@ -35,6 +35,7 @@ if(ENABLE_MINDDATA) endif() # fetch ut test files if(ENABLE_MINDDATA) + include_directories(${CMAKE_SOURCE_DIR}/mindspore/ccsrc/minddata/dataset) include_directories(${CMAKE_SOURCE_DIR}/mindspore/ccsrc/minddata/dataset/kernels/image) file(GLOB_RECURSE UT_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ./stub/*.cc diff --git a/tests/ut/cpp/dataset/album_op_test.cc b/tests/ut/cpp/dataset/album_op_test.cc index 072ee69c264..f20357820bb 100644 --- a/tests/ut/cpp/dataset/album_op_test.cc +++ b/tests/ut/cpp/dataset/album_op_test.cc @@ -23,8 +23,8 @@ #include "gtest/gtest.h" #include "utils/log_adapter.h" #include "securec.h" -#include "minddata/dataset/include/datasets.h" -#include "minddata/dataset/include/transforms.h" +#include "minddata/dataset/include/dataset/datasets.h" +#include "minddata/dataset/include/dataset/transforms.h" using namespace mindspore::dataset; using mindspore::MsLogLevel::ERROR; diff --git a/tests/ut/cpp/dataset/bit_functions_test.cc b/tests/ut/cpp/dataset/bit_functions_test.cc index 252aa1b8245..ca011174e62 100644 --- a/tests/ut/cpp/dataset/bit_functions_test.cc +++ b/tests/ut/cpp/dataset/bit_functions_test.cc @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "common/common.h" using namespace mindspore::dataset; diff --git a/tests/ut/cpp/dataset/c_api_cache_test.cc b/tests/ut/cpp/dataset/c_api_cache_test.cc index 082386a17ea..7da53774817 100644 --- a/tests/ut/cpp/dataset/c_api_cache_test.cc +++ b/tests/ut/cpp/dataset/c_api_cache_test.cc @@ -14,8 +14,8 @@ * limitations under the License. */ #include "common/common.h" -#include "minddata/dataset/include/datasets.h" -#include "minddata/dataset/include/vision.h" +#include "minddata/dataset/include/dataset/datasets.h" +#include "minddata/dataset/include/dataset/vision.h" using namespace mindspore::dataset; diff --git a/tests/ut/cpp/dataset/c_api_dataset_album_test.cc b/tests/ut/cpp/dataset/c_api_dataset_album_test.cc index 3f43eaefa8e..7bf9ff715de 100644 --- a/tests/ut/cpp/dataset/c_api_dataset_album_test.cc +++ b/tests/ut/cpp/dataset/c_api_dataset_album_test.cc @@ -14,7 +14,7 @@ * limitations under the License. */ #include "common/common.h" -#include "minddata/dataset/include/datasets.h" +#include "minddata/dataset/include/dataset/datasets.h" using namespace mindspore::dataset; using mindspore::dataset::Tensor; diff --git a/tests/ut/cpp/dataset/c_api_dataset_cifar_test.cc b/tests/ut/cpp/dataset/c_api_dataset_cifar_test.cc index 694fb4842be..3f3d2a40242 100644 --- a/tests/ut/cpp/dataset/c_api_dataset_cifar_test.cc +++ b/tests/ut/cpp/dataset/c_api_dataset_cifar_test.cc @@ -15,7 +15,7 @@ */ #include "common/common.h" -#include "minddata/dataset/include/datasets.h" +#include "minddata/dataset/include/dataset/datasets.h" using namespace mindspore::dataset; using mindspore::dataset::DataType; diff --git a/tests/ut/cpp/dataset/c_api_dataset_clue_test.cc b/tests/ut/cpp/dataset/c_api_dataset_clue_test.cc index c95a295a7e3..d5ac0103c03 100644 --- a/tests/ut/cpp/dataset/c_api_dataset_clue_test.cc +++ b/tests/ut/cpp/dataset/c_api_dataset_clue_test.cc @@ -15,7 +15,7 @@ */ #include "common/common.h" #include "minddata/dataset/core/global_context.h" -#include "minddata/dataset/include/datasets.h" +#include "minddata/dataset/include/dataset/datasets.h" using namespace mindspore::dataset; using mindspore::dataset::GlobalContext; diff --git a/tests/ut/cpp/dataset/c_api_dataset_coco_test.cc b/tests/ut/cpp/dataset/c_api_dataset_coco_test.cc index 598d855655f..8c6e5391cd2 100644 --- a/tests/ut/cpp/dataset/c_api_dataset_coco_test.cc +++ b/tests/ut/cpp/dataset/c_api_dataset_coco_test.cc @@ -14,7 +14,7 @@ * limitations under the License. */ #include "common/common.h" -#include "minddata/dataset/include/datasets.h" +#include "minddata/dataset/include/dataset/datasets.h" using namespace mindspore::dataset; using mindspore::dataset::dsize_t; diff --git a/tests/ut/cpp/dataset/c_api_dataset_config_test.cc b/tests/ut/cpp/dataset/c_api_dataset_config_test.cc index ac0685fb51b..864d90dfff7 100644 --- a/tests/ut/cpp/dataset/c_api_dataset_config_test.cc +++ b/tests/ut/cpp/dataset/c_api_dataset_config_test.cc @@ -15,8 +15,8 @@ */ #include "common/common.h" -#include "minddata/dataset/include/config.h" -#include "minddata/dataset/include/datasets.h" +#include "minddata/dataset/include/dataset/config.h" +#include "minddata/dataset/include/dataset/datasets.h" using namespace mindspore::dataset; using mindspore::dataset::ShuffleMode; diff --git a/tests/ut/cpp/dataset/c_api_dataset_csv_test.cc b/tests/ut/cpp/dataset/c_api_dataset_csv_test.cc index bd69039a265..929569e6b49 100644 --- a/tests/ut/cpp/dataset/c_api_dataset_csv_test.cc +++ b/tests/ut/cpp/dataset/c_api_dataset_csv_test.cc @@ -15,7 +15,7 @@ */ #include "common/common.h" #include "minddata/dataset/core/global_context.h" -#include "minddata/dataset/include/datasets.h" +#include "minddata/dataset/include/dataset/datasets.h" // need for CsvRecord #include "minddata/dataset/engine/ir/datasetops/source/csv_node.h" diff --git a/tests/ut/cpp/dataset/c_api_dataset_iterator_test.cc b/tests/ut/cpp/dataset/c_api_dataset_iterator_test.cc index 0aae9c1519a..23a7fecc579 100644 --- a/tests/ut/cpp/dataset/c_api_dataset_iterator_test.cc +++ b/tests/ut/cpp/dataset/c_api_dataset_iterator_test.cc @@ -14,7 +14,7 @@ * limitations under the License. */ #include "common/common.h" -#include "minddata/dataset/include/datasets.h" +#include "minddata/dataset/include/dataset/datasets.h" using namespace mindspore::dataset; diff --git a/tests/ut/cpp/dataset/c_api_dataset_manifest_test.cc b/tests/ut/cpp/dataset/c_api_dataset_manifest_test.cc index cdd576ef86f..8e85ff05681 100644 --- a/tests/ut/cpp/dataset/c_api_dataset_manifest_test.cc +++ b/tests/ut/cpp/dataset/c_api_dataset_manifest_test.cc @@ -14,7 +14,7 @@ * limitations under the License. */ #include "common/common.h" -#include "minddata/dataset/include/datasets.h" +#include "minddata/dataset/include/dataset/datasets.h" using namespace mindspore::dataset; using mindspore::dataset::Tensor; diff --git a/tests/ut/cpp/dataset/c_api_dataset_minddata_test.cc b/tests/ut/cpp/dataset/c_api_dataset_minddata_test.cc index e5a354d2bc1..db5bbef0bd6 100644 --- a/tests/ut/cpp/dataset/c_api_dataset_minddata_test.cc +++ b/tests/ut/cpp/dataset/c_api_dataset_minddata_test.cc @@ -14,7 +14,7 @@ * limitations under the License. */ #include "common/common.h" -#include "minddata/dataset/include/datasets.h" +#include "minddata/dataset/include/dataset/datasets.h" #include "minddata/dataset/core/tensor.h" using namespace mindspore::dataset; diff --git a/tests/ut/cpp/dataset/c_api_dataset_ops_test.cc b/tests/ut/cpp/dataset/c_api_dataset_ops_test.cc index a53e253db12..4b13020eca7 100644 --- a/tests/ut/cpp/dataset/c_api_dataset_ops_test.cc +++ b/tests/ut/cpp/dataset/c_api_dataset_ops_test.cc @@ -17,8 +17,8 @@ #include "include/api/types.h" #include "minddata/dataset/core/tensor_row.h" #include "minddata/dataset/engine/ir/datasetops/dataset_node.h" -#include "minddata/dataset/include/datasets.h" -#include "minddata/dataset/include/vision.h" +#include "minddata/dataset/include/dataset/datasets.h" +#include "minddata/dataset/include/dataset/vision.h" using namespace mindspore::dataset; using mindspore::dataset::Tensor; diff --git a/tests/ut/cpp/dataset/c_api_dataset_randomdata_test.cc b/tests/ut/cpp/dataset/c_api_dataset_randomdata_test.cc index 089157e343d..3564b107229 100644 --- a/tests/ut/cpp/dataset/c_api_dataset_randomdata_test.cc +++ b/tests/ut/cpp/dataset/c_api_dataset_randomdata_test.cc @@ -14,7 +14,7 @@ * limitations under the License. */ #include "common/common.h" -#include "minddata/dataset/include/datasets.h" +#include "minddata/dataset/include/dataset/datasets.h" #include "minddata/dataset/core/global_context.h" #include "ir/dtype/type_id.h" diff --git a/tests/ut/cpp/dataset/c_api_dataset_save.cc b/tests/ut/cpp/dataset/c_api_dataset_save.cc index 34f429fea34..2e20d6c75fc 100644 --- a/tests/ut/cpp/dataset/c_api_dataset_save.cc +++ b/tests/ut/cpp/dataset/c_api_dataset_save.cc @@ -15,8 +15,8 @@ */ #include #include "common/common.h" -#include "minddata/dataset/include/datasets.h" -#include "minddata/dataset/include/transforms.h" +#include "minddata/dataset/include/dataset/datasets.h" +#include "minddata/dataset/include/dataset/transforms.h" using namespace mindspore::dataset; diff --git a/tests/ut/cpp/dataset/c_api_dataset_textfile_test.cc b/tests/ut/cpp/dataset/c_api_dataset_textfile_test.cc index 581998eb9d2..7f6827aabab 100644 --- a/tests/ut/cpp/dataset/c_api_dataset_textfile_test.cc +++ b/tests/ut/cpp/dataset/c_api_dataset_textfile_test.cc @@ -15,7 +15,7 @@ */ #include "common/common.h" #include "minddata/dataset/core/global_context.h" -#include "minddata/dataset/include/datasets.h" +#include "minddata/dataset/include/dataset/datasets.h" using namespace mindspore::dataset; diff --git a/tests/ut/cpp/dataset/c_api_dataset_tfrecord_test.cc b/tests/ut/cpp/dataset/c_api_dataset_tfrecord_test.cc index 37ec510f615..6fcaa5d2c74 100644 --- a/tests/ut/cpp/dataset/c_api_dataset_tfrecord_test.cc +++ b/tests/ut/cpp/dataset/c_api_dataset_tfrecord_test.cc @@ -14,8 +14,8 @@ * limitations under the License. */ #include "common/common.h" -#include "minddata/dataset/include/datasets.h" -#include "minddata/dataset/include/vision.h" +#include "minddata/dataset/include/dataset/datasets.h" +#include "minddata/dataset/include/dataset/vision.h" #include "minddata/dataset/core/global_context.h" using namespace mindspore::dataset; diff --git a/tests/ut/cpp/dataset/c_api_dataset_voc_test.cc b/tests/ut/cpp/dataset/c_api_dataset_voc_test.cc index 210410eda03..25887ccbf72 100644 --- a/tests/ut/cpp/dataset/c_api_dataset_voc_test.cc +++ b/tests/ut/cpp/dataset/c_api_dataset_voc_test.cc @@ -14,7 +14,7 @@ * limitations under the License. */ #include "common/common.h" -#include "minddata/dataset/include/datasets.h" +#include "minddata/dataset/include/dataset/datasets.h" #include "minddata/dataset/core/tensor.h" using namespace mindspore::dataset; diff --git a/tests/ut/cpp/dataset/c_api_datasets_test.cc b/tests/ut/cpp/dataset/c_api_datasets_test.cc index 0f19a1b522a..14bd21046de 100644 --- a/tests/ut/cpp/dataset/c_api_datasets_test.cc +++ b/tests/ut/cpp/dataset/c_api_datasets_test.cc @@ -14,7 +14,7 @@ * limitations under the License. */ #include "common/common.h" -#include "minddata/dataset/include/datasets.h" +#include "minddata/dataset/include/dataset/datasets.h" #include "minddata/dataset/core/tensor.h" using namespace mindspore::dataset; diff --git a/tests/ut/cpp/dataset/c_api_epoch_ctrl_test.cc b/tests/ut/cpp/dataset/c_api_epoch_ctrl_test.cc index fad4eb7ee3f..cbaec26f892 100644 --- a/tests/ut/cpp/dataset/c_api_epoch_ctrl_test.cc +++ b/tests/ut/cpp/dataset/c_api_epoch_ctrl_test.cc @@ -14,7 +14,7 @@ * limitations under the License. */ #include "common/common.h" -#include "minddata/dataset/include/datasets.h" +#include "minddata/dataset/include/dataset/datasets.h" using namespace mindspore::dataset; using mindspore::dataset::Tensor; diff --git a/tests/ut/cpp/dataset/c_api_pull_based_test.cc b/tests/ut/cpp/dataset/c_api_pull_based_test.cc index fb52a8ea71f..e4fbef37cde 100644 --- a/tests/ut/cpp/dataset/c_api_pull_based_test.cc +++ b/tests/ut/cpp/dataset/c_api_pull_based_test.cc @@ -14,7 +14,7 @@ * limitations under the License. */ #include "common/common.h" -#include "minddata/dataset/include/datasets.h" +#include "minddata/dataset/include/dataset/datasets.h" namespace common = mindspore::common; diff --git a/tests/ut/cpp/dataset/c_api_repeat_test.cc b/tests/ut/cpp/dataset/c_api_repeat_test.cc index b28e836e9c2..38fc0d68123 100644 --- a/tests/ut/cpp/dataset/c_api_repeat_test.cc +++ b/tests/ut/cpp/dataset/c_api_repeat_test.cc @@ -14,7 +14,7 @@ * limitations under the License. */ #include "common/common.h" -#include "minddata/dataset/include/datasets.h" +#include "minddata/dataset/include/dataset/datasets.h" using namespace mindspore::dataset; using mindspore::dataset::Tensor; diff --git a/tests/ut/cpp/dataset/c_api_samplers_test.cc b/tests/ut/cpp/dataset/c_api_samplers_test.cc index b8d156ecf57..d2c8347f4b2 100644 --- a/tests/ut/cpp/dataset/c_api_samplers_test.cc +++ b/tests/ut/cpp/dataset/c_api_samplers_test.cc @@ -16,7 +16,7 @@ #include "common/common.h" #include "minddata/dataset/engine/datasetops/source/sampler/sampler.h" #include "minddata/dataset/engine/ir/datasetops/source/samplers/samplers_ir.h" -#include "minddata/dataset/include/datasets.h" +#include "minddata/dataset/include/dataset/datasets.h" #include using namespace mindspore::dataset; diff --git a/tests/ut/cpp/dataset/c_api_text_sentence_piece_vocab_test.cc b/tests/ut/cpp/dataset/c_api_text_sentence_piece_vocab_test.cc index 2d5af630a2a..4668f641ca4 100644 --- a/tests/ut/cpp/dataset/c_api_text_sentence_piece_vocab_test.cc +++ b/tests/ut/cpp/dataset/c_api_text_sentence_piece_vocab_test.cc @@ -19,10 +19,10 @@ #include "common/common.h" #include "include/api/status.h" -#include "minddata/dataset/include/constants.h" -#include "minddata/dataset/include/datasets.h" -#include "minddata/dataset/include/text.h" -#include "minddata/dataset/include/transforms.h" +#include "minddata/dataset/include/dataset/constants.h" +#include "minddata/dataset/include/dataset/datasets.h" +#include "minddata/dataset/include/dataset/text.h" +#include "minddata/dataset/include/dataset/transforms.h" #include "minddata/dataset/text/sentence_piece_vocab.h" using namespace mindspore::dataset; diff --git a/tests/ut/cpp/dataset/c_api_text_test.cc b/tests/ut/cpp/dataset/c_api_text_test.cc index 350aed86d3c..6596833ae67 100644 --- a/tests/ut/cpp/dataset/c_api_text_test.cc +++ b/tests/ut/cpp/dataset/c_api_text_test.cc @@ -19,10 +19,10 @@ #include "common/common.h" #include "include/api/status.h" -#include "minddata/dataset/include/config.h" -#include "minddata/dataset/include/datasets.h" -#include "minddata/dataset/include/text.h" -#include "minddata/dataset/include/transforms.h" +#include "minddata/dataset/include/dataset/config.h" +#include "minddata/dataset/include/dataset/datasets.h" +#include "minddata/dataset/include/dataset/text.h" +#include "minddata/dataset/include/dataset/transforms.h" #include "minddata/dataset/text/vocab.h" using namespace mindspore::dataset; diff --git a/tests/ut/cpp/dataset/c_api_text_vocab_test.cc b/tests/ut/cpp/dataset/c_api_text_vocab_test.cc index d9a044a4a39..c597b3831c1 100644 --- a/tests/ut/cpp/dataset/c_api_text_vocab_test.cc +++ b/tests/ut/cpp/dataset/c_api_text_vocab_test.cc @@ -19,9 +19,9 @@ #include "common/common.h" #include "include/api/status.h" -#include "minddata/dataset/include/datasets.h" -#include "minddata/dataset/include/text.h" -#include "minddata/dataset/include/transforms.h" +#include "minddata/dataset/include/dataset/datasets.h" +#include "minddata/dataset/include/dataset/text.h" +#include "minddata/dataset/include/dataset/transforms.h" #include "minddata/dataset/text/vocab.h" using namespace mindspore::dataset; diff --git a/tests/ut/cpp/dataset/c_api_transforms_test.cc b/tests/ut/cpp/dataset/c_api_transforms_test.cc index d314895c04e..9b6b630532f 100644 --- a/tests/ut/cpp/dataset/c_api_transforms_test.cc +++ b/tests/ut/cpp/dataset/c_api_transforms_test.cc @@ -14,9 +14,9 @@ * limitations under the License. */ #include "common/common.h" -#include "minddata/dataset/include/datasets.h" -#include "minddata/dataset/include/transforms.h" -#include "minddata/dataset/include/vision.h" +#include "minddata/dataset/include/dataset/datasets.h" +#include "minddata/dataset/include/dataset/transforms.h" +#include "minddata/dataset/include/dataset/vision.h" #include "mindspore/ccsrc/minddata/dataset/core/tensor.h" #include "mindspore/ccsrc/minddata/dataset/core/data_type.h" diff --git a/tests/ut/cpp/dataset/c_api_vision_a_to_q_test.cc b/tests/ut/cpp/dataset/c_api_vision_a_to_q_test.cc index ae557ede4d2..f50c02b176c 100644 --- a/tests/ut/cpp/dataset/c_api_vision_a_to_q_test.cc +++ b/tests/ut/cpp/dataset/c_api_vision_a_to_q_test.cc @@ -14,9 +14,9 @@ * limitations under the License. */ #include "common/common.h" -#include "minddata/dataset/include/datasets.h" -#include "minddata/dataset/include/transforms.h" -#include "minddata/dataset/include/vision.h" +#include "minddata/dataset/include/dataset/datasets.h" +#include "minddata/dataset/include/dataset/transforms.h" +#include "minddata/dataset/include/dataset/vision.h" using namespace mindspore::dataset; using mindspore::dataset::BorderType; diff --git a/tests/ut/cpp/dataset/c_api_vision_affine_test.cc b/tests/ut/cpp/dataset/c_api_vision_affine_test.cc index a445b6ce8cd..7b432f06b18 100644 --- a/tests/ut/cpp/dataset/c_api_vision_affine_test.cc +++ b/tests/ut/cpp/dataset/c_api_vision_affine_test.cc @@ -14,9 +14,9 @@ * limitations under the License. */ #include "common/common.h" -#include "minddata/dataset/include/datasets.h" -#include "minddata/dataset/include/transforms.h" -#include "minddata/dataset/include/vision.h" +#include "minddata/dataset/include/dataset/datasets.h" +#include "minddata/dataset/include/dataset/transforms.h" +#include "minddata/dataset/include/dataset/vision.h" using namespace mindspore::dataset; using mindspore::dataset::InterpolationMode; diff --git a/tests/ut/cpp/dataset/c_api_vision_bounding_box_augment_test.cc b/tests/ut/cpp/dataset/c_api_vision_bounding_box_augment_test.cc index f5532d08e99..c6a88728a51 100644 --- a/tests/ut/cpp/dataset/c_api_vision_bounding_box_augment_test.cc +++ b/tests/ut/cpp/dataset/c_api_vision_bounding_box_augment_test.cc @@ -14,9 +14,9 @@ * limitations under the License. */ #include "common/common.h" -#include "minddata/dataset/include/datasets.h" -#include "minddata/dataset/include/transforms.h" -#include "minddata/dataset/include/vision.h" +#include "minddata/dataset/include/dataset/datasets.h" +#include "minddata/dataset/include/dataset/transforms.h" +#include "minddata/dataset/include/dataset/vision.h" using namespace mindspore::dataset; diff --git a/tests/ut/cpp/dataset/c_api_vision_r_to_z_test.cc b/tests/ut/cpp/dataset/c_api_vision_r_to_z_test.cc index be200a8cdb5..6d5870c4150 100644 --- a/tests/ut/cpp/dataset/c_api_vision_r_to_z_test.cc +++ b/tests/ut/cpp/dataset/c_api_vision_r_to_z_test.cc @@ -14,9 +14,9 @@ * limitations under the License. */ #include "common/common.h" -#include "minddata/dataset/include/datasets.h" -#include "minddata/dataset/include/transforms.h" -#include "minddata/dataset/include/vision.h" +#include "minddata/dataset/include/dataset/datasets.h" +#include "minddata/dataset/include/dataset/transforms.h" +#include "minddata/dataset/include/dataset/vision.h" using namespace mindspore::dataset; diff --git a/tests/ut/cpp/dataset/c_api_vision_random_subselect_policy_test.cc b/tests/ut/cpp/dataset/c_api_vision_random_subselect_policy_test.cc index 4fa72373b7f..41e14005802 100644 --- a/tests/ut/cpp/dataset/c_api_vision_random_subselect_policy_test.cc +++ b/tests/ut/cpp/dataset/c_api_vision_random_subselect_policy_test.cc @@ -14,9 +14,9 @@ * limitations under the License. */ #include "common/common.h" -#include "minddata/dataset/include/datasets.h" -#include "minddata/dataset/include/transforms.h" -#include "minddata/dataset/include/vision.h" +#include "minddata/dataset/include/dataset/datasets.h" +#include "minddata/dataset/include/dataset/transforms.h" +#include "minddata/dataset/include/dataset/vision.h" using namespace mindspore::dataset; diff --git a/tests/ut/cpp/dataset/c_api_vision_random_test.cc b/tests/ut/cpp/dataset/c_api_vision_random_test.cc index 16c4048363e..5979ea70755 100644 --- a/tests/ut/cpp/dataset/c_api_vision_random_test.cc +++ b/tests/ut/cpp/dataset/c_api_vision_random_test.cc @@ -14,10 +14,10 @@ * limitations under the License. */ #include "common/common.h" -#include "minddata/dataset/include/config.h" -#include "minddata/dataset/include/datasets.h" -#include "minddata/dataset/include/transforms.h" -#include "minddata/dataset/include/vision.h" +#include "minddata/dataset/include/dataset/config.h" +#include "minddata/dataset/include/dataset/datasets.h" +#include "minddata/dataset/include/dataset/transforms.h" +#include "minddata/dataset/include/dataset/vision.h" using namespace mindspore::dataset; using mindspore::dataset::InterpolationMode; diff --git a/tests/ut/cpp/dataset/c_api_vision_soft_dvpp_test.cc b/tests/ut/cpp/dataset/c_api_vision_soft_dvpp_test.cc index 14cd9a684b5..1abd31a6095 100644 --- a/tests/ut/cpp/dataset/c_api_vision_soft_dvpp_test.cc +++ b/tests/ut/cpp/dataset/c_api_vision_soft_dvpp_test.cc @@ -14,9 +14,9 @@ * limitations under the License. */ #include "common/common.h" -#include "minddata/dataset/include/datasets.h" -#include "minddata/dataset/include/transforms.h" -#include "minddata/dataset/include/vision.h" +#include "minddata/dataset/include/dataset/datasets.h" +#include "minddata/dataset/include/dataset/transforms.h" +#include "minddata/dataset/include/dataset/vision.h" using namespace mindspore::dataset; diff --git a/tests/ut/cpp/dataset/c_api_vision_uniform_aug_test.cc b/tests/ut/cpp/dataset/c_api_vision_uniform_aug_test.cc index 034cb4d54cd..eb566ad876d 100644 --- a/tests/ut/cpp/dataset/c_api_vision_uniform_aug_test.cc +++ b/tests/ut/cpp/dataset/c_api_vision_uniform_aug_test.cc @@ -14,9 +14,9 @@ * limitations under the License. */ #include "common/common.h" -#include "minddata/dataset/include/datasets.h" -#include "minddata/dataset/include/transforms.h" -#include "minddata/dataset/include/vision.h" +#include "minddata/dataset/include/dataset/datasets.h" +#include "minddata/dataset/include/dataset/transforms.h" +#include "minddata/dataset/include/dataset/vision.h" using namespace mindspore::dataset; diff --git a/tests/ut/cpp/dataset/common/bboxop_common.cc b/tests/ut/cpp/dataset/common/bboxop_common.cc index f5edd37b91a..0b612a653e7 100644 --- a/tests/ut/cpp/dataset/common/bboxop_common.cc +++ b/tests/ut/cpp/dataset/common/bboxop_common.cc @@ -28,7 +28,7 @@ #include "utils/ms_utils.h" #include "minddata/dataset/core/cv_tensor.h" #include "minddata/dataset/util/path.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "utils/log_adapter.h" using namespace mindspore::dataset; diff --git a/tests/ut/cpp/dataset/common/cvop_common.cc b/tests/ut/cpp/dataset/common/cvop_common.cc index 5c876bb7e12..adddb1ad41d 100644 --- a/tests/ut/cpp/dataset/common/cvop_common.cc +++ b/tests/ut/cpp/dataset/common/cvop_common.cc @@ -18,7 +18,7 @@ #include #include #include "cvop_common.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "utils/ms_utils.h" #include "minddata/dataset/core/cv_tensor.h" #include "utils/log_adapter.h" diff --git a/tests/ut/cpp/dataset/data_helper_test.cc b/tests/ut/cpp/dataset/data_helper_test.cc index 92b74badef2..b1ffefe6b71 100644 --- a/tests/ut/cpp/dataset/data_helper_test.cc +++ b/tests/ut/cpp/dataset/data_helper_test.cc @@ -30,7 +30,7 @@ #include "minddata/dataset/engine/datasetops/source/sampler/sequential_sampler.h" #include "minddata/dataset/engine/datasetops/source/sampler/subset_random_sampler.h" #include "minddata/dataset/engine/datasetops/source/sampler/weighted_random_sampler.h" -#include "minddata/dataset/include/data_helper.h" +#include "minddata/dataset/include/dataset/data_helper.h" #include "minddata/dataset/util/path.h" #include "minddata/dataset/util/status.h" #include "gtest/gtest.h" diff --git a/tests/ut/cpp/dataset/datatype_test.cc b/tests/ut/cpp/dataset/datatype_test.cc index f05ab612fc8..927d8779ff2 100644 --- a/tests/ut/cpp/dataset/datatype_test.cc +++ b/tests/ut/cpp/dataset/datatype_test.cc @@ -19,7 +19,7 @@ #include "common/common.h" #include "gtest/gtest.h" #include -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" using namespace mindspore::dataset; diff --git a/tests/ut/cpp/dataset/distributed_sampler_test.cc b/tests/ut/cpp/dataset/distributed_sampler_test.cc index 73c926552c2..fdc62788153 100644 --- a/tests/ut/cpp/dataset/distributed_sampler_test.cc +++ b/tests/ut/cpp/dataset/distributed_sampler_test.cc @@ -16,7 +16,7 @@ #include "common/common.h" #include "gtest/gtest.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/core/tensor.h" #include "minddata/dataset/engine/datasetops/source/sampler/sampler.h" diff --git a/tests/ut/cpp/dataset/dvpp_decode_jpeg_test.cc b/tests/ut/cpp/dataset/dvpp_decode_jpeg_test.cc index 5f0d37a250c..53d4001b97d 100644 --- a/tests/ut/cpp/dataset/dvpp_decode_jpeg_test.cc +++ b/tests/ut/cpp/dataset/dvpp_decode_jpeg_test.cc @@ -15,7 +15,7 @@ */ #include "common/common.h" #include "common/cvop_common.h" -#include "minddata/dataset/include/vision_ascend.h" +#include "minddata/dataset/include/dataset/vision_ascend.h" #include "minddata/dataset/kernels/image/dvpp/dvpp_decode_jpeg_op.h" #include "utils/log_adapter.h" diff --git a/tests/ut/cpp/dataset/execute_test.cc b/tests/ut/cpp/dataset/execute_test.cc index 971271398ef..d6f677a56aa 100644 --- a/tests/ut/cpp/dataset/execute_test.cc +++ b/tests/ut/cpp/dataset/execute_test.cc @@ -16,9 +16,9 @@ #include "common/common.h" #include "include/api/types.h" #include "minddata/dataset/core/de_tensor.h" -#include "minddata/dataset/include/execute.h" -#include "minddata/dataset/include/transforms.h" -#include "minddata/dataset/include/vision.h" +#include "minddata/dataset/include/dataset/execute.h" +#include "minddata/dataset/include/dataset/transforms.h" +#include "minddata/dataset/include/dataset/vision.h" #include "utils/log_adapter.h" using namespace mindspore::dataset; diff --git a/tests/ut/cpp/dataset/ir_callback_test.cc b/tests/ut/cpp/dataset/ir_callback_test.cc index 8a001deeb22..5bf753ecf42 100644 --- a/tests/ut/cpp/dataset/ir_callback_test.cc +++ b/tests/ut/cpp/dataset/ir_callback_test.cc @@ -23,8 +23,8 @@ #include "minddata/dataset/engine/datasetops/epoch_ctrl_op.h" #include "minddata/dataset/engine/datasetops/source/random_data_op.h" #include "minddata/dataset/engine/tree_adapter.h" -#include "minddata/dataset/include/datasets.h" -#include "minddata/dataset/include/transforms.h" +#include "minddata/dataset/include/dataset/datasets.h" +#include "minddata/dataset/include/dataset/transforms.h" #include "minddata/dataset/kernels/data/no_op.h" #include "utils/log_adapter.h" diff --git a/tests/ut/cpp/dataset/ir_tensor_op_fusion_pass_test.cc b/tests/ut/cpp/dataset/ir_tensor_op_fusion_pass_test.cc index a657ba3acf6..5e2a0d2b047 100644 --- a/tests/ut/cpp/dataset/ir_tensor_op_fusion_pass_test.cc +++ b/tests/ut/cpp/dataset/ir_tensor_op_fusion_pass_test.cc @@ -20,9 +20,9 @@ #include "minddata/dataset/engine/execution_tree.h" #include "minddata/dataset/engine/ir/datasetops/dataset_node.h" #include "minddata/dataset/engine/tree_adapter.h" -#include "minddata/dataset/include/datasets.h" -#include "minddata/dataset/include/transforms.h" -#include "minddata/dataset/include/vision.h" +#include "minddata/dataset/include/dataset/datasets.h" +#include "minddata/dataset/include/dataset/transforms.h" +#include "minddata/dataset/include/dataset/vision.h" #include "minddata/dataset/kernels/tensor_op.h" using namespace mindspore::dataset; diff --git a/tests/ut/cpp/dataset/ir_tree_adapter_test.cc b/tests/ut/cpp/dataset/ir_tree_adapter_test.cc index 488b7bf4767..3426a42a628 100644 --- a/tests/ut/cpp/dataset/ir_tree_adapter_test.cc +++ b/tests/ut/cpp/dataset/ir_tree_adapter_test.cc @@ -17,8 +17,8 @@ #include "minddata/dataset/engine/tree_adapter.h" #include "common/common.h" #include "minddata/dataset/core/tensor_row.h" -#include "minddata/dataset/include/datasets.h" -#include "minddata/dataset/include/transforms.h" +#include "minddata/dataset/include/dataset/datasets.h" +#include "minddata/dataset/include/dataset/transforms.h" // IR non-leaf nodes #include "minddata/dataset/engine/ir/datasetops/batch_node.h" diff --git a/tests/ut/cpp/dataset/optimization_pass_test.cc b/tests/ut/cpp/dataset/optimization_pass_test.cc index 01d0ad50ae7..a80c9ae75b5 100644 --- a/tests/ut/cpp/dataset/optimization_pass_test.cc +++ b/tests/ut/cpp/dataset/optimization_pass_test.cc @@ -24,9 +24,9 @@ #include "minddata/dataset/engine/ir/datasetops/map_node.h" #include "minddata/dataset/engine/opt/optional/tensor_op_fusion_pass.h" #include "minddata/dataset/engine/opt/post/auto_worker_pass.h" -#include "minddata/dataset/include/transforms.h" -#include "minddata/dataset/include/vision.h" -#include "minddata/dataset/include/vision_lite.h" +#include "minddata/dataset/include/dataset/transforms.h" +#include "minddata/dataset/include/dataset/vision.h" +#include "minddata/dataset/include/dataset/vision_lite.h" #include "minddata/dataset/kernels/ir/data/transforms_ir.h" #include "minddata/dataset/kernels/ir/vision/vision_ir.h" diff --git a/tests/ut/cpp/dataset/subset_random_sampler_test.cc b/tests/ut/cpp/dataset/subset_random_sampler_test.cc index 46a0f996371..57c6c2389ac 100644 --- a/tests/ut/cpp/dataset/subset_random_sampler_test.cc +++ b/tests/ut/cpp/dataset/subset_random_sampler_test.cc @@ -16,7 +16,7 @@ #include "common/common.h" #include "gtest/gtest.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/core/tensor.h" #include "minddata/dataset/engine/datasetops/source/sampler/sampler.h" diff --git a/tests/ut/cpp/dataset/subset_sampler_test.cc b/tests/ut/cpp/dataset/subset_sampler_test.cc index f6548d6f5c4..b1a71daf751 100644 --- a/tests/ut/cpp/dataset/subset_sampler_test.cc +++ b/tests/ut/cpp/dataset/subset_sampler_test.cc @@ -16,7 +16,7 @@ #include "common/common.h" #include "gtest/gtest.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/core/tensor.h" #include "minddata/dataset/engine/datasetops/source/sampler/sampler.h" diff --git a/tests/ut/cpp/dataset/tree_modifying_function_test.cc b/tests/ut/cpp/dataset/tree_modifying_function_test.cc index c79cfe4c77a..4e14bf40dd2 100644 --- a/tests/ut/cpp/dataset/tree_modifying_function_test.cc +++ b/tests/ut/cpp/dataset/tree_modifying_function_test.cc @@ -21,7 +21,7 @@ #include "minddata/dataset/engine/ir/datasetops/skip_node.h" #include "minddata/dataset/engine/ir/datasetops/take_node.h" #include "minddata/dataset/engine/ir/datasetops/repeat_node.h" -#include "minddata/dataset/include/datasets.h" +#include "minddata/dataset/include/dataset/datasets.h" using namespace mindspore::dataset; diff --git a/tests/ut/cpp/dataset/weighted_random_sampler_test.cc b/tests/ut/cpp/dataset/weighted_random_sampler_test.cc index 5390d9b82c9..aafe7eec9e1 100644 --- a/tests/ut/cpp/dataset/weighted_random_sampler_test.cc +++ b/tests/ut/cpp/dataset/weighted_random_sampler_test.cc @@ -16,7 +16,7 @@ #include "common/common.h" #include "gtest/gtest.h" -#include "minddata/dataset/include/constants.h" +#include "minddata/dataset/include/dataset/constants.h" #include "minddata/dataset/core/tensor.h" #include "minddata/dataset/engine/datasetops/source/sampler/sampler.h"