Compare commits

...

206 Commits
master ... r0.6

Author SHA1 Message Date
mindspore-ci-bot a2edfcb09b !8171 【轻量级 PR】:update RELEASE.md.
5 years ago
mindspore-ci-bot bbff1828ba !8185 fix securec download links due to mistakes made by openeuler community
5 years ago
yanghaoran 94c644cb52 update graphengine, fix securec download links
5 years ago
shenwei41 df90cf1538 update RELEASE.md.
5 years ago
mindspore-ci-bot 4ca658319b !6531 【MD】r0.6 Branch: MD5 value update in the file - icu4c.cmake of branch r0.6
6 years ago
mayang aa89c9f33c MD5 value update in the file icu4c.cmake of branch r0.6
6 years ago
mindspore-ci-bot d1b1a626c2 !5447 Support manual convert to quantative network of resnet
6 years ago
chenfei d27f7bf88b add manual quantative network of resnet
6 years ago
mindspore-ci-bot 50d7480a4e !4457 modify yolov3_quant eval script
6 years ago
chengxianbin ef9e3a5360 modify yolov3_darknet53
6 years ago
mindspore-ci-bot 04a6612baf !4424 modify quant DenseBnAct API
6 years ago
chengxianbin 7bc5b71b44 modify quant DenseBnAct code
6 years ago
mindspore-ci-bot 30452899ec !4351 modify yolov3-darknet quant net codes
6 years ago
chengxianbin 59863abcd3 modify yolov3-darknet53 quant code
6 years ago
mindspore-ci-bot a15ae5238d !4304 upload yolov3-darknet quant net codes
6 years ago
chengxianbin c80a1da8ac upload yolov3-darknet53 quant code
6 years ago
mindspore-ci-bot 7d483cd09c !4115 runpackage sync C75B050 for mindspore r0.6
6 years ago
wuweikang 9f3dcd7ab9 runpackage sync C75B050 for r0.6
6 years ago
mindspore-ci-bot 801660ef08 !3912 fix numpyslice bug
6 years ago
YangLuo 16f54c900b fix numpyslice bug
6 years ago
mindspore-ci-bot 5465525f09 !3812 upgrade dockerfile version to 0.6.0-beta
6 years ago
mindspore-ci-bot d9320b1606 !3805 modify release note for 0.6
6 years ago
yanghaoran 34f2e94bd4 update mindspore version to 0.6.0-beta
6 years ago
changzherui a0e575a17d modify release
6 years ago
lujiale dc4e15d32c update RELEASE.md.
6 years ago
lujiale 917a7e227f update RELEASE.md.
6 years ago
lujiale 1b7daf777a update build.sh.
6 years ago
mindspore-ci-bot 7d6160516f !3761 simplify googlenet
6 years ago
panfengfeng ca881ec03e add maxpool_with_argmax/grad cuda kernel
6 years ago
mindspore-ci-bot 983437feaf !3757 debug mindspore hub
6 years ago
chenzomi a059e8910f debug mindspore hub
6 years ago
mindspore-ci-bot 9dc23eeb98 !3602 Delete hard code in pull node
6 years ago
ZPaC 78e3cb4bc4 Delete hard code in pull kernel.
6 years ago
mindspore-ci-bot 0db3ff5773 !3742 fix GetInputReshapeType reports ERROR
6 years ago
mindspore-ci-bot c9583ad3a4 !3730 fix bug of cast dtype when using mix_presion in pynative mode
6 years ago
mindspore-ci-bot 294520e1fd !3548 Pass optimzier attributes to push kernel and parameter server.
6 years ago
mindspore-ci-bot 4621565258 !3733 block trans data to change format
6 years ago
mindspore-ci-bot b3b71e1d3f !3724 modify readme and timemoniter steps
6 years ago
liubuyu 7d5e523743 fix set/get reshape type bug
6 years ago
mindspore-ci-bot 0fb669190a !3703 Enlarge the threshold of resnet50 performance st in pynative
6 years ago
jinyaohui db216a077a fix bug of cast dtype when using mix_presion in pynative mode
6 years ago
lvchangquan f298e55072 block use trans data to change format
6 years ago
mindspore-ci-bot dcd471eb96 !3718 add mindspore hub for download ckpt file
6 years ago
wanghua c9a675f4e5 modify readme and timemoniter steps
6 years ago
mindspore-ci-bot fdc183ad36 !3704 [r0.6][bug][auto_mixed_precision]fix amp bug in eval
6 years ago
lvliang 937c5b5d8e enlarge the threshold of resnet50 performance in pynative
6 years ago
chenzomi 783b823a25 add mindspore hub for download ckpt file
6 years ago
mindspore-ci-bot 30ffcd8a1f !3681 modelzoo: support vgg16 in GPU
6 years ago
mindspore-ci-bot 9ab94fa076 !3685 add tinybert scripts
6 years ago
mindspore-ci-bot 944929f980 !3682 add googlenet gpu
6 years ago
mindspore-ci-bot 09dd4128d5 !3689 fix cpu multi graph mem error
6 years ago
Wei Luning ca4b2f6c0b fix eval in amp
6 years ago
mindspore-ci-bot 7f3926429b !3628 fix log bug
6 years ago
kswang 7360a2fa07 fix cpu multi graph mem error
6 years ago
mindspore-ci-bot 10f0f0d5a5 !3673 fix serving input numbers
6 years ago
mindspore-ci-bot 6b81f9f7f7 !3683 Modify patches and alerts
6 years ago
mindspore-ci-bot 5a36b19e80 !3666 Modify the order of init and open of TDT
6 years ago
mindspore-ci-bot 6944af09ee !3596 fix batchnorm issue under mix precision in pynative mode
6 years ago
ms_yan e497117b74 init add vgg16 gpu version
6 years ago
mindspore-ci-bot 78375e104a !3680 lowering value checking threshold to fix bug of pass eps
6 years ago
mindspore-ci-bot abd346e84b !3649 modify setup.py version number for r0.6
6 years ago
mindspore-ci-bot 9156775655 !3677 support multy node training in deeplabv3
6 years ago
mindspore-ci-bot df7f0c8a7c !3659 modify readme for maskrcnn
6 years ago
wanghua 9da1c96c4a add tinybert scripts
6 years ago
panfengfeng 7d5a67e9f0 googlenet-gpu
6 years ago
kingfo fc92598881 fix batchnorm issue in pynative auto mix precision
6 years ago
mindspore-ci-bot e3fe1d76ca !3558 Fix a racing condition in CacheMergeOp when the leaf hits an error and exit too early
6 years ago
mindspore-ci-bot b429a8421f !3586 fix python api doc for mindspore .dataset
6 years ago
mindspore-ci-bot bb4339e3ca !3584 Fix a DatasetCache sharing scenario
6 years ago
shenwei41 e49a2f83e7 Modify patches and alerts
6 years ago
mindspore-ci-bot 1ec63700c7 !3632 Fix resource not release bug
6 years ago
wangnan39@huawei.com fc5d419422 Lowering value checking threshold to support fix the bug of pass add eps
6 years ago
mindspore-ci-bot d4b5cda934 !3604 Fix minor errors in probabilistic programming
6 years ago
ZPaC d6a56cd6fd Pass optimizer attributes to push nodes.
6 years ago
mindspore-ci-bot f04243b1f1 !3663 Fix multi worker
6 years ago
mindspore-ci-bot 6b57b4f0e1 !3652 add epoch_num description
6 years ago
zhouyaqiang b096a6cbe9 support multy node training and remove code
6 years ago
hanjun996 c718774538 modify tdt
6 years ago
mindspore-ci-bot 68128f87a9 !3634 Spilt unsupported transdata
6 years ago
mindspore-ci-bot 22dbd1a233 !3646 [MD] fix minddataset core dump when file list size ia greater than 1000.
6 years ago
hexia 52776820d8 fix_input_check
6 years ago
guansongsong 5b15f40598 Fix a DatasetCache sharing scenario
6 years ago
cristoval bf74164df3 fix sync sgd under multi-worker
6 years ago
meixiaowei e5b9776b86 modify readme
6 years ago
panfengfeng 8803c6258d add epoch_num
6 years ago
changzherui 614841aa39 modify setup version number
6 years ago
wuyongkang 983cb9b23d Fix resource not release bug
6 years ago
guansongsong 68f27eb62b fix python api doc for mindspore.dataset
6 years ago
mindspore-ci-bot 924a34acb8 !3639 fix GeneratorDataset time out
6 years ago
mindspore-ci-bot db01f3eafe !3640 support bprop for const in pynative and develop stridedslice and isinstance
6 years ago
liyong 66d8395fea fix coredump when number of file list more than 1000.
6 years ago
mindspore-ci-bot e33b5e435e !3633 fix dataset & train gil lock of gpu process
6 years ago
mindspore-ci-bot 477bf42fe5 !3641 Update submodule akg to r0.6 branch
6 years ago
WilliamLian edba641ddb split unsupported transdata
6 years ago
mindspore-ci-bot 338a225410 !3623 [r0.6][bug][auto_mixed_precision]fix amp doc and eval network build
6 years ago
looop5 13d8bedbf4 update submodule akg to r0.6 branch
6 years ago
mindspore-ci-bot 9a43468fee !3626 fix: device occupied tdt hung
6 years ago
buxue 6beb8071d7 support bprop for const in pynative and develop stridedslice and isinstance.
6 years ago
mindspore-ci-bot cc233f66ab !3629 Fix numpyslice issue
6 years ago
yanghaitao 248130e5d1 fix generator time out
6 years ago
mindspore-ci-bot 8f6eafdfcd !3589 fix the description of cache
6 years ago
xiefangqi 30ed5a25ce fix numpyslice issue to r0.6
6 years ago
panfengfeng 4eea891730 fix dataset train gil of gpu
6 years ago
gukecai fe29a2501f fix log bug
6 years ago
jonyguo 0d375bbaa3 fix: device occupied tdt hung
6 years ago
mindspore-ci-bot 4f1e586ee3 !3579 fix maskrcnn dataset rescale bug
6 years ago
Wei Luning dd26d85caf fix doc and eval network build in amp
6 years ago
peixu_ren 49cdeb3f78 Fix minor errors in probabilistic programming
6 years ago
mindspore-ci-bot d9ca3f2e88 !3566 dataset: api format problem in totype, totensor, slice
6 years ago
mindspore-ci-bot c5f8b6b0c7 !3599 merge fix sparse doc to r0.6
6 years ago
panyifeng 3714a07d71 fix sparse api doc
6 years ago
mindspore-ci-bot 950367c102 !3595 add desc about sink_size
6 years ago
jinyaohui 40b859395d add description about sink_size
6 years ago
mindspore-ci-bot d7caa7955b !3582 Fix minddata cache include flatbuffer head problem
6 years ago
mindspore-ci-bot 552490326f !3572 [MD] fix save pydoc and log
6 years ago
guansongsong 543b75f366 fix the description of cache
6 years ago
mindspore-ci-bot 3d87436bb0 !3580 fix allreduce fusion case in grad reducer
6 years ago
ms_yan 47efc83bcd repair api format problem in totype, totensor, slice
6 years ago
xiefangqi 0e4065f0ef fix flatbuffer head to r0.6
6 years ago
Ziyan fdb21ecf74 update
6 years ago
meixiaowei 7df05b1da7 fix rescale dataset bug
6 years ago
mindspore-ci-bot c617a07dff !3533 modify serving readme
6 years ago
liyong f52859a2fc fix save op pydoc and log
6 years ago
mindspore-ci-bot 2a6884d97c !3564 [Auto parallel] Cost model for GPU
6 years ago
dinghao b54fc35cde modify serving readme
6 years ago
Xiaoda Zhang ab676ba81a add costmodel for gpu
6 years ago
Jesse Lee f118869869 Fix a merge_op timing hole
6 years ago
mindspore-ci-bot c31c1c808a !3530 Fix a bug for Parameter
6 years ago
mindspore-ci-bot 67600c1d8c !3539 Change at-most collected tensor summary from 50 to 20 when auto-calculated
6 years ago
mindspore-ci-bot 49e8727d37 !3518 fix python import r0.6
6 years ago
mindspore-ci-bot 36c2bbdbcc !3501 fix sparse feature bug for auto parallel
6 years ago
mindspore-ci-bot a536e922c2 !3524 add bert ci script to r0.6 branch
6 years ago
Li Hongzhang d86668d216 change at-most collected tensor from 50 to 20
6 years ago
mindspore-ci-bot bcba696a62 !3482 `max_file_size` includes metadata and drops the last step
6 years ago
He Wei 1f6771256d Fix a bug for Parameter
6 years ago
yoonlee666 1dcf9abf6a add bert ci script
6 years ago
hexia 5fb1280e12 fix python import
6 years ago
mindspore-ci-bot dfab48d532 !3492 Change readme.txt in WarpCTC and checkpoint directory
6 years ago
Li Hongzhang 5a517f3a49 max_file_size include metadata length and drop last step
6 years ago
mindspore-ci-bot 62cf01fc7b !3509 Add parameter server mode_zoo case and CI test cases.
6 years ago
ZPaC b109e6f643 Add parameter server model_zoo case and CI test cases.
6 years ago
mindspore-ci-bot fdf198eee9 !3493 Modify comment of register_backward_hook [r0.6]
6 years ago
mindspore-ci-bot 7f6f140d94 !3498 Fix getting output address of internal output
6 years ago
mindspore-ci-bot ec3e7269ba !3505 merge eager mode enable sparse to r0.6
6 years ago
panyifeng 032c5e0fdc eager mode enable sparse
6 years ago
mindspore-ci-bot 9626532e0b !3499 Delete parameter name hard code for embedding-lookup
6 years ago
mindspore-ci-bot 304ae51a25 !3470 Init CSV column default list when it's empty r0.6
6 years ago
yangyongjie 2241017e3f fix word missing in readme.txt
6 years ago
ZPaC c1b36c3d4f Delete parameter name hard code for embedding table.
6 years ago
lirongzhen1 8af4a16d9d fix sparse feature bug for auto parallel
6 years ago
yujianfeng 67ed5451ad Fix getting output address of internal output
6 years ago
mindspore-ci-bot ac564a9e86 !3466 fix cpu nonop net fp16 error
6 years ago
mindspore-ci-bot 375078cf55 !3471 Fixing Bug with AutoContrast/Equalize supporting uint8 dtype/mnist
6 years ago
simson 63bb52b408 Modify comment of register_backward_hook
6 years ago
mindspore-ci-bot c9f25d0d5c !3477 upload maskrcnn scripts
6 years ago
mindspore-ci-bot b0cb13d265 !3463 [MD]Fix Segementation Falut when SentencepieceTokenizer Op before zipOp and ConcatOp
6 years ago
mindspore-ci-bot 14ce0afab3 !3478 Add Warpctc GPU network
6 years ago
mindspore-ci-bot 26733198e9 !3458 fix getdataset size error r0.6
6 years ago
mindspore-ci-bot 73f58dc937 !3480 Graceful shutdown for ps modules
6 years ago
cristoval c1332c03e5 support graceful shutdown for ps components
6 years ago
meixiaowei 10c74de9b6 upload maskrcnn scripts
6 years ago
yangyongjie 28b9074e9b add warpctc GPU
6 years ago
mindspore-ci-bot 63442d563f !3402 [AutoParallel]Fix autoparallel gpu bug
6 years ago
islam_amin b0e83c5a06 Fixing AutoContrast/Equalize Bug
6 years ago
kswang 9f5315fc80 fix cpu nonop net fp16 error
6 years ago
panfengfeng 4e7cb1a7a4 fix get daataset size error
6 years ago
jiangzhiwen d408cdf0e0 init column_default_list_ when it is empty
6 years ago
mindspore-ci-bot c5e6cfebe7 !3436 fix mix precision operator issue
6 years ago
cristoval aac2275d1b support graceful shutdown for ps components
6 years ago
mindspore-ci-bot 70aee2fe7a !3401 cpp client example
6 years ago
xulei2020 c43bc92d7c add code
6 years ago
kingfo 5916da1763 fix mix precision operator issue
6 years ago
mindspore-ci-bot 50e20e4042 !3443 Restore the code to collect the graph network
6 years ago
Li Hongzhang 2373e94384 restore the ability to collect network graph
6 years ago
mindspore-ci-bot cda920b21b !3432 add single quotes and modify parameters
6 years ago
mindspore-ci-bot af4b4fb36d !3417 fix bug of group lr when save ckpt
6 years ago
mindspore-ci-bot 927a52fdf8 !3388 Transfer tuple getitem's control to new added memcpy_async
6 years ago
mindspore-ci-bot 0f8c4d6794 !3428 modify annotation: wegith_decay modify weight_decay
6 years ago
李嘉琪 8feb9450f2 add single quotes and modify parameters
6 years ago
lilei f304fe9614 modify weight_decay annotation
6 years ago
mindspore-ci-bot e62137f7c0 !3406 fix optimizer parallel problems
6 years ago
mindspore-ci-bot c005dfd803 !3389 merge sparse hot fix to r0.6
6 years ago
mindspore-ci-bot a051d7c5dc !3410 [bug][ci]fix bug when remove the phis
6 years ago
wangnan39@huawei.com 3c93ff3385 fix_bug_of_group_lr_when_save_ckpt
6 years ago
Wei Luning 43d4f80428 fix bug in remove phiphi should replace the inner ones first
6 years ago
Ziyan 9f264b6e55 fix optimizer parallel problems
6 years ago
panyifeng 2cebc62bbf fix sparse related issues
6 years ago
mindspore-ci-bot f9aec99c01 !3379 modify the vgg16/lstm path to offical/{cv/nlp}
6 years ago
CaoJian 80a655099a modify the vgg16/lstm path to offical/{cv/nlp}
6 years ago
hexia f14974392c cpp_client_example_r0.6
6 years ago
huanghui 3901c0414f deal tuple getitem control for new added memcpy
6 years ago
lichenever 12738ceda7 fix auto parallel gpu bug
6 years ago
mindspore-ci-bot fe0348b3d7 !3380 Fix visit depend node
6 years ago
mindspore-ci-bot 93ce266ae5 !3373 support call super when class define in test_case
6 years ago
WilliamLian 35b466f8f7 fix visit depend node
6 years ago
buxue 15487759ff support call super when class define in test_case.
6 years ago
mindspore-ci-bot 251fba00f5 !3363 fix cloner when funcgraph return is null
6 years ago
mindspore-ci-bot 984be47299 !3365 restructure client example
6 years ago
mindspore-ci-bot 45d8a9eea3 !3354 improve performance of bert by adding order paramters
6 years ago
mindspore-ci-bot 5cdfbf0e82 !3359 fix cpu nonop net
6 years ago
hexia 9daa8a890b restructure client example
6 years ago
leopz 61bf0c5d99 fix cloner when funcgraph is null
6 years ago
mindspore-ci-bot 27982ebbe8 !3347 Fix internal multiple outputs check
6 years ago
kswang 926120ef95 cpu support nonop net
6 years ago
shibeiji 1ae2d2d6c8 add order params for bert to improve performance
6 years ago
yujianfeng 16035dc62c Fix internal multiple outputs check
6 years ago

