Compare commits

...

315 Commits

Author SHA1 Message Date
mindspore-ci-bot a86589e6e5 !14620 add npu op mirror pad sec
5 years ago
zhaozhenlong 011c7508c5 add npu op mirror pad for art gene
5 years ago
mindspore-ci-bot e4bfb4439a !14497 enhance_update net on gate
5 years ago
zhaozhenlong 5b37f667ef enhance update on gate
5 years ago
mindspore-ci-bot ab0e68c805 !14362 [MS][LITE][Develop]fix CodingStyle warnings
5 years ago
lixian 06480a79bf fix coding style
5 years ago
mindspore-ci-bot f69e273cf3 !14338 philox random algorithm
5 years ago
mindspore-ci-bot 9215177d42 !14478 fix effnet script
5 years ago
xutianchun e493a7d042 fix effnet.py
5 years ago
mindspore-ci-bot 1775ce0597 !14115 [MSLITE] Fix the bug of matmul int8 for arm32
5 years ago
zhaodezan 2b723e72a5 sec fix uniform real op
5 years ago
mindspore-ci-bot 1c235b9855 !14377 [MS_LITE] fix issue to sec
5 years ago
mindspore-ci-bot 253b2db10d !14382 [MSLITE][DEVELOP] clear static check warnings in module of lite runtime op
5 years ago
mindspore-ci-bot 37095afa4b !13749 [MS][LITE]append some models to the entrance guard
5 years ago
mindspore-ci-bot 883249a410 !14363 fix codex warnings
5 years ago
yangruoqi713 a71df9f09c [MSLITE][DEVELOP] clear static check warnings in module of lite runtime op
5 years ago
mindspore-ci-bot 5e55ce49ac !14361 fix static check
5 years ago
yefeng ccd133dc9d fix-issue
5 years ago
yeyunpeng2020 57df62bbc7 fix static check
5 years ago
xutianchun cd356874d3 fix codex warinnings
5 years ago
mindspore-ci-bot 53b7d6342f !14343 [MS_LITE] add ios reg
5 years ago
mindspore-ci-bot bbc1f6c4a5 !14311 [MS][LITE][Develop]fix exp for big-endian devices
5 years ago
zengxianglong 3637c5e86a append some models to the entrance guard
5 years ago
yefeng 791de31abb ios_reg_ops
5 years ago
mindspore-ci-bot d512872ca8 !14282 [MS_LITE] iOS fp16
5 years ago
mindspore-ci-bot 45ddcbaaa4 !14302 [MS][LITE][Develop]optimize fp32 prelu
5 years ago
mindspore-ci-bot 63df7d50d3 !13577 [MSLITE] Fix bug of conv1d to adjust npu.
5 years ago
lixian fc1400874a fix exp for big-endian devices
5 years ago
lixian c8fdaaa09c optimize fp32 prelu
5 years ago
yefeng 47a9efca65 ios_fp16
5 years ago
mindspore-ci-bot 163990eaf1 !14258 java support linux x86 avx & sse
5 years ago
yeyunpeng2020 25da6091a6 java support linux x86
5 years ago
mindspore-ci-bot 6ccf4848c1 !14176 [lite]fix memory leak
5 years ago
xuanyue 21f97de31b fix memory leak
5 years ago
wang_shaocong ffd415393d [MSLITE] fix bug of conv1d to adjust npu.
5 years ago
zhanyuan 74a3021c1d [MSLITE] Fix the bug of matmul int8 for arm32
5 years ago
mindspore-ci-bot 3701346618 !14043 [MSLITE][DEVELOP] fix bug of npu convolution
5 years ago
mindspore-ci-bot dbc6d0101a !14063 fix make equal less npu-unsupported case
5 years ago
zhaozhenlong 97bca1d9d6 fix equal 2d less 1d segment fault
5 years ago
mindspore-ci-bot 7d83431702 !13697 [lite]layernorm fusion and gelu fusion
5 years ago
yangruoqi713 216067597c [MSLITE][DEVELOP] fix bug of npu convolution
5 years ago
xuanyue 621fb7d5e3 layernorm fusion and gelu fusion
5 years ago
mindspore-ci-bot b0942a5da2 !13930 [MS][LITE][Develop]fix return value of tensor name
5 years ago
lixian 1df5f29103 fix tensor name
5 years ago
mindspore-ci-bot 403a822428 !13900 [MS][LITE][CPU] fix transpose bug TODO
5 years ago
lzk c2c9054bc4 power bug fix
5 years ago
mindspore-ci-bot 8199522ea6 !13872 [MS_LITE] ios_part_3_to_sec
5 years ago
mindspore-ci-bot b86b4a5895 !13870 [MS_LITE] ios_part_1_to_sec
5 years ago
mindspore-ci-bot f7863ef383 !13868 [MS_LITE] ios_part_1_to_sec
5 years ago
mindspore-ci-bot d300537975 !13797 [MS][LITE][CPU]fix reduce
5 years ago
mindspore-ci-bot 09d7c88f16 !13797 [MS][LITE][CPU]fix reduce
5 years ago
yefeng a552817d25 part_3-1
5 years ago
yefeng c099a65dbf ios_part_2_to_sec_cmake
5 years ago
yefeng 4ffa0ff785 assembly-1
5 years ago
mindspore-ci-bot b0560234e6 !13756 [MS][LITE][Develop]fix write for big endian devices
5 years ago
fuzhiye 2b138acf95 fix bug of reduce && floormod
5 years ago
mindspore-ci-bot c4cf6fccfa !13775 [ms][lite][cpu] power secfp16 optimize
5 years ago
mindspore-ci-bot a43f96ac5e !13755 [MSLITE][Develop] fix bug of arm cpu op gather while running in multi-threaded mode
5 years ago
lzk 90d7393f69 power_sec
5 years ago
mindspore-ci-bot d421dc87e9 !13665 [MSLITE][Develop] fix LogicalAnd
5 years ago
mindspore-ci-bot f0cafbd453 !13748 [ms][lite][cpu] max thread auto get
5 years ago
mindspore-ci-bot 5177dfed51 !13708 [ms][lite][cpu] gelu sec optimize
5 years ago
mindspore-ci-bot 1eb4e4e922 !13535 [ms][lite][cpu]arightmetic fp16 sec bug fix
5 years ago
lixian cfc3e0086e fix write for big endian devices
5 years ago
yangruoqi713 576a805036 [MSLITE][Develop] fix bug of arm cpu op gather while running in multi-threaded mode
5 years ago
lzk 49688f555a max thread num
5 years ago
lzk 48fad7dd27 gelu_sec
5 years ago
sunsuodong d4a2da250e fix_LogicalAnd
5 years ago
mindspore-ci-bot 7a3657279c !13298 [lite]matmul and add fusion
5 years ago
xuanyue bd354a09d6 matmul and add fusion
5 years ago
mindspore-ci-bot 842b723f42 !13464 [MSLITE] Modify ci test script.
5 years ago
lzk 9a87efb6f4 arithmetic_fp16
5 years ago
mindspore-ci-bot fdd2dd6258 !13484 [ms][lite][cpu] softmax optimize fp16
5 years ago
mindspore-ci-bot ce0cdbc3e2 !13470 [ms][lite][cpu] power optimize
5 years ago
mindspore-ci-bot 81e7f51f26 !13495 [MS][LITE][Develop]fix some onnx_111 problem
5 years ago
mindspore-ci-bot 0e80dd9aa8 !13486 [MS][LITE][GPU]GPU support print profiling info
5 years ago
lzk 59799bb8a3 softmax fp16
5 years ago
Pengyongrong 8ab8b9655e fix some onnx_111 problem
5 years ago
mindspore-ci-bot f6dd53bfcc !13467 [MS][LITE][Develop]add 1d f(2,3) support for 3x3 dw conv
5 years ago
chenzupeng f7ea0880c3 gpu support print profiling info
5 years ago
lzk 970c3f4b14 power fp16
5 years ago
mindspore-ci-bot ea0c4d68f4 !13411 [MSLITE][Develop] sync master arithmetic
5 years ago
lixian 2605104059 add 1d f(2,3) support for 3x3 dw conv
5 years ago
mindspore-ci-bot c80b790e57 !13408 [MS][LITE][GPU]reduce support axis=3
5 years ago
sunsuodong 51e3c4048c sync master arithmetic
5 years ago
mindspore-ci-bot 952f1d7e3f !13376 [MSLITE] Fix the bug of gather fp16
5 years ago
lz 7d918f8ea9 !13351 Fixed a bug in benchmark_train
5 years ago
mindspore-ci-bot 269125c3c4 !13445 [MS_LITE] fix SquaredDifference loopcount acc
5 years ago
mindspore-ci-bot 5591a6bae1 !13253 [MS][LITE][Develop]fix mirror padding float abortion
5 years ago
wang_shaocong 572d423ce0 [MSLITE] Modify ci test script.
5 years ago
mindspore-ci-bot 5ce840c93f !13308 [MS][LITE]reduce mean int func
5 years ago
fuzhiye 25cea84c91 add reduce_mean int func
5 years ago
mindspore-ci-bot 31a2e48e76 !13289 [MS][LITE]add models to the sec-icsl entrance guard
5 years ago
yefeng e55430588c 0317-1
5 years ago
zengxianglong 5c48eb4009 add models to the entrance guard
5 years ago
chenzupeng 99c4aad3ab reduce support axes=1
5 years ago
zhanyuan 1ded8dd733 [MSLITE] Fix the bug of gather fp16
5 years ago
mindspore-ci-bot b7d856367e !13318 [MSLITE] Optimize gather fp16 op's performance
5 years ago
lixian 554ad2909b fix mirror padding float abortion
5 years ago
liujiahan 47e20e070f Fixed a bug in benchmark_train
5 years ago
mindspore-ci-bot 64e6c3b70b !13349 fix subgraph intensor order mismatch
5 years ago
mindspore-ci-bot 34f33a9ed6 !13300 [MSLITE][Develop] fix bug of cpu arm32 MatVecMul
5 years ago
mindspore-ci-bot 48cdc13867 !13331 [MS][LITE][GPU]conv2d transpose support n > 1
5 years ago
wandongdong 542a712498 fix subgraph in_tensor dismatch op in_tensor order
5 years ago
mindspore-ci-bot 9d94bdcb3f !13315 [MS][LITE]exchange two model with reverse name in entrance guard
5 years ago
chenzupeng 9d94572898 deconv support n > 1
5 years ago
zengxianglong 59998baa77 temp cancel models
5 years ago
zhanyuan 7d883ae661 [MSLITE] Optimize gather fp16 op's performance
5 years ago
yangruoqi713 080d1cc10a [MSLITE][Develop] fix bug of cpu arm32 MatVecMul
5 years ago
mindspore-ci-bot b5992c5767 !13255 [MS][LITE][Develop] fix some problems for gpu ops
5 years ago
mindspore-ci-bot 0cb3052535 !13254 [MS][LITE][GPU]op support n>1
5 years ago
chenzupeng 6c2c79c308 op support N>1
5 years ago
Pengyongrong 18c36acf97 fix some problems for gpu ops
5 years ago
mindspore-ci-bot c9708b177e !13228 fix argminmax bug when axis=3
5 years ago
wandongdong 4ad6dd9d75 fix argminmax bug when axis=3
5 years ago
mindspore-ci-bot aaf88452b6 !13154 mindspore lite java support linux x86
5 years ago
mindspore-ci-bot 9fc7147ed8 !13118 [MSLITE] add support for conv1d operator.
5 years ago
yeyunpeng2020 1782399e8f java support linux x86 jar
5 years ago
wang_shaocong b5a9432e3d [MSLITE] add support for conv1d operator.
5 years ago
mindspore-ci-bot a34760d6fd !12986 [MSLITE] Fix bug of the padding parameter of pad operator.
5 years ago
mindspore-ci-bot ab6cdf7e4e !12991 [ms][lite][cpu] add softplus randomnormal ops
5 years ago
lzk 5b11db29b1 softplus add
5 years ago
wang_shaocong 9493622451 [MSLITE] Fix bug of the padding parameter of onnx pad operator.
5 years ago
mindspore-ci-bot 5dc3355d50 !12722 mindspore lite java support linux x86
5 years ago
yeyunpeng2020 aa84e8af6d add decoder tf parser
5 years ago
mindspore-ci-bot 691298fe7f !12873 [MS_LITE] fixlog
5 years ago
yefeng a5167f2c06 fix_log_4
5 years ago
mindspore-ci-bot 46d984da7c !12901 [MS][LITE][CPU]fix bug of arithmetic compare fp16 op
5 years ago
mindspore-ci-bot 7793e6c2d0 !12849 [MS][LITE][CPU]merge erf op
5 years ago
fuzhiye dec92bf2d7 fix arithmetic_compare_fp16 op bug
5 years ago
mindspore-ci-bot 0ae723e4f4 !12846 [MS_LITE] fix gpu
5 years ago
fuzhiye 38eaf7c9f7 merge erf op
5 years ago
yefeng fdfa77c7f7 fix_gpu_1
5 years ago
mindspore-ci-bot 4c5b9c1ca8 !12833 [MS][LITE][CPU]add erf op
5 years ago
fuzhiye 46d687c9b4 add erf op
5 years ago
mindspore-ci-bot 505bb73436 !12692 add transpose-reshape fusion & same parallel node merge
5 years ago
wangzhe d3b39680f7 format_trans
5 years ago
mindspore-ci-bot e957a1c9b0 !12792 only release npu resources of session
5 years ago
mindspore-ci-bot b126f49fcd !12788 [MS_LITE] fix convert
5 years ago
yefeng 8650362ce5 issue_fix_convert-3
5 years ago
zhaozhenlong b006508c02 npu mgr not single
5 years ago
mindspore-ci-bot ea191d32d4 !12756 [MS][LITE][CPU]implement resize bicubic
5 years ago
fuzhiye 51f9cac595 new implement for resize bicubic
5 years ago
mindspore-ci-bot 08bb46410b !12739 [MS][LITE]fix memory leak
5 years ago
zhangxuetong 8d47a021dc fix memory leak of npu kernel
5 years ago
mindspore-ci-bot b47f6a2cb8 !12707 [MS][LITE]CropAndResize supports 1x1 output case
5 years ago
mindspore-ci-bot 5cc6e53255 !12711 clean code
5 years ago
mindspore-ci-bot 9e43be6ec6 !12713 fix bug in kernel registry: need memset after malloc
5 years ago
hangangqiang 84b1f3cf50 fix bug in kernel registry: need memset after malloc
5 years ago
zhaozhenlong 65b680daeb fix clean code
5 years ago
mindspore-ci-bot 0ba51532db !12698 fix wrapper codex
5 years ago
zengxianglong 4e9fd4814e ResizeAndCrop supports 1x1 case
5 years ago
mindspore-ci-bot aea3af6766 !12697 [MS_LITE] Codex for sec
5 years ago
mindspore-ci-bot 16d3148133 !12694 [MSLITE][Develop] code review
5 years ago
mindspore-ci-bot d4c2ff986d !12689 fix build java gpu error
5 years ago
mindspore-ci-bot bafd7f19ec !12690 [MS][LITE][Develop]fix CodeDEX warnings
5 years ago
zhujingxuan 775fda3e42 fix wrapper codex
5 years ago
yefeng 87ffdff5cb codex_for_sec_1
5 years ago
mindspore-ci-bot 64b4f5be51 !12684 fix codex
5 years ago
sunsuodong ea12c9a411 code review
5 years ago
lixian 997cdd39a3 fix CodeDEX warnings
5 years ago
yeyunpeng 15ef943a2b fix build java gpu bug
5 years ago
zhujingxuan fdd156dd38 fix codex
5 years ago
mindspore-ci-bot 3ccbf6c5e0 !12657 add tf control flow fp16 encoder_0111 model
5 years ago
wangzhe 4fbcc90711 add encoder_0111 fp16 control flow model
5 years ago
mindspore-ci-bot 23ad95f2e3 !12650 fix java bug
5 years ago
yeyunpeng 68b6399cbd fix java bugs
5 years ago
mindspore-ci-bot 0353a7d9af !12636 [MS][LITE][CPU]fix bug
5 years ago
mindspore-ci-bot fde3597599 !12638 [MS][LITE][GPU]fix conv2d transpose bug
5 years ago
mindspore-ci-bot 0e8f371605 !12640 fix encoder control flow fp16 bug
5 years ago
wangzhe 7f490a25f0 debug encoder_control_flow
5 years ago
mindspore-ci-bot f506e0d58c !12620 [MSLITE][Develop] fix bug of npu kernel fusion
5 years ago
mindspore-ci-bot 666995ee4f !12613 [MS_LITE] fix crop fp16
5 years ago
chenzupeng ceb4e46ad4 fix bug in conv2d transpose
5 years ago
fuzhiye ed3e5e3cf4 fix bug of arithmetic fp32 op
5 years ago
yefeng 559b0c8108 fix_fp16_crop
5 years ago
mindspore-ci-bot 531608a17a !12615 [MS][LITE] Support decoder fp16
5 years ago
mindspore-ci-bot 40656394d0 !12610 fix npu mem leak
5 years ago
zhaozhenlong ad40aac408 fix npu memleak delete op const
5 years ago
mindspore-ci-bot 03cf6228fa !12587 Added backend type compile options in run_benchmark_nets.sh
5 years ago
cjh9368 6ffd253b4d [MS][LITE][Develop]support decoder fp16
5 years ago
liujiahan 089d547560 added backend compile option
5 years ago
mindspore-ci-bot 5bdc7a953c !12609 [MS][LITE][CPU]sync pad bug issue
5 years ago
yangruoqi713 cff593d693 [MSLITE][Develop] fix bug of npu kernel fusion
5 years ago
fuzhiye 4b45035f6a fix bug of pad_fp16 op, didn't get correct paddings array
5 years ago
mindspore-ci-bot 9ddc48dae3 !12527 [MS_LITE] build and split
5 years ago
yefeng 82013d31b3 build_split
5 years ago
zhanghaibo5 cfd4ba5ed0 sync with master, commit id: 02737b5e32
5 years ago
zhanghaibo b2bc8356de !12499 sync sec-icsl with master
5 years ago
zhanghaibo 9849ebcb10 !10832 sync sec-icsl with master
5 years ago
mindspore-ci-bot 5373cd2436 !10004 fix thread pool bug
6 years ago
hangangqiang bf86d8c372 fix thread pool bug
6 years ago
mindspore-ci-bot a4e4291d3d !9793 [MD]fix Strip for build
6 years ago
xulei2020 413b40fe6c fix Strip for build
6 years ago
张学同 9e8ac86793 !9771 [MSLITE][Develop] fix code review
6 years ago
sunsuodong 2b2f97b684 fix code review
6 years ago
mindspore-ci-bot 8726127410 !9671 Removing redundant code on icsl
6 years ago
shenwei41 22d7c7ce1c Remove redundant codes on icsl
6 years ago
mindspore-ci-bot 3dbd76182b !9607 [MSLITE][Develop] fix code review
6 years ago
sunsuodong 4c5d184183 fix code review
6 years ago
mindspore-ci-bot d196004273 !9567 modify static check
6 years ago
mindspore-ci-bot b8e6578032 !9572 [MD]fix for codex
6 years ago
mindspore-ci-bot 5723f6ca27 !9569 [MSLITE][Develop] fix code review
6 years ago
yvette 7b568cfe78 modify static check
6 years ago
xulei2020 a5351e1cbd fix for codex
6 years ago
sunsuodong 189e3e39fe fix code review
6 years ago
mindspore-ci-bot 618bb3ff41 !9434 [MD]MD code update for lite
6 years ago
xulei2020 f0620eccfb update MD code
6 years ago
mindspore-ci-bot 175d7b0bbc !9503 add model check for session
6 years ago
mindspore-ci-bot 034144dc0c !9499 [MS][LITE][GPU]check op tensor size
6 years ago
yvette 5fc9eb7f63 add model check for session
6 years ago
chenzupeng be9fec7800 check op tensor size
6 years ago
mindspore-ci-bot 845808e971 !9423 [MS][LITE][GPU]fix bug: input output tensor size not checked
6 years ago
mindspore-ci-bot a00bd62259 !9443 [MS][LITE][Develop] GPU ops Security check
6 years ago
chenzupeng 323b46f1cc fix bug: kernel tensor size not checked
6 years ago
Pengyongrong 313ea3f70f GPU ops Security check
6 years ago
张学同 9df1af7ec2 !9430 [MSLITE][Develop] fix code review
6 years ago
mindspore-ci-bot 252200886c !9427 fix static checking issues of lite ops
6 years ago
sunsuodong cb9ce6068a fix code review
6 years ago
liuwenhao4 3ca8c34b13 fix static checking issues of lite ops
6 years ago
mindspore-ci-bot b6e6d05157 !9384 rm grad op on icsl branch
6 years ago
mindspore-ci-bot 6cf0dbc0d9 !9227 verify shape and index rationality to icsl
6 years ago
mindspore-ci-bot 5aab880cec !9376 [MSLITE][Develop] fix code review
6 years ago
xutianchun 5ace3b0c26 rm grad ops
6 years ago
sunsuodong c5f4f77d21 fix code review
6 years ago
yvette b58802c1cc verify shape and index rationality
6 years ago
mindspore-ci-bot 49ae73d71b !9304 parameter mem save check and comments
6 years ago
mindspore-ci-bot 849b3c1b88 !9265 ops index use at
6 years ago
zhaozhenlong 9ad0dbccad parameter memory save check and comments
6 years ago
zhaozhenlong 011faca343 index use at
6 years ago
mindspore-ci-bot 95b65896cc !9218 [MSLITE][Develop] fix code review
6 years ago
sunsuodong 3dc934349e fix code review
6 years ago
mindspore-ci-bot 135c065132 !9176 [MSLITE][Develop] fix code review
6 years ago
sunsuodong 2c46829b99 fix code review
6 years ago
mindspore-ci-bot 1b31eac495 !9114 [MSLITE][Develop] fix code review
6 years ago
sunsuodong b3f1017e5c fix code review
6 years ago
mindspore-ci-bot b659dd5303 !9073 fix sec check bugs for opencl
6 years ago
wandongdong 24a3508311 fix sec check for opencl
6 years ago
mindspore-ci-bot fba449d4bc !9054 [MSLITE][Develop] fix code review
6 years ago
sunsuodong 8f242a18b3 fix code review
6 years ago
mindspore-ci-bot 59fc574595 !9015 modify static check to icsl
6 years ago
yvette 64a5311c19 modify static check
6 years ago
mindspore-ci-bot 9d47e694f6 !8882 [MSLITE] convert fusion module secure check
6 years ago
mindspore-ci-bot 0c93635f01 !9002 [MSLITE][Develop] fix code review
6 years ago
张学同 1b853a030e !9002 [MSLITE][Develop] fix code review
6 years ago
sunsuodong 18ceac049f fix code review
6 years ago
mindspore-ci-bot 2e276db6a9 !8944 fix code review fp32 int8
6 years ago
mindspore-ci-bot 7d11296249 !8956 modify static check to sec-icsl
6 years ago
yvette 1a520c4d79 modify static check
6 years ago
zhaozhenlong e15a2f1831 fix code review fp32 int8
6 years ago
mindspore-ci-bot 98659b74ed !8914 [MSLITE][Develop] fix code review
6 years ago
sunsuodong 6195f1b3a3 fix code review
6 years ago
mindspore-ci-bot a806c1a71d !8819 modify static check in ./lite/src to icsl
6 years ago
mindspore-ci-bot c9e60551c7 !8856 [lite] fix memory leak and increase robustness for benchmark
6 years ago
yvette e77fe504cf modify static check
6 years ago
mindspore-ci-bot 4214ecd5ec !8866 [MS][LITE] clean for sec-icsl
6 years ago
zhengjun10 4f1ad4d25b convert fusion module secure check
6 years ago
yefeng 60af4c075a clean_sec_5
6 years ago
mindspore-ci-bot 6a8bfd1df4 !8859 【MSLITE】code clean
6 years ago
mindspore-ci-bot 53dd01bdb5 !8820 Modify alarm
6 years ago
wangdongxu f1a8875f56 icsl_icsl
6 years ago
xuanyue fa26eea5ab fix memory leak and increase robustness for benchmark
6 years ago
mindspore-ci-bot f4143adceb !8828 【MSLITE】tools check nullptr sec-icsl
6 years ago
shenwei41 db08b495b3 Alarm modification
6 years ago
mindspore-ci-bot dd371b5c84 !8836 [MSLITE][Develop] fix code review
6 years ago
mindspore-ci-bot 34818bc8a5 !8818 review parameter
6 years ago
mindspore-ci-bot 4afe62a633 !8816 [MS][LITE] fix static check error
6 years ago
jianghui58 9b84e4356d fix static check error
6 years ago
sunsuodong a0cc69a158 fix code review
6 years ago
mindspore-ci-bot c5ef757b9e !8822 fix large functions & fix large Cyclomatic Complexity & remove redundant
6 years ago
mindspore-ci-bot d6bdb55392 !8793 fix review problem
6 years ago
mindspore-ci-bot db3b690cf2 !8723 modify static check to icsl
6 years ago
guohongzilong ada6c2e82c add ptr null check
6 years ago
hangangqiang aa704f51e7 fix large functions & fix large Cyclomatic Complexity & remove redundant
6 years ago
zhaozhenlong 46f6645303 fix code review
6 years ago
yvette b35dcf0648 modify static check
6 years ago
mindspore-ci-bot db0e3281bb !8788 [MSLITE][Develop] fix code review
6 years ago
mindspore-ci-bot e889024b4b !8735 [MSLITE]improve code in tools
6 years ago
mindspore-ci-bot 4e7f812074 !8764 [MS][LITE] static check
6 years ago
guohongzilong a9bf758324 improve code in tolls
6 years ago
sunsuodong f5b27ea767 fix code check
6 years ago
zhaozhenlong bd10bc3fff fp16 kernel review fix
6 years ago
jianghui58 6b1cc553eb static check
6 years ago
mindspore-ci-bot 116e505d89 !8710 modify static check
6 years ago
yvette d2a4fb39be modify static check
6 years ago
mindspore-ci-bot c7850fd77a !8731 adjust index check to entrance
6 years ago
mindspore-ci-bot 50dd8e874d !8729 remove train code
6 years ago
xutianchun 758b83535d rm nnal/fp32_grad
6 years ago
zhaozhenlong 4aeff1717d transpose index check adjust to entrance
6 years ago
mindspore-ci-bot cea7f48543 !8701 fix code review issue
6 years ago
mindspore-ci-bot 919608bc0e !8626 target link optimize & fp16 to lite
6 years ago
zhaozhenlong 9197116280 fix code review issue
6 years ago
yeyunpeng 0165388b1f target link optimize & fp16 to lite
6 years ago
mindspore-ci-bot db801ae4b7 !8391 fix code review comments
6 years ago
mindspore-ci-bot 9ed4140b0c !8530 move compareOutputData to /test
6 years ago
mindspore-ci-bot 8b18961e60 !8499 [MSLITE][Develop] fix code check
6 years ago
mindspore-ci-bot 6f0c6d7ab0 !8413 modify static check for icsl
6 years ago
zhanghaibo5 8e611c0664 fix code review comments
6 years ago
mindspore-ci-bot 050b4b3a35 !8486 fix static checking of lite ops
6 years ago
sunsuodong 3f89166954 fix code check
6 years ago
liuyu 98aa985390 move compareOutputData to /test
6 years ago
mindspore-ci-bot c24e49f02c !8523 remove train
6 years ago
yvette ad62e15fdd modify static check
6 years ago
xutianchun 754bb016ba remove train on icsl
6 years ago
mindspore-ci-bot d211502934 !8551 add commonts for icsl
6 years ago
liuwenhao4 4109baec5a fix static checking of lite ops
6 years ago
yvette 7a0622d48f add commonts
6 years ago
mindspore-ci-bot 39df4712f7 !8525 sec gate
6 years ago
zhaozhenlong e23748da1b add comments
6 years ago
mindspore-ci-bot 8fa6127d8c !8473 [MSLITE]fix train mode in package_lite.cmake sec
6 years ago
guohongzilong d7b1bbf9d8 fix train mode in package_lite.cmake
6 years ago
张学同 34d6627404 !8424 【MSLITE】fix dequant memory bug sec-icsi
6 years ago
guohongzilong 93efbdf79f fix dequant memory invalid write
6 years ago
wandongdong 9a029738eb !8401 fix sec check for opencl runtime and allocator
6 years ago
sunsuodong b595454b96 !8345 [MSLITE][Develop] fix code
6 years ago

