Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
9d0fde29
M
mindspore
项目概览
magicwindyyd
/
mindspore
与 Fork 源项目一致
Fork自
MindSpore / mindspore
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mindspore
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
9d0fde29
编写于
4月 04, 2020
作者:
J
Jonathan Yan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove ENABLE_MINDRECORD flag
上级
9aab1613
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
3 addition
and
29 deletion
+3
-29
mindspore/ccsrc/dataset/CMakeLists.txt
mindspore/ccsrc/dataset/CMakeLists.txt
+0
-2
mindspore/ccsrc/dataset/api/de_pipeline.cc
mindspore/ccsrc/dataset/api/de_pipeline.cc
+3
-9
mindspore/ccsrc/dataset/api/de_pipeline.h
mindspore/ccsrc/dataset/api/de_pipeline.h
+0
-4
mindspore/ccsrc/dataset/api/python_bindings.cc
mindspore/ccsrc/dataset/api/python_bindings.cc
+0
-6
mindspore/ccsrc/dataset/engine/datasetops/source/mindrecord_op.cc
...e/ccsrc/dataset/engine/datasetops/source/mindrecord_op.cc
+0
-3
mindspore/ccsrc/dataset/engine/datasetops/source/mindrecord_op.h
...re/ccsrc/dataset/engine/datasetops/source/mindrecord_op.h
+0
-2
tests/ut/cpp/CMakeLists.txt
tests/ut/cpp/CMakeLists.txt
+0
-1
tests/ut/cpp/dataset/mind_record_op_test.cc
tests/ut/cpp/dataset/mind_record_op_test.cc
+0
-2
未找到文件。
mindspore/ccsrc/dataset/CMakeLists.txt
浏览文件 @
9d0fde29
...
...
@@ -17,8 +17,6 @@ if (ENABLE_TDTQUE)
message
(
STATUS
"TDT queue is enabled"
)
endif
()
add_definitions
(
-D ENABLE_MINDRECORD
)
# conde coverage
# option(ENABLE_COVERAGE "Enable code coverage report" OFF)
# if (ENABLE_COVERAGE)
...
...
mindspore/ccsrc/dataset/api/de_pipeline.cc
浏览文件 @
9d0fde29
...
...
@@ -29,11 +29,9 @@
#include "dataset/engine/datasetops/source/manifest_op.h"
#include "dataset/engine/datasetops/source/cifar_op.h"
#include "dataset/engine/datasetops/source/celeba_op.h"
#ifdef ENABLE_MINDRECORD
#include "./shard_category.h"
#include "./shard_sample.h"
#include "./shard_shuffle.h"
#endif
#include "mindrecord/include/shard_category.h"
#include "mindrecord/include/shard_sample.h"
#include "mindrecord/include/shard_shuffle.h"
#include "dataset/util/random.h"
#include "dataset/util/status.h"
...
...
@@ -46,9 +44,7 @@ using pFunction = Status (DEPipeline::*)(const py::dict &, std::shared_ptr<Datas
static
std
::
unordered_map
<
uint32_t
,
pFunction
>
g_parse_op_func_
=
{{
kStorage
,
&
DEPipeline
::
ParseStorageOp
},
{
kShuffle
,
&
DEPipeline
::
ParseShuffleOp
},
#ifdef ENABLE_MINDRECORD
{
kMindrecord
,
&
DEPipeline
::
ParseMindRecordOp
},
#endif
{
kMap
,
&
DEPipeline
::
ParseMapOp
},
{
kBatch
,
&
DEPipeline
::
ParseBatchOp
},
{
kRepeat
,
&
DEPipeline
::
ParseRepeatOp
},
...
...
@@ -364,7 +360,6 @@ Status DEPipeline::ParseShuffleOp(const py::dict &args, std::shared_ptr<DatasetO
return
Status
::
OK
();
}
#ifdef ENABLE_MINDRECORD
Status
DEPipeline
::
CheckMindRecordPartitionInfo
(
const
py
::
dict
&
args
,
std
::
vector
<
int
>
*
in_partitions
)
{
if
(
args
[
"partitions"
].
is_none
())
{
std
::
string
err_msg
=
"Error: partitions is not set (None)"
;
...
...
@@ -450,7 +445,6 @@ Status DEPipeline::ParseMindRecordOp(const py::dict &args, std::shared_ptr<Datas
*
ptr
=
op
;
return
Status
::
OK
();
}
#endif
Status
DEPipeline
::
ParseMapOp
(
const
py
::
dict
&
args
,
std
::
shared_ptr
<
DatasetOp
>
*
ptr
)
{
std
::
shared_ptr
<
MapOp
::
Builder
>
builder
=
std
::
make_shared
<
MapOp
::
Builder
>
();
...
...
mindspore/ccsrc/dataset/api/de_pipeline.h
浏览文件 @
9d0fde29
...
...
@@ -38,9 +38,7 @@ using DsOpPtr = std::shared_ptr<DatasetOp>;
enum
OpName
{
kStorage
=
0
,
kShuffle
,
#ifdef ENABLE_MINDRECORD
kMindrecord
,
#endif
kBatch
,
kCache
,
kRepeat
,
...
...
@@ -101,11 +99,9 @@ class DEPipeline {
Status
ParseShuffleOp
(
const
py
::
dict
&
args
,
std
::
shared_ptr
<
DatasetOp
>
*
ptr
);
#ifdef ENABLE_MINDRECORD
Status
CheckMindRecordPartitionInfo
(
const
py
::
dict
&
args
,
std
::
vector
<
int
>
*
ptr
);
Status
ParseMindRecordOp
(
const
py
::
dict
&
args
,
std
::
shared_ptr
<
DatasetOp
>
*
ptr
);
#endif
Status
ParseMapOp
(
const
py
::
dict
&
args
,
std
::
shared_ptr
<
DatasetOp
>
*
ptr
);
...
...
mindspore/ccsrc/dataset/api/python_bindings.cc
浏览文件 @
9d0fde29
...
...
@@ -44,9 +44,7 @@
#include "dataset/engine/datasetops/source/io_block.h"
#include "dataset/engine/datasetops/source/mnist_op.h"
#include "dataset/engine/datasetops/source/manifest_op.h"
#ifdef ENABLE_MINDRECORD
#include "dataset/engine/datasetops/source/mindrecord_op.h"
#endif
#include "dataset/engine/datasetops/source/sampler/distributed_sampler.h"
#include "dataset/engine/datasetops/source/sampler/pk_sampler.h"
#include "dataset/engine/datasetops/source/sampler/random_sampler.h"
...
...
@@ -146,14 +144,12 @@ void bindDatasetOps(py::module *m) {
return
py
::
make_tuple
(
count
,
num_classes
);
});
#ifdef ENABLE_MINDRECORD
(
void
)
py
::
class_
<
MindRecordOp
,
DatasetOp
,
std
::
shared_ptr
<
MindRecordOp
>>
(
*
m
,
"MindRecordOp"
)
.
def_static
(
"get_num_rows"
,
[](
const
std
::
string
&
path
)
{
int64_t
count
=
0
;
THROW_IF_ERROR
(
MindRecordOp
::
CountTotalRows
(
path
,
&
count
));
return
count
;
});
#endif
(
void
)
py
::
class_
<
ManifestOp
,
DatasetOp
,
std
::
shared_ptr
<
ManifestOp
>>
(
*
m
,
"ManifestOp"
)
.
def_static
(
"get_num_rows_and_classes"
,
...
...
@@ -424,9 +420,7 @@ PYBIND11_MODULE(_c_dataengine, m) {
.
value
(
"STORAGE"
,
OpName
::
kStorage
)
.
value
(
"SHUFFLE"
,
OpName
::
kShuffle
)
.
value
(
"BATCH"
,
OpName
::
kBatch
)
#ifdef ENABLE_MINDRECORD
.
value
(
"MINDRECORD"
,
OpName
::
kMindrecord
)
#endif
.
value
(
"CACHE"
,
OpName
::
kCache
)
.
value
(
"REPEAT"
,
OpName
::
kRepeat
)
.
value
(
"TAKE"
,
OpName
::
kTake
)
...
...
mindspore/ccsrc/dataset/engine/datasetops/source/mindrecord_op.cc
浏览文件 @
9d0fde29
...
...
@@ -13,8 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifdef ENABLE_MINDRECORD
#include "dataset/engine/datasetops/source/mindrecord_op.h"
#include <algorithm>
...
...
@@ -665,4 +663,3 @@ Status MindRecordOp::CountTotalRows(const std::string dataset_path, int64_t *cou
}
}
// namespace dataset
}
// namespace mindspore
#endif
mindspore/ccsrc/dataset/engine/datasetops/source/mindrecord_op.h
浏览文件 @
9d0fde29
...
...
@@ -15,7 +15,6 @@
*/
#ifndef DATASET_ENGINE_DATASETOPS_SOURCE_MINDRECORD_OP_H_
#define DATASET_ENGINE_DATASETOPS_SOURCE_MINDRECORD_OP_H_
#ifdef ENABLE_MINDRECORD
#pragma once
#include <cstdint>
...
...
@@ -276,5 +275,4 @@ class MindRecordOp : public ParallelOp {
};
}
// namespace dataset
}
// namespace mindspore
#endif
#endif // DATASET_ENGINE_DATASETOPS_SOURCE_MINDRECORD_OP_H_
tests/ut/cpp/CMakeLists.txt
浏览文件 @
9d0fde29
...
...
@@ -26,7 +26,6 @@ MESSAGE("check ut_test ${CMAKE_BINARY_DIR}")
link_directories
(
${
MS_CCSRC_BUILD_PATH
}
)
if
(
ENABLE_MINDDATA
)
add_definitions
(
-D ENABLE_MINDRECORD
)
add_definitions
(
-D ENABLE_MINDDATA
)
link_directories
(
${
MS_CCSRC_BUILD_PATH
}
/dataset
)
link_directories
(
${
MS_CCSRC_BUILD_PATH
}
/mindrecord
)
...
...
tests/ut/cpp/dataset/mind_record_op_test.cc
浏览文件 @
9d0fde29
...
...
@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifdef ENABLE_MINDRECORD
#include <iostream>
#include <memory>
#include <vector>
...
...
@@ -480,4 +479,3 @@ TEST_F(MindDataTestMindRecordOp, TestMindRecordBlockReaderRepeat) {
row_count
++
;
}
}
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录