@ -106,6 +106,7 @@ endif() # NOT ENABLE_ACL
if (ENABLE_SERVING)
add_subdirectory(serving)
add_subdirectory(serving/example/cpp_client)
endif()
if (NOT ENABLE_ACL)

@ -75,7 +75,7 @@ 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/0.5.0-beta/MindSpore/cpu/ubuntu_x86/mindspore-0.5.0-cp37-cp37m-linux_x86_64.whl
pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/0.6.0-beta/MindSpore/cpu/ubuntu_x86/mindspore-0.6.0-cp37-cp37m-linux_x86_64.whl
```
2. Run the following command to verify the install.

File diff suppressed because one or more lines are too long

2
akg

@ -1 +1 @@
Subproject commit f60af9df4220bf3db5de2b224418953c0dc1f625
Subproject commit 5c0e3d2ffb6ba7650453c3b11163237a43d206d6

@ -491,9 +491,9 @@ build_predict()
cd "${BASEPATH}/predict/output/"
if [[ "$PREDICT_PLATFORM" == "x86_64" ]]; then
tar -cf MSPredict-0.5.0-linux_x86_64.tar.gz include/ lib/ --warning=no-file-changed
tar -cf MSPredict-0.6.0-linux_x86_64.tar.gz include/ lib/ --warning=no-file-changed
elif [[ "$PREDICT_PLATFORM" == "arm64" ]]; then
tar -cf MSPredict-0.5.0-linux_aarch64.tar.gz include/ lib/ --warning=no-file-changed
tar -cf MSPredict-0.6.0-linux_aarch64.tar.gz include/ lib/ --warning=no-file-changed
fi
echo "success to build predict project!"
}

@ -8,7 +8,7 @@ else()
VER 67.1
LIBS ${LIB_ICU_COMMON} ${LIB_ICU_DATA} ${LIB_ICU_I18N}
URL https://github.com/unicode-org/icu/archive/release-67-1.tar.gz
MD5 0c2662a2b0bc80b0eb56495205247c8f
MD5 fd525fb47d8827b0b7da78b51dd2d93f
CONFIGURE_COMMAND ${CMAKE_SOURCE_DIR}/scripts/build_icu4c.sh
)
include_directories(${icu4c_INC})

@ -12,6 +12,7 @@ mindspore_add_pkg(jpeg_turbo
URL https://github.com/libjpeg-turbo/libjpeg-turbo/archive/2.0.4.tar.gz
MD5 44c43e4a9fb352f47090804529317c88
CMAKE_OPTION -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_RPATH=TRUE
PATCHES ${CMAKE_SOURCE_DIR}/third_party/patch/jpeg_turbo/jpeg_turbo.patch001
)
include_directories(${jpeg_turbo_INC})
add_library(mindspore::jpeg_turbo ALIAS jpeg_turbo::jpeg)

@ -278,6 +278,13 @@ if (ENABLE_SERVING)
COMPONENT mindspore
)
file(GLOB MS_SERVING_PY_LIST ${CMAKE_SOURCE_DIR}/serving/*.py)
install(
FILES ${MS_SERVING_PY_LIST}
DESTINATION ${INSTALL_PY_DIR}
COMPONENT mindspore
)
install(
TARGETS inference
DESTINATION ${INSTALL_LIB_DIR}

@ -0,0 +1,67 @@
FROM ubuntu:18.04
MAINTAINER leonwanghui <leon.wanghui@huawei.com>
# Set env
ENV PYTHON_ROOT_PATH /usr/local/python-3.7.5
ENV PATH /usr/local/bin:$PATH
# Install base tools
RUN apt update \
&& DEBIAN_FRONTEND=noninteractive apt install -y \
vim \
wget \
curl \
xz-utils \
net-tools \
openssh-client \
git \
ntpdate \
tzdata \
tcl \
sudo \
bash-completion
# Install compile tools
RUN DEBIAN_FRONTEND=noninteractive apt install -y \
gcc \
g++ \
zlibc \
make \
libgmp-dev \
patch \
autoconf \
libtool \
automake \
flex
# Set bash
RUN echo "dash dash/sh boolean false" | debconf-set-selections
RUN DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash
# Install python (v3.7.5)
RUN apt install -y libffi-dev libssl-dev zlib1g-dev libbz2-dev libncurses5-dev \
libgdbm-dev libgdbm-compat-dev liblzma-dev libreadline-dev libsqlite3-dev \
&& cd /tmp \
&& wget https://github.com/python/cpython/archive/v3.7.5.tar.gz \
&& tar -xvf v3.7.5.tar.gz \
&& cd /tmp/cpython-3.7.5 \
&& mkdir -p ${PYTHON_ROOT_PATH} \
&& ./configure --prefix=${PYTHON_ROOT_PATH} \
&& make -j4 \
&& make install -j4 \
&& rm -f /usr/local/bin/python \
&& rm -f /usr/local/bin/pip \
&& ln -s ${PYTHON_ROOT_PATH}/bin/python3.7 /usr/local/bin/python \
&& ln -s ${PYTHON_ROOT_PATH}/bin/pip3.7 /usr/local/bin/pip \
&& rm -rf /tmp/cpython-3.7.5 \
&& rm -f /tmp/v3.7.5.tar.gz
# Set pip source
RUN mkdir -pv /root/.pip \
&& echo "[global]" > /root/.pip/pip.conf \
&& echo "trusted-host=mirrors.aliyun.com" >> /root/.pip/pip.conf \
&& echo "index-url=http://mirrors.aliyun.com/pypi/simple/" >> /root/.pip/pip.conf
# Install MindSpore cpu whl package
RUN pip install --no-cache-dir https://ms-release.obs.cn-north-4.myhuaweicloud.com/0.6.0-beta/MindSpore/cpu/ubuntu_x86/mindspore-0.6.0-cp37-cp37m-linux_x86_64.whl

@ -0,0 +1,83 @@
FROM nvidia/cuda:10.1-cudnn7-runtime-ubuntu18.04
MAINTAINER leonwanghui <leon.wanghui@huawei.com>
# Set env
ENV PYTHON_ROOT_PATH /usr/local/python-3.7.5
ENV OMPI_ROOT_PATH /usr/local/openmpi-3.1.5
ENV PATH ${OMPI_ROOT_PATH}/bin:/usr/local/bin:$PATH
ENV LD_LIBRARY_PATH ${OMPI_ROOT_PATH}/lib:$LD_LIBRARY_PATH
# Install base tools
RUN apt update \
&& DEBIAN_FRONTEND=noninteractive apt install -y \
vim \
wget \
curl \
xz-utils \
net-tools \
openssh-client \
git \
ntpdate \
tzdata \
tcl \
sudo \
bash-completion
# Install compile tools
RUN DEBIAN_FRONTEND=noninteractive apt install -y \
gcc \
g++ \
zlibc \
make \
libgmp-dev \
patch \
autoconf \
libtool \
automake \
flex \
libnccl2=2.4.8-1+cuda10.1 \
libnccl-dev=2.4.8-1+cuda10.1
# Set bash
RUN echo "dash dash/sh boolean false" | debconf-set-selections
RUN DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash
# Install python (v3.7.5)
RUN apt install -y libffi-dev libssl-dev zlib1g-dev libbz2-dev libncurses5-dev \
libgdbm-dev libgdbm-compat-dev liblzma-dev libreadline-dev libsqlite3-dev \
&& cd /tmp \
&& wget https://github.com/python/cpython/archive/v3.7.5.tar.gz \
&& tar -xvf v3.7.5.tar.gz \
&& cd /tmp/cpython-3.7.5 \
&& mkdir -p ${PYTHON_ROOT_PATH} \
&& ./configure --prefix=${PYTHON_ROOT_PATH} \
&& make -j4 \
&& make install -j4 \
&& rm -f /usr/local/bin/python \
&& rm -f /usr/local/bin/pip \
&& ln -s ${PYTHON_ROOT_PATH}/bin/python3.7 /usr/local/bin/python \
&& ln -s ${PYTHON_ROOT_PATH}/bin/pip3.7 /usr/local/bin/pip \
&& rm -rf /tmp/cpython-3.7.5 \
&& rm -f /tmp/v3.7.5.tar.gz
# Set pip source
RUN mkdir -pv /root/.pip \
&& echo "[global]" > /root/.pip/pip.conf \
&& echo "trusted-host=mirrors.aliyun.com" >> /root/.pip/pip.conf \
&& echo "index-url=http://mirrors.aliyun.com/pypi/simple/" >> /root/.pip/pip.conf
# Install openmpi (v3.1.5)
RUN cd /tmp \
&& wget https://download.open-mpi.org/release/open-mpi/v3.1/openmpi-3.1.5.tar.gz \
&& tar -xvf openmpi-3.1.5.tar.gz \
&& cd /tmp/openmpi-3.1.5 \
&& mkdir -p ${OMPI_ROOT_PATH} \
&& ./configure --prefix=${OMPI_ROOT_PATH} \
&& make -j4 \
&& make install -j4 \
&& rm -rf /tmp/openmpi-3.1.5 \
&& rm -f /tmp/openmpi-3.1.5.tar.gz
# Install MindSpore cuda-10.1 whl package
RUN pip install --no-cache-dir https://ms-release.obs.cn-north-4.myhuaweicloud.com/0.6.0-beta/MindSpore/gpu/ubuntu_x86/cuda-10.1/mindspore_gpu-0.6.0-cp37-cp37m-linux_x86_64.whl

@ -1 +1 @@
Subproject commit 103f2d1019dc50d781d7a964551d9f1f50b3b009
Subproject commit 885af56694eff438a4ea079c0c34de30993f1473

@ -14,7 +14,10 @@
# ============================================================================
"""builtin_operations"""
import numpy as np
from mindspore.ops import functional as F
from mindspore.ops import composite as C
from mindspore.common.tensor import Tensor
import mindspore.common.dtype as mstype
from mindspore.common.dtype import dtype_to_nptype, get_py_obj_dtype
@ -113,6 +116,7 @@ def bool_or(x, y):
"""Implement `bool_or`."""
return x or y
def vm_compare(*args):
"""Implement `vm_compare` for tensor."""
obj_str = args[-1]
@ -141,10 +145,12 @@ def list_len(x):
"""Implement `list_len`."""
return len(x)
def Depend(value, expr):
"""Implement `Depend`."""
return value
# only used in PyNative mode
def make_ref(key, value, ref):
return value
@ -171,3 +177,16 @@ def tuple_to_array(x):
def stop_gradient(x):
"""Implement `stop_gradient`."""
return x
hyper_map = C.HyperMap()
def mixed_precision_cast(dst_type, x):
"""Implement `mixed_precision_cast`."""
def cast_inner(data):
if isinstance(data, Tensor) and data.dtype in (mstype.float32, mstype.float16):
return F.cast(data, dst_type)
return data
return hyper_map(cast_inner, x)

@ -459,27 +459,27 @@ class Parser:
logger.debug("ops info = %r", ops_info)
return ops_info
def analyze_super(self, father_class_node, subclass_instance):
def analyze_super(self, class_type_node, subclass_instance):
"""Analyze super and return a class instance."""
father_class = None
if father_class_node is None:
father_class = type(subclass_instance)
if isinstance(father_class_node, ast.Name):
father_class_name = getattr(father_class_node, 'id')
father_class = self.global_namespace[father_class_name]
if isinstance(father_class_node, ast.Attribute):
value = getattr(father_class_node, 'value')
attr = getattr(father_class_node, 'attr')
module_name = getattr(value, 'id')
father_class_module = self.global_namespace[module_name]
father_class = getattr(father_class_module, attr)
if father_class is None:
raise ValueError("When call 'super', the father class is None.")
if not isinstance(subclass_instance, father_class):
sub_class = type(subclass_instance)
if class_type_node is None:
return super(sub_class, subclass_instance)
if isinstance(class_type_node, ast.Name):
class_name = getattr(class_type_node, 'id')
elif isinstance(class_type_node, ast.Attribute):
class_name = getattr(class_type_node, 'attr')
else:
raise ValueError(f"When call 'super', the first arg should be a class type, "
f"but got {class_type_node.__class__.__name__}.")
target_father_class = None
for class_element in sub_class.mro():
if class_element.__name__ == class_name:
target_father_class = class_element
break
if target_father_class is None:
raise ValueError("When call 'super', the second arg should be an instance of first arg.")
target_class_instance = super(father_class, subclass_instance)
return target_class_instance
return super(target_father_class, subclass_instance)
def get_location(self, node):
"""

@ -132,7 +132,9 @@ def while_cond(x):
@constexpr
def check_type_same(x_type, base_type):
"""Check x_type is same as base_type."""
return mstype.issubclass_(x_type, base_type)
if mstype.issubclass_(x_type, base_type):
return True
raise TypeError(f"The arg 'x' should be a {base_type}, but got {x_type}.")
@constexpr

@ -31,8 +31,9 @@ class PServerKernel {
~PServerKernel() = default;
PServerKernel(const PServerKernel &) = delete;
PServerKernel &operator=(const PServerKernel &) = delete;
virtual void InitKernel(const std::shared_ptr<std::vector<std::shared_ptr<std::vector<size_t>>>> &) {}
virtual void InitKernel(const CNodePtr &cnode,
const std::shared_ptr<std::vector<std::shared_ptr<std::vector<size_t>>>> &) {}
virtual void ReInit(const std::shared_ptr<std::vector<std::shared_ptr<std::vector<size_t>>>> &) {}
virtual bool Execute(const std::vector<AddressPtr> &inputs, const std::vector<AddressPtr> &workspace,
const std::vector<AddressPtr> &outputs) = 0;

@ -33,8 +33,9 @@ class PullKernel : public CPUKernel {
~PullKernel() override = default;
bool Launch(const std::vector<AddressPtr> &inputs, const std::vector<AddressPtr> &, const std::vector<AddressPtr> &) {
// If the paramter is embedding table, don't Pull from PServer.
if (param_name_.find("embedding") == std::string::npos && param_name_.find("wide_w") == std::string::npos) {
bool init_in_server = mindspore::parallel::ps::Worker<float>::GetInstance().GetParamInitInServer(param_name_);
// If init_in_server, forward kernel should run in server too.
if (!init_in_server) {
parallel::ps::Worker<T>::GetInstance().Pull(key_, inputs[1]->addr, inputs[1]->size);
}
return true;

@ -43,7 +43,10 @@ class PushKernel : public CPUKernel {
sizes.push_back(SizeToInt(input->size) / sizeof(T));
}
parallel::ps::Worker<T>::GetInstance().Push(keys, addrs, sizes);
memcpy_s(outputs[0]->addr, sizeof(size_t), &key_, sizeof(size_t));
auto ret = memcpy_s(outputs[0]->addr, sizeof(size_t), &key_, sizeof(size_t));
if (ret != EOK) {
MS_LOG(EXCEPTION) << "Lookup id memcpy failed.";
}
return true;
}

@ -23,7 +23,7 @@ namespace mindspore {
namespace kernel {
namespace ps {
void SparseApplyAdamPSKernel::InitKernel(
const std::shared_ptr<std::vector<std::shared_ptr<std::vector<size_t>>>> &shapes) {
const CNodePtr &cnode, const std::shared_ptr<std::vector<std::shared_ptr<std::vector<size_t>>>> &shapes) {
const std::vector<std::shared_ptr<std::vector<size_t>>> &shape_vec = *shapes;
std::vector<size_t> &var_shape = *(shape_vec[0]);
std::vector<size_t> &m_shape = *(shape_vec[1]);
@ -55,11 +55,9 @@ void SparseApplyAdamPSKernel::InitKernel(
if (grad_shape[0] != indices_size_) {
MS_LOG(ERROR) << "The first dimension of grad shape must be equal to indices";
}
/*
if (AnfAlgo::HasNodeAttr(USE_NESTEROV, kernel_node)) {
use_nesterov_ = AnfAlgo::GetNodeAttr<bool>(kernel_node, "use_nesterov");
if (AnfAlgo::HasNodeAttr(USE_NESTEROV, cnode)) {
use_nesterov_ = AnfAlgo::GetNodeAttr<bool>(cnode, "use_nesterov");
}
*/
workspace_size_list_.emplace_back(indices_size_ * var_outer_dim_size_ * sizeof(float));
workspace_size_list_.emplace_back(indices_size_ * sizeof(int));
workspace_size_list_.emplace_back(indices_size_ * var_outer_dim_size_ * sizeof(float));

@ -30,7 +30,8 @@ class SparseApplyAdamPSKernel : public SparseApplyAdamCPUKernel, public PServerK
SparseApplyAdamPSKernel(size_t rank_id, size_t pserver_num) : PServerKernel(rank_id, pserver_num) {}
~SparseApplyAdamPSKernel() override = default;
void InitKernel(const std::shared_ptr<std::vector<std::shared_ptr<std::vector<size_t>>>> &) override;
void InitKernel(const CNodePtr &cnode,
const std::shared_ptr<std::vector<std::shared_ptr<std::vector<size_t>>>> &) override;
void ReInit(const std::shared_ptr<std::vector<std::shared_ptr<std::vector<size_t>>>> &) override;
bool Execute(const std::vector<AddressPtr> &inputs, const std::vector<AddressPtr> &workspace,
const std::vector<AddressPtr> &outputs) override;

@ -20,7 +20,7 @@ namespace mindspore {
namespace kernel {
namespace ps {
void SparseApplyFtrlPSKernel::InitKernel(
const std::shared_ptr<std::vector<std::shared_ptr<std::vector<size_t>>>> &shapes) {
const CNodePtr &cnode, const std::shared_ptr<std::vector<std::shared_ptr<std::vector<size_t>>>> &shapes) {
const std::vector<std::shared_ptr<std::vector<size_t>>> &shape_vec = *shapes;
std::vector<size_t> var_shape = *(shape_vec[0]);
std::vector<size_t> accum_shape = *(shape_vec[1]);
@ -46,10 +46,22 @@ void SparseApplyFtrlPSKernel::InitKernel(
if (grad_shape[0] != indices_size_) {
MS_LOG(EXCEPTION) << "The first dimension of grad shape must be equal to indices";
}
lr_ = 0.01;
l1_ = 1e-8;
l2_ = 1e-8;
lr_power_ = -0.5;
lr_ = AnfAlgo::GetNodeAttr<float>(cnode, "lr");
if (lr_ <= 0) {
MS_LOG(EXCEPTION) << "lr should be a positive scalar";
}
l1_ = AnfAlgo::GetNodeAttr<float>(cnode, "l1");
if (l1_ < 0) {
MS_LOG(EXCEPTION) << "l1 should be a non-negative scalar";
}
l2_ = AnfAlgo::GetNodeAttr<float>(cnode, "l2");
if (l2_ < 0) {
MS_LOG(EXCEPTION) << "l2 should be a non-negative scalar";
}
lr_power_ = AnfAlgo::GetNodeAttr<float>(cnode, "lr_power");
if (lr_power_ > 0) {
MS_LOG(EXCEPTION) << "lr_power should be a non-positive scalar";
}
workspace_size_list_.emplace_back(indices_size_ * var_outer_dim_size_ * sizeof(float));
workspace_size_list_.emplace_back(indices_size_ * sizeof(int));
workspace_size_list_.emplace_back(indices_size_ * var_outer_dim_size_ * sizeof(float));

@ -30,7 +30,8 @@ class SparseApplyFtrlPSKernel : public SparseApplyFtrlCPUKernel, public PServerK
SparseApplyFtrlPSKernel(size_t rank_id, size_t pserver_num) : PServerKernel(rank_id, pserver_num) {}
~SparseApplyFtrlPSKernel() override = default;
void InitKernel(const std::shared_ptr<std::vector<std::shared_ptr<std::vector<size_t>>>> &) override;
void InitKernel(const CNodePtr &cnode,
const std::shared_ptr<std::vector<std::shared_ptr<std::vector<size_t>>>> &) override;
void ReInit(const std::shared_ptr<std::vector<std::shared_ptr<std::vector<size_t>>>> &) override;
bool Execute(const std::vector<AddressPtr> &inputs, const std::vector<AddressPtr> &workspace,

@ -23,7 +23,7 @@ namespace mindspore {
namespace kernel {
namespace ps {
void SparseApplyLazyAdamPSKernel::InitKernel(
const std::shared_ptr<std::vector<std::shared_ptr<std::vector<size_t>>>> &shapes) {
const CNodePtr &cnode, const std::shared_ptr<std::vector<std::shared_ptr<std::vector<size_t>>>> &shapes) {
const std::vector<std::shared_ptr<std::vector<size_t>>> &shape_vec = *shapes;
std::vector<size_t> &var_shape = *(shape_vec[0]);
std::vector<size_t> &m_shape = *(shape_vec[1]);
@ -55,11 +55,9 @@ void SparseApplyLazyAdamPSKernel::InitKernel(
if (grad_shape[0] != indices_size_) {
MS_LOG(ERROR) << "The first dimension of grad shape must be equal to indices";
}
/*
if (AnfAlgo::HasNodeAttr(USE_NESTEROV, kernel_node)) {
use_nesterov_ = AnfAlgo::GetNodeAttr<bool>(kernel_node, "use_nesterov");
if (AnfAlgo::HasNodeAttr(USE_NESTEROV, cnode)) {
use_nesterov_ = AnfAlgo::GetNodeAttr<bool>(cnode, "use_nesterov");
}
*/
workspace_size_list_.emplace_back(indices_size_ * var_outer_dim_size_ * sizeof(float));
workspace_size_list_.emplace_back(indices_size_ * sizeof(int));
workspace_size_list_.emplace_back(indices_size_ * var_outer_dim_size_ * sizeof(float));

@ -30,7 +30,8 @@ class SparseApplyLazyAdamPSKernel : public SparseApplyLazyAdamCPUKernel, public
SparseApplyLazyAdamPSKernel(size_t rank_id, size_t pserver_num) : PServerKernel(rank_id, pserver_num) {}
~SparseApplyLazyAdamPSKernel() override = default;
void InitKernel(const std::shared_ptr<std::vector<std::shared_ptr<std::vector<size_t>>>> &) override;
void InitKernel(const CNodePtr &cnode,
const std::shared_ptr<std::vector<std::shared_ptr<std::vector<size_t>>>> &) override;
void ReInit(const std::shared_ptr<std::vector<std::shared_ptr<std::vector<size_t>>>> &) override;
bool Execute(const std::vector<AddressPtr> &inputs, const std::vector<AddressPtr> &workspace,
const std::vector<AddressPtr> &outputs) override;

@ -0,0 +1,226 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <algorithm>
#include "maxpool_with_argmax_grad_impl.cuh"
#include "runtime/device/gpu/cuda_common.h"
#include "include/cuda_fp16.h"
template <typename T, typename S>
__global__ void MaxPoolWithArgmaxGrad(const T* x,
const T* dy,
const S* index,
const int n,
const int c,
const int xHeight,
const int xWidth,
const int dyHeight,
const int dyWidth,
const int windowHeight,
const int windowWidth,
const int strideHeight,
const int strideWidth,
const int padTop,
const int padLeft,
const int xNCHW,
const int xCHW,
const int xHW,
const int dyCHW,
const int dyHW,
T* dx) {
for (size_t pos = blockIdx.x * blockDim.x + threadIdx.x;
pos < (xNCHW);
pos += blockDim.x * gridDim.x) {
const int posn = pos / xCHW;
const int posc = pos / xHW % c;
const int posh = pos / xHeight % xHeight;
const int posw = pos % xWidth;
const S posIdx = posh*xWidth + posw;
int hstart = posh+padTop;
if (hstart < windowHeight) {
hstart = 0;
} else {
hstart = (hstart-windowHeight)/strideHeight + 1;
}
int wstart = posw+padLeft;
if (wstart < windowWidth) {
wstart = 0;
} else {
wstart = (wstart-windowWidth)/strideWidth + 1;
}
const int hend = min((posh+padTop)/strideHeight +1, dyHeight);
const int wend = min((posw+padLeft)/strideWidth +1, dyWidth);
const int channelStart = posn*dyCHW + posc*dyHW;
T dySum = static_cast<T>(0.0);
for (int hcur = hstart; hcur < hend; ++hcur) {
for (int wcur = wstart; wcur < wend; ++wcur) {
const int curIdx = hcur*dyWidth + wcur;
S maxIdx = index[channelStart+curIdx];
if (maxIdx == posIdx) {
dySum += dy[channelStart+curIdx];
}
}
}
dx[pos] = dySum;
}
return;
}
template <>
__global__ void MaxPoolWithArgmaxGrad(const half* x,
const half* dy,
const int* index,
const int n,
const int c,
const int xHeight,
const int xWidth,
const int dyHeight,
const int dyWidth,
const int windowHeight,
const int windowWidth,
const int strideHeight,
const int strideWidth,
const int padTop,
const int padLeft,
const int xNCHW,
const int xCHW,
const int xHW,
const int dyCHW,
const int dyHW,
half* dx) {
for (size_t pos = blockIdx.x * blockDim.x + threadIdx.x;
pos < (xNCHW);
pos += blockDim.x * gridDim.x) {
const int posn = pos / xCHW;
const int posc = pos / xHW % c;
const int posh = pos / xHeight % xHeight;
const int posw = pos % xWidth;
const int posIdx = posh*xWidth + posw;
int hstart = posh+padTop;
if (hstart < windowHeight) {
hstart = 0;
} else {
hstart = (hstart-windowHeight)/strideHeight + 1;
}
int wstart = posw+padLeft;
if (wstart < windowWidth) {
wstart = 0;
} else {
wstart = (wstart-windowWidth)/strideWidth + 1;
}
const int hend = min((posh+padTop)/strideHeight +1, dyHeight);
const int wend = min((posw+padLeft)/strideWidth +1, dyWidth);
const int channelStart = posn*dyCHW + posc*dyHW;
float dySum = 0.0f;
for (int hcur = hstart; hcur < hend; ++hcur) {
for (int wcur = wstart; wcur < wend; ++wcur) {
const int curIdx = hcur*dyWidth + wcur;
int maxIdx = index[channelStart+curIdx];
if (maxIdx == posIdx) {
dySum += __half2float(dy[channelStart+curIdx]);
}
}
}
dx[pos] = __float2half(dySum);
}
return;
}
template <typename T, typename S>
void CalMaxPoolWithArgmaxGrad(const T* x,
const T* dy,
const S* index,
const int n,
const int c,
const int xHeight,
const int xWidth,
const int dyHeight,
const int dyWidth,
const int windowHeight,
const int windowWidth,
const int strideHeight,
const int strideWidth,
const int padTop,
const int padLeft,
T* dx,
cudaStream_t cuda_stream) {
const int xHW = xHeight*xWidth;
const int xCHW = c*xHW;
const int xNCHW = n*xCHW;
const int dyHW = dyHeight*dyWidth;
const int dyCHW = c*dyHW;
MaxPoolWithArgmaxGrad<<<GET_BLOCKS(xNCHW),
GET_THREADS,
0,
cuda_stream>>>(
x,
dy,
index,
n,
c,
xHeight,
xWidth,
dyHeight,
dyWidth,
windowHeight,
windowWidth,
strideHeight,
strideWidth,
padTop,
padLeft,
xNCHW,
xCHW,
xHW,
dyCHW,
dyHW,
dx);
return;
}
template void CalMaxPoolWithArgmaxGrad<float, int>(const float* x,
const float* dy,
const int* index,
const int n,
const int c,
const int xHeight,
const int xWidth,
const int dyHeight,
const int dyWidth,
const int windowHeight,
const int windowWidth,
const int strideHeight,
const int strideWidth,
const int padTop,
const int padLeft,
float* dx,
cudaStream_t cuda_stream);
template void CalMaxPoolWithArgmaxGrad<half, int>(const half* x,
const half* dy,
const int* index,
const int n,
const int c,
const int xHeight,
const int xWidth,
const int dyHeight,
const int dyWidth,
const int windowHeight,
const int windowWidth,
const int strideHeight,
const int strideWidth,
const int padTop,
const int padLeft,
half* dx,
cudaStream_t cuda_stream);

@ -0,0 +1,25 @@
/**
* Copyright 2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef MINDSPORE_CCSRC_BACKEND_KERNEL_COMPILER_GPU_CUDA_IMPL_MAXPOOLWITHARGMAX_GRAD_H_
#define MINDSPORE_CCSRC_BACKEND_KERNEL_COMPILER_GPU_CUDA_IMPL_MAXPOOLWITHARGMAX_GRAD_H_
template <typename T, typename S>
void CalMaxPoolWithArgmaxGrad(const T* x, const T* dy, const S* index, const int n, const int c, const int xHeight,
const int xWidth, const int dyHeight, const int dyWidth, const int windowHeight,
const int windowWidth, const int strideHeight, const int strideWidth, const int padTop,
const int padLeft, T* dx, cudaStream_t cuda_stream);
#endif // MINDSPORE_CCSRC_BACKEND_KERNEL_COMPILER_GPU_CUDA_IMPL_MAXPOOLWITHARGMAX_GRAD_H_

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

Loading…
Cancel
Save