4
.gitignore vendored

@ -3,6 +3,10 @@ build/
mindspore/lib
output
*.ir
st_tests
kernel_meta/
somas_meta/
trace_code_graph_*
# mindspore lite java
mindspore/lite/java/java/.gradle

27
.gitmodules vendored

@ -1,33 +1,6 @@
[submodule "third_party/flatbuffers"]
path = third_party/flatbuffers
url = https://github.com/google/flatbuffers.git
ignore = all
[submodule "third_party/googletest"]
path = third_party/googletest
url = https://github.com/google/googletest.git
[submodule "third_party/protobuf"]
path = third_party/protobuf
url = https://github.com/protocolbuffers/protobuf.git
ignore = all
[submodule "akg"]
path = akg
url = https://gitee.com/mindspore/akg.git
[submodule "graphengine"]
path = graphengine
url = https://gitee.com/mindspore/graphengine.git
[submodule "third_party/OpenCL-CLHPP"]
path = third_party/OpenCL-CLHPP
url = https://github.com/KhronosGroup/OpenCL-CLHPP.git
[submodule "third_party/OpenCL-Headers"]
path = third_party/OpenCL-Headers
url = https://github.com/KhronosGroup/OpenCL-Headers.git
[submodule "third_party/opencv"]
path = third_party/opencv
url = https://github.com/opencv/opencv.git
[submodule "third_party/eigen"]
path = third_party/eigen
url = https://gitlab.com/libeigen/eigen.git
[submodule "third_party/libjpeg-turbo"]
path = third_party/libjpeg-turbo
url = https://github.com/libjpeg-turbo/libjpeg-turbo.git
ignore = dirty

@ -1,36 +1,44 @@
cmake_minimum_required(VERSION 3.14.1)
project (MindSpore)
cmake_minimum_required(VERSION 3.14.0)
project(MindSpore)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.3.0)
message(FATAL_ERROR "GCC vesion ${CMAKE_CXX_COMPILER_VERSION} must not be less than 7.3.0")
endif ()
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.3.0)
message(FATAL_ERROR "GCC version ${CMAKE_CXX_COMPILER_VERSION} must not be less than 7.3.0")
endif()
include(${CMAKE_SOURCE_DIR}/cmake/options.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/check_requirements.cmake)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/")
if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
if(NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
add_compile_definitions(_GLIBCXX_USE_CXX11_ABI=0)
endif ()
endif()
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O2 -Werror -Wno-return-std-move -Wno-unused-private-field -Wno-unused-lambda-capture -Wno-sign-compare -Wno-overloaded-virtual -Wno-unneeded-internal-declaration -Wno-unused-variable -Wno-pessimizing-move -Wno-inconsistent-missing-override -DHALF_ENABLE_CPP11_USER_LITERALS=0 -D_FORTIFY_SOURCE=2")
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CMAKE_OSX_SYSROOT "")
set(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O2 -Winconsistent-missing-override -Wuser-defined-warnings \
-Wno-return-std-move -Wno-unused-private-field -Wno-unused-lambda-capture -Wno-sign-compare \
-Wno-overloaded-virtual -Wno-unneeded-internal-declaration -Wno-unused-variable -Wno-pessimizing-move \
-Wno-inconsistent-missing-override -DHALF_ENABLE_CPP11_USER_LITERALS=0 -D_FORTIFY_SOURCE=2")
else()
set(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O2 -Wl,--allow-shlib-undefined -DHALF_ENABLE_CPP11_USER_LITERALS=0 -D_FORTIFY_SOURCE=2")
set(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O2 -Wl,--allow-shlib-undefined \
-DHALF_ENABLE_CPP11_USER_LITERALS=0 -D_FORTIFY_SOURCE=2")
endif()
if (ENABLE_PYTHON)
if(ENABLE_PYTHON)
add_compile_definitions(ENABLE_PYTHON)
endif()
set(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -g2 -ggdb -fno-inline-functions -fno-omit-frame-pointer -Wl,--allow-shlib-undefined -D_LIBCPP_INLINE_VISIBILITY='' -D_LIBCPP_DISABLE_EXTERN_TEMPLATE=1 -DHALF_ENABLE_CPP11_USER_LITERALS=0 -D_FORTIFY_SOURCE=2 -Wno-cpp")
set(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -g2 -ggdb -fno-inline-functions -fno-omit-frame-pointer \
-Wl,--allow-shlib-undefined -D_LIBCPP_INLINE_VISIBILITY='' -D_LIBCPP_DISABLE_EXTERN_TEMPLATE=1 \
-DHALF_ENABLE_CPP11_USER_LITERALS=0 -D_FORTIFY_SOURCE=2 -Wno-cpp")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/usr/local/include -std=c++17 -Werror -Wall -fPIC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/usr/local/include -std=c++17 \
-Werror -Wall -Wno-deprecated-declarations -fPIC")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(PYBIND11_CPP_STANDARD -std=c++17)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OPTION_CXX_FLAGS}")
if (ENABLE_AKG AND (ENABLE_D OR ENABLE_GPU))
if(ENABLE_AKG AND (ENABLE_D OR ENABLE_GPU))
add_subdirectory("${CMAKE_SOURCE_DIR}/akg")
endif()
@ -45,8 +53,8 @@ find_package(Python3 3.7 COMPONENTS Interpreter Development)
if(Python3_FOUND)
set(PYTHON_INCLUDE_DIRS "${Python3_INCLUDE_DIRS}")
set(PYTHON_LIBRARIES "${Python3_LIBRARIES}")
if (WIN32)
if (Python3_DIR)
if(WIN32)
if(Python3_DIR)
message("Python3_DIR set already: " ${Python3_DIR})
else()
string(LENGTH ${PYTHON_LIBRARIES} PYTHON_LIBRARIES_LEN)
@ -69,20 +77,15 @@ include_directories(${PYTHON_INCLUDE_DIRS})
set(MS_CCSRC_PATH ${CMAKE_SOURCE_DIR}/mindspore/ccsrc)
set(MS_CCSRC_BUILD_PATH ${BUILD_PATH}/mindspore/mindspore/ccsrc)
if (ENABLE_D OR ENABLE_ACL OR ENABLE_TESTCASES)
if(ENABLE_D OR ENABLE_ACL OR ENABLE_TESTCASES)
include(${CMAKE_SOURCE_DIR}/cmake/dependency_graphengine.cmake)
endif ()
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
add_subdirectory(mindspore/ccsrc)
add_subdirectory(mindspore/core)
if (ENABLE_TESTCASES)
if(ENABLE_TESTCASES OR ENABLE_CPP_ST)
add_subdirectory(tests)
endif()
if (ENABLE_SERVING)
add_subdirectory(serving)
add_subdirectory(serving/example/cpp_client)
endif()
include(cmake/package.cmake)

@ -36,7 +36,7 @@ Please follow this style to make MindSpore easy to review, maintain and develop.
* Unittest guidelines
The *Python* unittest style suggested by [pytest](http://www.pytest.org/en/latest/) and *C++* unittest style suggested by [Googletest Primer](https://github.com/google/googletest/blob/master/googletest/docs/primer.md) are used in MindSpore community.
The *Python* unittest style suggested by [pytest](http://www.pytest.org/en/latest/) and *C++* unittest style suggested by [Googletest Primer](https://github.com/google/googletest/blob/master/docs/primer.md) are used in MindSpore community.
### Fork-Pull development model

@ -1,14 +1,15 @@
![MindSpore Logo](docs/MindSpore-logo.png "MindSpore logo")
============================================================
[查看中文](./README_CN.md)
<!-- TOC -->
- [What Is MindSpore](#what-is-mindspore)
- [Automatic Differentiation](#automatic-differentiation)
- [Automatic Parallel](#automatic-parallel)
- [Installation](#installation)
- [Binaries](#binaries)
- [From Source](#from-source)
- [Pip mode method installation](#pip-mode-method-installation)
- [Source code compilation installation](#source-code-compilation-installation)
- [Docker Image](#docker-image)
- [Quickstart](#quickstart)
- [Docs](#docs)
@ -16,9 +17,13 @@
- [Governance](#governance)
- [Communication](#communication)
- [Contributing](#contributing)
- [Maintenance phases](#maintenance-phases)
- [Maintenance status](#maintenance-status)
- [Release Notes](#release-notes)
- [License](#license)
<!-- /TOC -->
## What Is MindSpore
MindSpore is a new open source deep learning training/inference framework that
@ -59,7 +64,7 @@ At present, MindSpore uses a fine-grained parallel strategy of splitting operato
## Installation
### Binaries
### Pip mode method installation
MindSpore offers build options across multiple backends:
@ -67,7 +72,6 @@ MindSpore offers build options across multiple backends:
| :---------------- | :--------------- | :----- |
| Ascend910 | Ubuntu-x86 | ✔️ |
| | Ubuntu-aarch64 | ✔️ |
| | EulerOS-x86 | ✔️ |
| | EulerOS-aarch64 | ✔️ |
| | CentOS-x86 | ✔️ |
| | CentOS-aarch64 | ✔️ |
@ -80,8 +84,8 @@ For installation using `pip`, take `CPU` and `Ubuntu-x86` build version as an ex
1. Download whl from [MindSpore download page](https://www.mindspore.cn/versions/en), and install the package.
```
pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.0.0/MindSpore/cpu/ubuntu_x86/mindspore-1.0.0-cp37-cp37m-linux_x86_64.whl
```bash
pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.1.0/MindSpore/cpu/ubuntu_x86/mindspore-1.1.0-cp37-cp37m-linux_x86_64.whl
```
2. Run the following command to verify the install.
@ -109,13 +113,24 @@ For installation using `pip`, take `CPU` and `Ubuntu-x86` build version as an ex
mul = Mul()
print(mul(x, y))
```
```
```text
[ 4. 10. 18.]
```
### From Source
Use pip mode method to install MindSpore in different environments. Refer to the following documents.
- [Using pip mode method to install MindSpore in Ascend environment](https://gitee.com/mindspore/docs/blob/master/install/mindspore_ascend_install_pip_en.md)
- [Using pip mode method to install MindSpore in GPU environment](https://gitee.com/mindspore/docs/blob/master/install/mindspore_gpu_install_pip_en.md)
- [Using pip mode method to install MindSpore in CPU environment](https://gitee.com/mindspore/docs/blob/master/install/mindspore_cpu_install_pip_en.md)
### Source code compilation installation
[Install MindSpore](https://www.mindspore.cn/install/en).
Use the source code compilation method to install MindSpore in different environments. Refer to the following documents.
- [Using the source code compilation method to install MindSpore in Ascend environment](https://gitee.com/mindspore/docs/blob/master/install/mindspore_ascend_install_source_en.md)
- [Using the source code compilation method to install MindSpore in GPU environment](https://gitee.com/mindspore/docs/blob/master/install/mindspore_gpu_install_source_en.md)
- [Using the source code compilation method to install MindSpore in CPU environment](https://gitee.com/mindspore/docs/blob/master/install/mindspore_cpu_install_source_en.md)
### Docker Image
@ -125,27 +140,29 @@ currently the containerized build options are supported as follows:
| Hardware Platform | Docker Image Repository | Tag | Description |
| :---------------- | :---------------------- | :-- | :---------- |
| CPU | `mindspore/mindspore-cpu` | `x.y.z` | Production environment with pre-installed MindSpore `x.y.z` CPU release. |
| | | `devel` | Development environment provided to build MindSpore (with `CPU` backend) from the source, refer to https://www.mindspore.cn/install/en for installation details. |
| | | `devel` | Development environment provided to build MindSpore (with `CPU` backend) from the source, refer to <https://www.mindspore.cn/install/en> for installation details. |
| | | `runtime` | Runtime environment provided to install MindSpore binary package with `CPU` backend. |
| GPU | `mindspore/mindspore-gpu` | `x.y.z` | Production environment with pre-installed MindSpore `x.y.z` GPU release. |
| | | `devel` | Development environment provided to build MindSpore (with `GPU CUDA10.1` backend) from the source, refer to https://www.mindspore.cn/install/en for installation details. |
| | | `devel` | Development environment provided to build MindSpore (with `GPU CUDA10.1` backend) from the source, refer to <https://www.mindspore.cn/install/en> for installation details. |
| | | `runtime` | Runtime environment provided to install MindSpore binary package with `GPU CUDA10.1` backend. |
| Ascend | <center>&mdash;</center> | <center>&mdash;</center> | Coming soon. |
> **NOTICE:** For GPU `devel` docker image, it's NOT suggested to directly install the whl package after building from the source, instead we strongly RECOMMEND you transfer and install the whl package inside GPU `runtime` docker image.
* CPU
- CPU
For `CPU` backend, you can directly pull and run the latest stable image using the below command:
```
docker pull mindspore/mindspore-cpu:1.0.0
docker run -it mindspore/mindspore-cpu:1.0.0 /bin/bash
```bash
docker pull mindspore/mindspore-cpu:1.1.0
docker run -it mindspore/mindspore-cpu:1.1.0 /bin/bash
```
* GPU
- GPU
For `GPU` backend, please make sure the `nvidia-container-toolkit` has been installed in advance, here are some install guidelines for `Ubuntu` users:
```
```bash
DISTRIBUTION=$(. /etc/os-release; echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | apt-key add -
curl -s -L https://nvidia.github.io/nvidia-docker/$DISTRIBUTION/nvidia-docker.list | tee /etc/apt/sources.list.d/nvidia-docker.list
@ -153,8 +170,10 @@ currently the containerized build options are supported as follows:
sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit nvidia-docker2
sudo systemctl restart docker
```
Then edit the file daemon.json:
```
```bash
$ vim /etc/docker/daemon.json
{
"runtimes": {
@ -165,18 +184,23 @@ currently the containerized build options are supported as follows:
}
}
```
Restart docker again:
```
```bash
sudo systemctl daemon-reload
sudo systemctl restart docker
```
Then you can pull and run the latest stable image using the below command:
```
docker pull mindspore/mindspore-gpu:1.0.0
docker run -it --runtime=nvidia --privileged=true mindspore/mindspore-gpu:1.0.0 /bin/bash
```bash
docker pull mindspore/mindspore-gpu:1.1.0
docker run -it -v /dev/shm:/dev/shm --runtime=nvidia --privileged=true mindspore/mindspore-gpu:1.1.0 /bin/bash
```
To test if the docker image works, please execute the python code below and check the output:
```python
import numpy as np
import mindspore.context as context
@ -189,7 +213,8 @@ currently the containerized build options are supported as follows:
y = Tensor(np.ones([1,3,3,4]).astype(np.float32))
print(F.tensor_add(x, y))
```
```
```text
[[[ 2. 2. 2. 2.],
[ 2. 2. 2. 2.],
[ 2. 2. 2. 2.]],
@ -208,7 +233,7 @@ please check out [docker](docker/README.md) repo for the details.
## Quickstart
See the [Quick Start](https://www.mindspore.cn/tutorial/training/en/master/quick_start/quick_start.html)
See the [Quick Start](https://www.mindspore.cn/tutorial/training/en/master/quick_start/quick_start.html)
to implement the image classification.
## Docs
@ -234,6 +259,31 @@ Check out how MindSpore Open Governance [works](https://gitee.com/mindspore/comm
Welcome contributions. See our [Contributor Wiki](CONTRIBUTING.md) for
more details.
## Maintenance phases
Project stable branches will be in one of the following states:
| **State** | **Time frame** | **Summary** |
|-------------|---------------|--------------------------------------------------|
| Planning | 1 - 3 months | Features are under planning. |
| Development | 3 months | Features are under development. |
| Maintained | 6 - 12 months | All bugfixes are appropriate. Releases produced. |
| Unmaintained| 0 - 3 months | All bugfixes are appropriate. No Maintainers and No Releases produced. |
| End Of Life (EOL) | N/A | Branch no longer accepting changes. |
## Maintenance status
| **Branch** | **Status** | **Initial Release Date** | **Next Phase** | **EOL Date** |
|--------|--------------|----------------------|-----------------------------------|------------|
| **r1.2** | Development | 2021-03-31 estimated | Maintained <br> 2021-03-31 estimated | |
| **r1.1** | Maintained | 2020-12-31 | Unmaintained <br> 2021-06-30 estimated | |
| **r1.0** | Maintained | 2020-09-24 | Unmaintained <br> 2021-03-30 estimated | |
| **r0.7** | Unmaintained | 2020-08-31 | End Of Life <br> 2021-02-28 estimated | |
| **r0.6** | End Of Life | 2020-07-31 | | 2020-12-30 |
| **r0.5** | Maintained | 2020-06-30 | Unmaintained <br> 2021-06-30 estimated | |
| **r0.3** | End Of Life | 2020-05-31 | | 2020-09-30 |
| **r0.2** | End Of Life | 2020-04-30 | | 2020-08-31 |
| **r0.1** | End Of Life | 2020-03-28 | | 2020-06-30 |
## Release Notes
The release notes, see our [RELEASE](RELEASE.md).

@ -1,14 +1,15 @@
![MindSpore标志](docs/MindSpore-logo.png "MindSpore logo")
============================================================
[View English](./README.md)
<!-- TOC -->
- [MindSpore介绍](#mindspore介绍)
- [自动微分](#自动微分)
- [自动并行](#自动并行)
- [安装](#安装)
- [二进制文件](#二进制文件)
- [源](#源)
- [pip方式安装](#pip方式安装)
- [码编译方式安装](#码编译方式安装)
- [Docker镜像](#docker镜像)
- [快速入门](#快速入门)
- [文档](#文档)
@ -16,9 +17,13 @@
- [治理](#治理)
- [交流](#交流)
- [贡献](#贡献)
- [分支维护策略](#分支维护策略)
- [现有分支维护状态](#现有分支维护状态)
- [版本说明](#版本说明)
- [许可证](#许可证)
<!-- /TOC -->
## MindSpore介绍
MindSpore是一种适用于端边云场景的新型开源深度学习训练/推理框架。
@ -56,7 +61,7 @@ MindSpore自动并行的目的是构建数据并行、模型并行和混合并
## 安装
### 二进制文件
### pip方式安装
MindSpore提供跨多个后端的构建选项
@ -64,7 +69,6 @@ MindSpore提供跨多个后端的构建选项
| :------------ | :-------------- | :--- |
| Ascend 910 | Ubuntu-x86 | ✔️ |
| | Ubuntu-aarch64 | ✔️ |
| | EulerOS-x86 | ✔️ |
| | EulerOS-aarch64 | ✔️ |
| | CentOS-x86 | ✔️ |
| | CentOS-aarch64 | ✔️ |
@ -77,8 +81,8 @@ MindSpore提供跨多个后端的构建选项
1. 请从[MindSpore下载页面](https://www.mindspore.cn/versions)下载并安装whl包。
```
pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.0.0/MindSpore/cpu/ubuntu_x86/mindspore-1.0.0-cp37-cp37m-linux_x86_64.whl
```bash
pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.1.0/MindSpore/cpu/ubuntu_x86/mindspore-1.1.0-cp37-cp37m-linux_x86_64.whl
```
2. 执行以下命令,验证安装结果。
@ -89,29 +93,41 @@ MindSpore提供跨多个后端的构建选项
import mindspore.nn as nn
from mindspore import Tensor
from mindspore.ops import operations as P
context.set_context(mode=context.GRAPH_MODE, device_target="CPU")
class Mul(nn.Cell):
def __init__(self):
super(Mul, self).__init__()
self.mul = P.Mul()
def construct(self, x, y):
return self.mul(x, y)
x = Tensor(np.array([1.0, 2.0, 3.0]).astype(np.float32))
y = Tensor(np.array([4.0, 5.0, 6.0]).astype(np.float32))
mul = Mul()
print(mul(x, y))
```
```
```text
[ 4. 10. 18.]
```
### 来源
[MindSpore安装](https://www.mindspore.cn/install)。
使用pip方式在不同的环境安装MindSpore可参考以下文档。
- [Ascend环境使用pip方式安装MindSpore](https://gitee.com/mindspore/docs/blob/master/install/mindspore_ascend_install_pip.md)
- [GPU环境使用pip方式安装MindSpore](https://gitee.com/mindspore/docs/blob/master/install/mindspore_gpu_install_pip.md)
- [CPU环境使用pip方式安装MindSpore](https://gitee.com/mindspore/docs/blob/master/install/mindspore_cpu_install_pip.md)
### 源码编译方式安装
使用源码编译方式在不同的环境安装MindSpore可参考以下文档。
- [Ascend环境使用源码编译方式安装MindSpore](https://gitee.com/mindspore/docs/blob/master/install/mindspore_ascend_install_source.md)
- [GPU环境使用源码编译方式安装MindSpore](https://gitee.com/mindspore/docs/blob/master/install/mindspore_gpu_install_source.md)
- [CPU环境使用源码编译方式安装MindSpore](https://gitee.com/mindspore/docs/blob/master/install/mindspore_cpu_install_source.md)
### Docker镜像
@ -121,27 +137,29 @@ MindSpore的Docker镜像托管在[Docker Hub](https://hub.docker.com/r/mindspore
| 硬件平台 | Docker镜像仓库 | 标签 | 说明 |
| :----- | :------------------------ | :----------------------- | :--------------------------------------- |
| CPU | `mindspore/mindspore-cpu` | `x.y.z` | 已经预安装MindSpore `x.y.z` CPU版本的生产环境。 |
| | | `devel` | 提供开发环境从源头构建MindSpore`CPU`后端。安装详情请参考https://www.mindspore.cn/install 。 |
| | | `devel` | 提供开发环境从源头构建MindSpore`CPU`后端)。安装详情请参考<https://www.mindspore.cn/install> 。 |
| | | `runtime` | 提供运行时环境安装MindSpore二进制包`CPU`后端)。 |
| GPU | `mindspore/mindspore-gpu` | `x.y.z` | 已经预安装MindSpore `x.y.z` GPU版本的生产环境。 |
| | | `devel` | 提供开发环境从源头构建MindSpore`GPU CUDA10.1`后端。安装详情请参考https://www.mindspore.cn/install 。 |
| | | `devel` | 提供开发环境从源头构建MindSpore`GPU CUDA10.1`后端)。安装详情请参考<https://www.mindspore.cn/install> 。 |
| | | `runtime` | 提供运行时环境安装MindSpore二进制包`GPU CUDA10.1`后端)。 |
| Ascend | <center>&mdash;</center> | <center>&mdash;</center> | 即将推出,敬请期待。 |
> **注意:** 不建议从源头构建GPU `devel` Docker镜像后直接安装whl包。我们强烈建议您在GPU `runtime` Docker镜像中传输并安装whl包。
* CPU
- CPU
对于`CPU`后端,可以直接使用以下命令获取并运行最新的稳定镜像:
```
docker pull mindspore/mindspore-cpu:1.0.0
docker run -it mindspore/mindspore-cpu:1.0.0 /bin/bash
```bash
docker pull mindspore/mindspore-cpu:1.1.0
docker run -it mindspore/mindspore-cpu:1.1.0 /bin/bash
```
* GPU
- GPU
对于`GPU`后端,请确保`nvidia-container-toolkit`已经提前安装,以下是`Ubuntu`用户安装指南:
```
```bash
DISTRIBUTION=$(. /etc/os-release; echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | apt-key add -
curl -s -L https://nvidia.github.io/nvidia-docker/$DISTRIBUTION/nvidia-docker.list | tee /etc/apt/sources.list.d/nvidia-docker.list
@ -149,8 +167,10 @@ MindSpore的Docker镜像托管在[Docker Hub](https://hub.docker.com/r/mindspore
sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit nvidia-docker2
sudo systemctl restart docker
```
编辑文件 daemon.json:
```
```bash
$ vim /etc/docker/daemon.json
{
"runtimes": {
@ -161,18 +181,23 @@ MindSpore的Docker镜像托管在[Docker Hub](https://hub.docker.com/r/mindspore
}
}
```
再次重启docker:
```
```bash
sudo systemctl daemon-reload
sudo systemctl restart docker
```
使用以下命令获取并运行最新的稳定镜像:
```
docker pull mindspore/mindspore-gpu:1.0.0
docker run -it --runtime=nvidia --privileged=true mindspore/mindspore-gpu:1.0.0 /bin/bash
```bash
docker pull mindspore/mindspore-gpu:1.1.0
docker run -it -v /dev/shm:/dev/shm --runtime=nvidia --privileged=true mindspore/mindspore-gpu:1.1.0 /bin/bash
```
要测试Docker是否正常工作请运行下面的Python代码并检查输出
```python
import numpy as np
import mindspore.context as context
@ -185,7 +210,8 @@ MindSpore的Docker镜像托管在[Docker Hub](https://hub.docker.com/r/mindspore
y = Tensor(np.ones([1,3,3,4]).astype(np.float32))
print(F.tensor_add(x, y))
```
```
```text
[[[ 2. 2. 2. 2.],
[ 2. 2. 2. 2.],
[ 2. 2. 2. 2.]],
@ -205,7 +231,6 @@ MindSpore的Docker镜像托管在[Docker Hub](https://hub.docker.com/r/mindspore
参考[快速入门](https://www.mindspore.cn/tutorial/training/zh-CN/master/quick_start/quick_start.html)实现图片分类。
## 文档
有关安装指南、教程和API的更多详细信息请参阅[用户文档](https://gitee.com/mindspore/docs)。
@ -227,6 +252,31 @@ MindSpore的Docker镜像托管在[Docker Hub](https://hub.docker.com/r/mindspore
欢迎参与贡献。更多详情,请参阅我们的[贡献者Wiki](CONTRIBUTING.md)。
## 分支维护策略
MindSpore的版本分支有以下几种维护阶段
| **状态** | **持续时间** | **说明** |
|-------------|---------------|--------------------------------------------------|
| Planning | 1 - 3 months | 特性规划。 |
| Development | 3 months | 特性开发。 |
| Maintained | 6 - 12 months | 允许所有问题修复的合入,并发布版本。 |
| Unmaintained| 0 - 3 months | 允许所有问题修复的合入,无专人维护,不再发布版本。 |
| End Of Life (EOL) | N/A | 不再接受修改合入该分支。 |
## 现有分支维护状态
| **分支名** | **当前状态** | **上线时间** | **后续状态** | **EOL 日期** |
|--------|--------------|----------------------|-----------------------------------|------------|
| **r1.2** | Development | 2021-03-31 estimated | Maintained <br> 2021-03-31 estimated | |
| **r1.1** | Maintained | 2020-12-31 | Unmaintained <br> 2021-06-30 estimated | |
| **r1.0** | Maintained | 2020-09-24 | Unmaintained <br> 2021-03-30 estimated | |
| **r0.7** | Unmaintained | 2020-08-31 | End Of Life <br> 2021-02-28 estimated | |
| **r0.6** | End Of Life | 2020-07-31 | | 2020-12-30 |
| **r0.5** | Maintained | 2020-06-30 | Unmaintained <br> 2021-06-30 estimated | |
| **r0.3** | End Of Life | 2020-05-31 | | 2020-09-30 |
| **r0.2** | End Of Life | 2020-04-30 | | 2020-08-31 |
| **r0.1** | End Of Life | 2020-03-28 | | 2020-06-30 |
## 版本说明
版本说明请参阅[RELEASE](RELEASE.md)。

File diff suppressed because it is too large Load Diff

@ -1,14 +1,27 @@
# Security Risk Description
# Security for MindSpore training
## Security Risk Description
1. When MindSpore is used for AI model training, if the user-defined computational graph structure (for example, Python code for generating the MindSpore computational graph) is provided by an untrusted third party, malicious code may exist and will be loaded and executed to attack the system.
2. Model files are stored in binary mode. When MindSpore is used to optimize or infer AI models and the model files are loaded in deserialization mode, once malicious code is written into the model files, the code are loaded and executed, causing attacks on the system.
3. MindSpore performs only model training and inference based on the data provided by users. Users need to protect data security to avoid privacy leakage.
4. MindSpore is a distributed training platform. When MindSpore is used for distributed training, if an Ascend chip is used for training, a device provides a secure transmission protocol for gradient fusion. If GPUs or other clusters are used for training, identity authentication and secure transmission are not provided.
# Security Usage Suggestions
## Security Usage Suggestions
1. Run MindSpore in the sandbox.
2. Run MindSpore as a non-root user.
3. Ensure that the source of a computational graph structure is trustworthy. Do not write code irrelevant to model training in the network structure definition.
4. Ensure that the source of a network model is trustworthy or enter secure network model parameters to prevent model parameters from being tampered with.
5. Ensure that GPU distributed training is performed on an isolated cluster network.
# Security for MindSpore Lite
## Security Risk Description
When run a model using MindSpore Lite, the value from the model will be read and used as the parameter or input of a operator, if the value read from the model is invalid, it may cause unexpected result. For example, if the invalid value is used as the offset of a vector, it may cause your app run into segmentation fault issue.
## Security Usage Suggestions
1. Make sure your model is well verified and protected.
2. The exception catching mechanism of C++ is an effective method to improve robustness of your app, consider adding code to catch exception when calling the MindSpore Lite API, as exception will be raised in some case such as the example mentioned in the risk description above.

File diff suppressed because it is too large Load Diff

2
akg

@ -1 +1 @@
Subproject commit f308919c39811c2c3e07fb0dcc8054a533c84cbc
Subproject commit 46f4c28fcf2ad719f3d360a9a6dc1a7fd75d130c

@ -15,6 +15,17 @@
@echo off
@title mindspore_build
SET BASE_PATH=%CD%
SET BUILD_PATH=%BASE_PATH%/build
SET threads=6
SET X86_64_SIMD=off
SET ENABLE_GITEE=OFF
set VERSION_MAJOR=''
set VERSION_MINOR=''
set ERSION_REVISION=''
find "const int ms_version_major =" mindspore\lite\include\version.h > version.txt
for /f "delims=\= tokens=2" %%a in ('findstr "const int ms_version_major = " version.txt') do (set x=%%a)
set VERSION_MAJOR=%x:~1,1%
@ -28,13 +39,35 @@ del version.txt
echo "======Start building MindSpore Lite %VERSION_MAJOR%.%VERSION_MINOR%.%VERSION_REVISION%======"
SET threads=6
IF NOT "%2%" == "" (
ECHO %2%|FINDSTR "^[0-9][0-9]*$"
IF %errorlevel% == 0 (
SET threads=%2%
) ELSE (
IF NOT "%2%" == "" (
IF "%2%" == "avx" (
SET X86_64_SIMD=avx
) ELSE IF "%2%" == "sse" (
SET X86_64_SIMD=sse
) ELSE IF "%2%" == "off" (
SET X86_64_SIMD=off
) ELSE IF "%2%" == "avx512" (
SET X86_64_SIMD=avx512
) ELSE (
echo "MindSpore_lite the second parameter must in [avx, avx512, sse, off], but now is [%2%]"
call :clean
EXIT /b 1
)
IF NOT "%3%" == "" (
SET threads=%3%
)
)
)
IF "%FROM_GITEE%" == "1" (
echo "DownLoad from gitee"
SET ENABLE_GITEE=ON
)
SET BASE_PATH=%CD%
SET BUILD_PATH=%BASE_PATH%/build
IF NOT EXIST "%BUILD_PATH%" (
md "build"
)
@ -45,37 +78,36 @@ IF NOT EXIST "%BUILD_PATH%/mindspore" (
cd %BUILD_PATH%/mindspore
IF "%1%" == "lite" (
(git log -1 | findstr "^commit") > %BUILD_PATH%\.commit_id
cmake -DPLATFORM_ARM64=off -DSUPPORT_TRAIN=off ^
-DENABLE_TOOLS=on -DENABLE_CONVERTER=on -DBUILD_TESTCASES=off ^
-DCMAKE_BUILD_TYPE=Release -DSUPPORT_GPU=off -DBUILD_MINDDATA=off -DOFFLINE_COMPILE=off ^
-DMS_VERSION_MAJOR=%VERSION_MAJOR% -DMS_VERSION_MINOR=%VERSION_MINOR% -DMS_VERSION_REVISION=%VERSION_REVISION% ^
-DX86_64_SIMD=%X86_64_SIMD% ^
-G "CodeBlocks - MinGW Makefiles" "%BASE_PATH%/mindspore/lite"
) ELSE (
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_CPU=ON -DENABLE_MINDDATA=ON -DUSE_GLOG=ON ^
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_CPU=ON -DENABLE_MINDDATA=ON -DUSE_GLOG=ON -DENABLE_GITEE=%ENABLE_GITEE% ^
-G "CodeBlocks - MinGW Makefiles" ../..
)
IF NOT %errorlevel% == 0 (
echo "cmake fail."
call :run_fail
call :clean
EXIT /b 1
)
cmake --build . --target package -- -j%threads%
IF NOT %errorlevel% == 0 (
echo "build fail."
call :run_fail
call :clean
EXIT /b 1
)
IF EXIST "%BASE_PATH%/output" (
cd %BASE_PATH%/output
rd /s /q _CPack_Packages
)
goto run_eof
:run_fail
cd %BASE_PATH%
set errorlevel=1
EXIT /b %errorlevel%
call :clean
EXIT /b 0
:run_eof
:clean
IF EXIST "%BASE_PATH%/output" (
cd %BASE_PATH%/output
rd /s /q _CPack_Packages
)
cd %BASE_PATH%

File diff suppressed because it is too large Load Diff

@ -1,70 +1,73 @@
## define customized find fucntions, print customized error messages
function(find_required_package pkg_name)
find_package(${pkg_name})
if (NOT ${pkg_name}_FOUND)
message(FATAL_ERROR "Required package ${pkg_name} not found, please install the package and try building MindSpore again.")
if(NOT ${pkg_name}_FOUND)
message(FATAL_ERROR "Required package ${pkg_name} not found, "
"please install the package and try building MindSpore again.")
endif()
endfunction()
function(find_required_program prog_name)
find_program(${prog_name}_EXE ${prog_name})
if (NOT ${prog_name}_EXE)
message(FATAL_ERROR "Required program ${prog_name} not found, please install the package and try building MindSpore again.")
endif ()
if(NOT ${prog_name}_EXE)
message(FATAL_ERROR "Required program ${prog_name} not found, "
"please install the package and try building MindSpore again.")
endif()
endfunction()
## find python, quit if the found python is static
set(Python3_USE_STATIC_LIBS FALSE)
find_package(Python3 COMPONENTS Interpreter Development)
if (Python3_FOUND)
if(Python3_FOUND)
message("Python3 found, version: ${Python3_VERSION}")
message("Python3 library path: ${Python3_LIBRARY}")
message("Python3 interpreter: ${Python3_EXECUTABLE}")
elseif (Python3_LIBRARY AND Python3_EXECUTABLE AND
${Python3_VERSION} VERSION_GREATER_EQUAL "3.7.0" AND ${Python3_VERSION} VERSION_LESS "3.8.0")
elseif(Python3_LIBRARY AND Python3_EXECUTABLE AND
${Python3_VERSION} VERSION_GREATER_EQUAL "3.7.0" AND ${Python3_VERSION} VERSION_LESS "3.8.9")
message(WARNING "Maybe python3 environment is broken.")
message("Python3 library path: ${Python3_LIBRARY}")
message("Python3 interpreter: ${Python3_EXECUTABLE}")
else ()
else()
message(FATAL_ERROR "Python3 not found, please install Python>=3.7.5, and set --enable-shared "
"if you are building Python locally")
endif ()
endif()
## packages used both on windows and linux
if (DEFINED ENV{MS_PATCH_PATH})
if(DEFINED ENV{MS_PATCH_PATH})
find_program(Patch_EXECUTABLE patch PATHS $ENV{MS_PATCH_PATH})
set(Patch_FOUND ${Patch_EXECUTABLE})
else ()
else()
find_package(Patch)
endif ()
if (NOT Patch_FOUND)
message(FATAL_ERROR "Patch not found, please set environment variable MS_PATCH_PATH to path where Patch is located, "
endif()
if(NOT Patch_FOUND)
message(FATAL_ERROR "Patch not found, "
"please set environment variable MS_PATCH_PATH to path where Patch is located, "
"usually found in GIT_PATH/usr/bin on Windows")
endif ()
endif()
message(PATCH_EXECUTABLE = ${Patch_EXECUTABLE})
find_required_package(Threads)
## packages used on Linux
if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
if (ENABLE_MINDDATA)
if(NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
if(ENABLE_MINDDATA)
find_required_program(tclsh)
endif ()
endif()
if (MS_BUILD_GRPC)
if(MS_BUILD_GRPC)
find_required_package(OpenSSL)
endif ()
endif()
## packages used in GPU mode only
if (ENABLE_GPU)
if(ENABLE_GPU)
find_library(gmp_LIB gmp)
find_library(gmpxx_LIB gmpxx)
find_file(gmp_HEADER gmp.h)
if (NOT gmp_LIB OR NOT gmpxx_LIB OR NOT gmp_HEADER)
if(NOT gmp_LIB OR NOT gmpxx_LIB OR NOT gmp_HEADER)
message(FATAL_ERROR "Required package gmp not found, please install gmp and try building MindSpore again.")
endif ()
endif()
find_required_program(automake)
find_required_program(autoconf)
find_required_program(libtoolize)

@ -1,87 +1,40 @@
message(STATUS "compiling GraphEngine")
message(STATUS "Compiling GraphEngine")
set(GE_SOURCE_DIR ${CMAKE_SOURCE_DIR}/graphengine)
message(STATUS "ge dir: ${GE_SOURCE_DIR}")
include(${GE_SOURCE_DIR}/cmake/ge_utils.cmake)
include(${GE_SOURCE_DIR}/cmake/external_libs/json.cmake)
include(${GE_SOURCE_DIR}/cmake/external_libs/eigen.cmake)
include(${GE_SOURCE_DIR}/cmake/external_libs/gtest.cmake)
include(${GE_SOURCE_DIR}/cmake/external_libs/protobuf.cmake)
include(${GE_SOURCE_DIR}/cmake/external_libs/onnx.cmake)
include(${GE_SOURCE_DIR}/cmake/external_libs/securec.cmake)
message(STATUS "[ME] build_path: ${BUILD_PATH}")
# for UT, find slog and error_manager from local prebuild
if (NOT ENABLE_D AND NOT ENABLE_ACL)
set(GE_PREBUILD_PATH ${GE_SOURCE_DIR}/third_party/prebuild/${CMAKE_HOST_SYSTEM_PROCESSOR})
find_library(slog libslog.so ${GE_PREBUILD_PATH})
find_library(error_manager liberror_manager.so ${GE_PREBUILD_PATH})
elseif (DEFINED ENV{D_LINK_PATH})
set(GE_LIB_PATH $ENV{D_LINK_PATH})
set(GE_SYS_ARCH "")
if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x86_64")
# x86 ubuntu
set(GE_SYS_ARCH "x86_64")
elseif(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "aarch64")
# arm euleros
set(GE_SYS_ARCH "aarch64")
else()
message(FATAL_ERROR "Running on a unsupported architecture: ${SYSTEM_TYPE}, build terminated")
function(find_submodule_lib module name path)
find_library(${module}_LIBRARY_DIR NAMES ${name} NAMES_PER_DIR PATHS ${path}
PATH_SUFFIXES lib
)
if("${${module}_LIBRARY_DIR}" STREQUAL "${module}_LIBRARY_DIR-NOTFOUND")
message(FATAL_ERROR "${name} not found in any of following paths: ${path}")
endif()
set(GE_LIB_PATH ${GE_LIB_PATH}/${GE_SYS_ARCH})
find_library(c_sec libc_sec.so ${GE_LIB_PATH})
find_library(slog libslog.so ${GE_LIB_PATH})
find_library(mmpa libmmpa.so ${GE_LIB_PATH})
find_library(runtime libruntime.so ${GE_LIB_PATH})
find_library(msprof libmsprof.so ${GE_LIB_PATH})
find_library(register libregister.so ${GE_LIB_PATH})
find_library(hccl libhccl.so ${GE_LIB_PATH})
find_library(cce libcce.so ${GE_LIB_PATH})
find_library(resource libresource.so ${GE_LIB_PATH})
find_library(error_manager liberror_manager.so ${GE_LIB_PATH})
else()
# Ascend mode
if(DEFINED ENV{ASCEND_CUSTOM_PATH})
set(ASCEND_PATH $ENV{ASCEND_CUSTOM_PATH})
else()
set(ASCEND_PATH /usr/local/Ascend)
endif()
set(ASCEND_DRIVER_PATH ${ASCEND_PATH}/driver/lib64/common ${ASCEND_PATH}/driver/lib64)
set(ASCEND_RUNTIME_PATH ${ASCEND_PATH}/fwkacllib/lib64 ${ASCEND_PATH}/acllib/lib64 ${ASCEND_PATH}/atc/lib64)
find_library(c_sec libc_sec.so ${ASCEND_DRIVER_PATH})
find_library(slog libslog.so ${ASCEND_DRIVER_PATH})
find_library(mmpa libmmpa.so ${ASCEND_DRIVER_PATH})
find_library(cce libcce.so ${ASCEND_RUNTIME_PATH})
find_library(hccl libhccl.so ${ASCEND_RUNTIME_PATH})
find_library(runtime libruntime.so ${ASCEND_RUNTIME_PATH})
find_library(msprof libmsprof.so ${ASCEND_RUNTIME_PATH})
find_library(register libregister.so ${ASCEND_RUNTIME_PATH})
find_library(resource libresource.so ${ASCEND_RUNTIME_PATH})
find_library(error_manager liberror_manager.so ${ASCEND_RUNTIME_PATH})
# for Atlas env
set(ASCEND_TOOLKIT_RUNTIME_PATH ${ASCEND_PATH}/ascend-toolkit/latest/fwkacllib/lib64)
find_library(cce libcce.so ${ASCEND_TOOLKIT_RUNTIME_PATH})
find_library(hccl libhccl.so ${ASCEND_TOOLKIT_RUNTIME_PATH})
find_library(runtime libruntime.so ${ASCEND_TOOLKIT_RUNTIME_PATH})
find_library(msprof libmsprof.so ${ASCEND_TOOLKIT_RUNTIME_PATH})
find_library(register libregister.so ${ASCEND_TOOLKIT_RUNTIME_PATH})
find_library(resource libresource.so ${ASCEND_TOOLKIT_RUNTIME_PATH})
find_library(error_manager liberror_manager.so ${ASCEND_TOOLKIT_RUNTIME_PATH})
endif()
add_library(${module} SHARED IMPORTED)
set_target_properties(${module} PROPERTIES
IMPORTED_LOCATION ${${module}_LIBRARY_DIR}
)
endfunction()
# compile libraries from following directories
# this cmake file is called only when NOT ENABLE_GE is set
set(_ge_tmp_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
if(ENABLE_D OR ENABLE_ACL OR ENABLE_TESTCASES)
set(_ge_tmp_CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
set(_ge_tmp_ENABLE_GITEE ${ENABLE_GITEE})
set(ENABLE_GITEE ON)
set(CMAKE_INSTALL_PREFIX ${BUILD_PATH}/graphengine)
string(REPLACE " -Wall" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REPLACE " -Werror" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
# force __FILE__ to show relative path of file, from source directory
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__FILE__='\"$(subst $(realpath ${CMAKE_SOURCE_DIR})/,,$(abspath $<))\"' -Wno-builtin-macro-redefined")
add_subdirectory(${GE_SOURCE_DIR}/src/common/graph)
if (ENABLE_ACL OR ENABLE_D)
add_subdirectory(${GE_SOURCE_DIR}/src/ge/common)
if (ENABLE_D)
add_subdirectory(${GE_SOURCE_DIR}/src/ge/ge_runtime)
endif ()
endif ()
if(ENABLE_TESTCASES)
# use slog, error manager, mmpa in non ascend mode, e.g. tests
set(GE_PREBUILD_PATH ${GE_SOURCE_DIR}/third_party/prebuild/${CMAKE_HOST_SYSTEM_PROCESSOR})
set(ENABLE_MS_TESTCASES TRUE)
find_submodule_lib(slog libalog.so ${GE_PREBUILD_PATH})
find_submodule_lib(error_manager liberror_manager.so ${GE_PREBUILD_PATH})
find_submodule_lib(static_mmpa libmmpa.a ${GE_PREBUILD_PATH})
endif()
set(CMAKE_CXX_FLAGS ${_ge_tmp_CMAKE_CXX_FLAGS})
string(REPLACE " -Werror" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
add_subdirectory(${GE_SOURCE_DIR})
set(CMAKE_INSTALL_PREFIX ${_ge_tmp_CMAKE_INSTALL_PREFIX})
set(ENABLE_GITEE ${_ge_tmp_ENABLE_GITEE})
else()
message(FATAL_ERROR "No compile option defined for GraphEngine, exiting")
endif()

@ -4,7 +4,7 @@
# GTest_LIBRARY
#
if (NOT TARGET gtest)
if(NOT TARGET gtest)
set(BUILD_TESTING OFF CACHE BOOL "Disable glog test")
set(_ms_tmp_CMAKE_POSITION_INDEPENDENT_CODE ${CMAKE_POSITION_INDEPENDENT_CODE})
@ -17,7 +17,7 @@ if (NOT TARGET gtest)
set(CMAKE_MACOSX_RPATH TRUE)
set(CMAKE_CXX_FLAGS "${SECURE_CXX_FLAGS}")
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "5.0" AND CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x86_64" AND SYSTEM_TYPE MATCHES "euleros")
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "5.0" AND CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x86_64" AND SYSTEM_TYPE MATCHES "euleros")
# -D_GLIBCXX_USE_CXX11_ABI=0 added for the ABI incompatible for libtsdclient.so
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0")
endif()

@ -3,7 +3,7 @@
#
# PROTOBUF_LIBRARY - Link this to use protobuf
#
if (NOT TARGET protobuf::libprotobuf)
if(NOT TARGET protobuf::libprotobuf)
set(protobuf_BUILD_TESTS OFF CACHE BOOL "Disable protobuf test")
set(protobuf_BUILD_SHARED_LIBS OFF CACHE BOOL "Gen shared library")
set(_ms_tmp_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
@ -14,7 +14,7 @@ if (NOT TARGET protobuf::libprotobuf)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../third_party/protobuf/cmake ${CMAKE_BINARY_DIR}/protobuf)
set(CMAKE_CXX_FLAGS ${_ms_tmp_CMAKE_CXX_FLAGS})
endif ()
endif()
include_directories(${CMAKE_CURRENT_LIST_DIR}/../third_party/protobuf/src)
@ -47,7 +47,7 @@ function(ms_protobuf_generate c_var h_var)
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_BINARY_DIR}/${rel_path}"
COMMAND protobuf::protoc -I${file_dir} --cpp_out=${CMAKE_BINARY_DIR}/${rel_path} ${abs_file}
DEPENDS protobuf::protoc ${abs_file}
COMMENT "Running C++ protocol buffer compiler on ${file}" VERBATIM )
COMMENT "Running C++ protocol buffer compiler on ${file}" VERBATIM)
endforeach()
set_source_files_properties(${${c_var}} ${${h_var}} PROPERTIES GENERATED TRUE)
@ -89,7 +89,7 @@ function(ms_protobuf_generate_py c_var h_var py_var)
COMMAND perl -pi -e "s/import (.+_pb2.*)/from . import \\1/" "${CMAKE_BINARY_DIR}/${rel_path}/${file_name}_pb2.py"
COMMAND cp "${CMAKE_BINARY_DIR}/${rel_path}/${file_name}_pb2.py" "${PROJECT_SOURCE_DIR}/mindspore/train/"
DEPENDS protobuf::protoc ${abs_file}
COMMENT "Running C++ protocol buffer compiler on ${file}" VERBATIM )
COMMENT "Running C++ protocol buffer compiler on ${file}" VERBATIM)
endforeach()
set_source_files_properties(${${c_var}} ${${h_var}} ${${py_var}} PROPERTIES GENERATED TRUE)

@ -4,12 +4,12 @@
# SECUREC_LIBRARY
#
if (NOT TARGET securec)
if(NOT TARGET securec)
set(_ms_tmp_CMAKE_POSITION_INDEPENDENT_CODE ${CMAKE_POSITION_INDEPENDENT_CODE})
set(_ms_tmp_CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
set(CMAKE_C_FLAGS "${SECURE_CXX_FLAGS}")
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
add_compile_definitions(SECUREC_ONLY_DECLARE_MEMSET)
endif()
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../third_party/securec ${CMAKE_BINARY_DIR}/securec)

@ -3,7 +3,7 @@
function(find_python_package out_inc out_lib)
# Use PYTHON_EXECUTABLE if it is defined, otherwise default to python
if ("${PYTHON_EXECUTABLE}" STREQUAL "")
if("${PYTHON_EXECUTABLE}" STREQUAL "")
set(PYTHON_EXECUTABLE "python3")
else()
set(PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}")
@ -15,7 +15,7 @@ function(find_python_package out_inc out_lib)
OUTPUT_VARIABLE inc)
string(STRIP "${inc}" inc)
set(${out_inc} ${inc} PARENT_SCOPE)
execute_process(
COMMAND "${PYTHON_EXECUTABLE}" -c "import distutils.sysconfig as sysconfig; import os; print(os.path.join(sysconfig.get_config_var('LIBDIR'), sysconfig.get_config_var('LDLIBRARY')))"
RESULT_VARIABLE result

@ -1,10 +1,10 @@
if (ENABLE_GITEE)
if(ENABLE_GITEE)
set(REQ_URL "https://gitee.com/mirrors/abseil-cpp/repository/archive/20200225.2.tar.gz")
set(MD5 "7e84ac40ee4541f645f5b9c90c9c98e6")
else()
set(REQ_URL "https://github.com/abseil/abseil-cpp/archive/20200225.2.tar.gz")
set(MD5 "73f2b6e72f1599a9139170c29482ddc4")
endif ()
endif()
mindspore_add_pkg(absl
VER 20200225.2

@ -1,14 +1,14 @@
if (ENABLE_GITEE)
if(ENABLE_GITEE)
set(REQ_URL "https://gitee.com/mirrors/c-ares/repository/archive/cares-1_15_0.tar.gz")
set(MD5 "a1e06c7eb45b96b8bff2ee1b43a4c70b")
else()
set(REQ_URL "https://github.com/c-ares/c-ares/releases/download/cares-1_15_0/c-ares-1.15.0.tar.gz")
set(MD5 "d2391da274653f7643270623e822dff7")
endif ()
endif()
mindspore_add_pkg(c-ares
VER 1.15.0
LIBS cares
LIBS cares
URL ${REQ_URL}
MD5 ${MD5}
CMAKE_OPTION -DCMAKE_BUILD_TYPE:STRING=Release

@ -0,0 +1,37 @@
set(cmsis_pkg_name cmsis)
if(ENABLE_GITEE)
set(REQ_URL "https://gitee.com/mirrors/CMSIS_5/repository/archive/5.7.0")
set(MD5 "f8b5c3f0711feb9ebac0fb05c15f0306")
else()
set(REQ_URL "https://github.com/ARM-software/CMSIS_5/archive/5.7.0.tar.gz")
set(MD5 "0eaa594b0c62dd72e41ec181c4689842")
endif()
set(INCLUDE "./")
mindspore_add_pkg(${cmsis_pkg_name}
VER 5.7.0
HEAD_ONLY ${INCLUDE}
URL ${REQ_URL}
MD5 ${MD5})
message("micro get ${cmsis_pkg_name} config hash: ${${cmsis_pkg_name}_CONFIG_HASH}")
file(GLOB cmsic_children RELATIVE ${_MS_LIB_CACHE} ${_MS_LIB_CACHE}/*)
foreach(child ${cmsic_children})
string(FIND "${child}" "${cmsis_pkg_name}" position)
if(NOT "${position}" EQUAL "-1")
file(STRINGS ${_MS_LIB_CACHE}/${child}/options.txt cmsis_configs)
foreach(cmsis_config ${cmsis_configs})
string(FIND "${cmsis_config}" "${MD5}" position_md5)
if(NOT "${position_md5}" EQUAL "-1")
if(NOT IS_DIRECTORY ${CMAKE_BINARY_DIR}/${cmsis_pkg_name})
MESSAGE("copy cmsis libaray: ${child} to ${CMAKE_BINARY_DIR}")
file(COPY ${_MS_LIB_CACHE}/${child}/CMSIS DESTINATION ${CMAKE_BINARY_DIR}/${cmsis_pkg_name})
endif()
endif()
endforeach()
endif()
endforeach()

@ -1,13 +1,13 @@
set(cppjieba_CXXFLAGS "-D_FORTIFY_SOURCE=2 -O2")
set(cppjieba_CFLAGS "-D_FORTIFY_SOURCE=2 -O2")
if (ENABLE_GITEE)
if(ENABLE_GITEE)
set(REQ_URL "https://gitee.com/mirrors/cppjieba/repository/archive/v5.0.3.tar.gz")
set(MD5 "ea0bdd5a654a376e2c2077daae23b376")
else()
set(REQ_URL "https://github.com/yanyiwu/cppjieba/archive/v5.0.3.tar.gz")
set(MD5 "b8b3f7a73032c9ce9daafa4f67196c8c")
endif ()
endif()
mindspore_add_pkg(cppjieba
VER 5.0.3

@ -1,13 +1,13 @@
set(Eigen3_CXXFLAGS "-D_FORTIFY_SOURCE=2 -O2")
set(Eigen3_CFLAGS "-D_FORTIFY_SOURCE=2 -O2")
if (ENABLE_GITEE)
if(ENABLE_GITEE)
set(REQ_URL "https://gitee.com/mirrors/eigen-git-mirrorsource/repository/archive/3.3.7.tar.gz")
set(MD5 "cf6552a5d90c1aca4b5e0b011f65ea93")
else()
set(REQ_URL "https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.tar.gz")
set(MD5 "9e30f67e8531477de4117506fe44669b")
endif ()
endif()
mindspore_add_pkg(Eigen3
VER 3.3.7

@ -1,16 +1,16 @@
set(flatbuffers_CXXFLAGS "-D_FORTIFY_SOURCE=2 -O2")
set(flatbuffers_CFLAGS "-D_FORTIFY_SOURCE=2 -O2")
if (WIN32)
set(flatbuffers_USE_STATIC_LIBS ON)
if(WIN32)
set(flatbuffers_USE_STATIC_LIBS ON)
endif()
if (ENABLE_GITEE)
if(ENABLE_GITEE)
set(REQ_URL "https://gitee.com/mirrors/flatbuffers/repository/archive/v1.11.0.tar.gz")
set(MD5 "4051dc865063ffa724c4264dea8dbbe9")
else()
set(REQ_URL "https://github.com/google/flatbuffers/archive/v1.11.0.tar.gz")
set(MD5 "02c64880acb89dbd57eebacfd67200d8")
endif ()
endif()
mindspore_add_pkg(flatbuffers
VER 1.11.0
@ -18,7 +18,7 @@ mindspore_add_pkg(flatbuffers
EXE flatc
URL ${REQ_URL}
MD5 ${MD5}
CMAKE_OPTION -DFLATBUFFERS_BUILD_TESTS=OFF )
CMAKE_OPTION -DFLATBUFFERS_BUILD_TESTS=OFF -DCMAKE_INSTALL_LIBDIR=lib)
include_directories(${flatbuffers_INC})
add_library(mindspore::flatbuffers ALIAS flatbuffers::flatbuffers)
@ -31,13 +31,13 @@ function(ms_build_flatbuffers source_schema_files
set(total_schema_dirs "")
set(total_generated_files "")
set(FLATC mindspore::flatc)
foreach (schema_dir ${source_schema_dirs})
foreach(schema_dir ${source_schema_dirs})
set(total_schema_dirs -I ${schema_dir} ${total_schema_dirs})
endforeach()
foreach(schema ${source_schema_files})
get_filename_component(filename ${schema} NAME_WE)
if (NOT ${generated_output_dir} STREQUAL "")
if(NOT ${generated_output_dir} STREQUAL "")
set(generated_file ${generated_output_dir}/${filename}_generated.h)
add_custom_command(
OUTPUT ${generated_file}
@ -55,7 +55,7 @@ function(ms_build_flatbuffers source_schema_files
add_custom_target(${custom_target_name} ALL
DEPENDS ${total_generated_files})
if (NOT ${generated_output_dir} STREQUAL "")
if(NOT ${generated_output_dir} STREQUAL "")
include_directories(${generated_output_dir})
set_property(TARGET ${custom_target_name}
PROPERTY GENERATED_OUTPUT_DIR
@ -72,15 +72,15 @@ function(ms_build_flatbuffers_lite source_schema_files
set(total_schema_dirs "")
set(total_generated_files "")
set(FLATC mindspore::flatc)
foreach (schema_dir ${source_schema_dirs})
foreach(schema_dir ${source_schema_dirs})
set(total_schema_dirs -I ${schema_dir} ${total_schema_dirs})
endforeach()
foreach(schema IN LISTS ${source_schema_files})
get_filename_component(filename ${schema} NAME_WE)
if (NOT ${generated_output_dir} STREQUAL "")
if(NOT ${generated_output_dir} STREQUAL "")
set(generated_file ${generated_output_dir}/${filename}_generated.h)
if (if_inner MATCHES "inner")
if(if_inner MATCHES "inner")
add_custom_command(
OUTPUT ${generated_file}
COMMAND ${FLATC} --gen-mutable
@ -107,7 +107,7 @@ function(ms_build_flatbuffers_lite source_schema_files
add_custom_target(${custom_target_name} ALL
DEPENDS ${total_generated_files})
if (NOT ${generated_output_dir} STREQUAL "")
if(NOT ${generated_output_dir} STREQUAL "")
include_directories(${generated_output_dir})
set_property(TARGET ${custom_target_name}
PROPERTY GENERATED_OUTPUT_DIR

@ -1,12 +1,12 @@
set(glog_CXXFLAGS "-D_FORTIFY_SOURCE=2 -O2 ${SECURE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0")
set(glog_CFLAGS "-D_FORTIFY_SOURCE=2 -O2")
if (ENABLE_GITEE)
if(ENABLE_GITEE)
set(REQ_URL "https://gitee.com/mirrors/glog/repository/archive/v0.4.0.tar.gz")
set(MD5 "22fe340ddc231e6c8e46bc295320f8ee")
else()
set(REQ_URL "https://github.com/google/glog/archive/v0.4.0.tar.gz")
set(MD5 "0daea8785e6df922d7887755c3d100d0")
endif ()
endif()
mindspore_add_pkg(glog
VER 0.4.0
LIBS glog

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save