Huawei tshaj tawm tias nws TensorFlow thiab PyTorch style MindSpore Deep Learning middleware yog tam sim no qhib qhov. Tshawb nrhiav hauv tsab xov xwm no nws cov yam ntxwv tseem ceeb tshaj plaws.
Huawei tau tshaj tawm tias nws lub MindSpore kev tsim daim ntawv thov AI yog los ua qhov qhib thiab muaj nyob ntawm GiHub thiab Gitee. MindSpore yog lwm lub tswv yim kev kawm tob rau kev cob qhia neural network qauv, zoo ib yam li TensorFlow lossis PyTorch, tsim rau kev siv los ntawm Ntug mus rau Huab, uas txhawb nqa ob GPUs thiab pom meej Huawei Ascend processors.
Lub Yim Hli Ntuj dhau los, thaum Huawei tshaj tawm ua ke ntawm nws cov Ascend processor, MindSpore tau pib ua ntej, hais tias hauv kev cob qhia ResNet-50 raws kev cob qhia, kev sib xyaw ntawm Ascend 910 thiab MindSpore yog li ob zaug kom nrawm dua. Thaum qhia cov qauv AI piv rau lwm qhov tseem ceeb ntawm kev kawm paub siv TensorFlow Nws yog qhov tseeb hais tias ntau lub tswv yim tau tshwm sim nyob rau xyoo tsis ntev los no, thiab tej zaum MindSpore tsis muaj dab tsi ntau dua li ib pawg uas tuaj yeem sib tw deb nrog TensorFlow (thaub los ntawm Google) thiab PyTorch (txhawb los ntawm Facebook)).
Txheej txheem architecture
Lub vas sab MindSpore piav qhia tias cov vaj tse muaj peb txheej tseem ceeb: kev tshaj tawm kev hais lus, duab lub cav, thiab rov qab khiav. Daim duab hauv qab no qhia txog daim duab pom kev:
Thawj qib ntawm MindSpore muaj Python API rau cov neeg tsim khoom. Txij li thaum hais lus hom lus hauv peb lub zej zog yog qhov tseeb txog Python, thiab tsis li ntawd MindSpore xav kom muaj kev sib tw nrog PyTorch thiab TensorFlow. Nrog rau qhov API no, cov neeg tsim qauv tuaj yeem tswj cov qauv (kev qhia, kev nkag siab, thiab lwm yam) thiab cov txheej txheem cov ntaub ntawv. Thawj qib no tseem suav nrog kev txhawb nqa rau cov cai sawv cev ib ntus (MindSpore IR), uas ntau qhov kev hloov kho yuav ua raws li uas tuaj yeem ua kev sib luag thiab kev sib txawv tsis siv neeg (GHLO).
Hauv qab no yog teeb Graph txheej txheej uas muab cov haujlwm tsim nyog los tsim thiab kev ua tsis zoo sib xws ntawm cov kab tiav Nrog MindSpore, lawv tau xaiv rau qhov sib txawv tsis siv neeg cov qauv uas tsis yog PyTorch (uas ua kom muaj qhov ua tiav ntawm daim phiaj) lossis TensorFlow (txawm hais tias qhov kev xaiv los tsim cov kev ua haujlwm zoo li qub tau raug xaiv thaum xub thawj, nws tam sim no tseem muaj cov txheej txheem ntawm kev tua hluav taws xob tshwj xeeb thiab tso cai ib qho qauv zoo li qub ntawm lub teeb nrog kev siv @ tf.function decorator ntawm nws qib API qis).
Kev xaiv ntawm MindSpore yog los hloov cov lej ntawm qhov chaw rau hom ntawv nruab nrab (MindSpore IR) kom tau txais txiaj ntsig ntawm ob tus qauv (rau cov ntaub ntawv ntau, saib ntu "Tsis Siv Neeg Sib Cais" ntawm MindSpore lub vas sab).
Cov txheej txheej kawg yog muaj txhua lub tsev qiv ntawv thiab lub sijhawm ua kom muaj lub luag haujlwm xav tau los pab txhawb rau ntau yam khoom siv kho vajtse hauv qhov chaw ua haujlwm ntawd. Feem ntau yuav, nws yuav yog ib qho khoom plig rov qab zoo ib yam li lwm cov kev ua haujlwm, tej zaum nrog Huawei cov yam ntxwv, xws li cov tsev qiv ntawv xws li HCCL (Huawei Collective Communication Library), sib npaug nrog NVIDIA NCCL (NVIDIA Kev Sib Txuas Lus Sib Tham).
Txoj kev kawm kom pom tseeb
Raws li kev qhia MindSpore, txawm hais tias nws tsis yooj yim sua los nruab thiab siv lawv, lawv muaj MindInsight los tsim cov duab pom uas yog qee qhov nco ntawm TensorBoard, TensorFlow. Ua tibzoo saib qee qhov screenshots qhia lawv lub vev xaib:
Raws li phau ntawv qhia, MindSpore tam sim no siv ib qho kev hu rov qab (suav tias nws ua li cas nrog Keras) sau (hauv cov ntawv sau cia) hauv cov txheej txheem kev kawm tag nrho cov qauv kev ntsuas thiab hyperparameters peb xav tau, nrog rau kev suav tawm thaum muab tso ua ke neural network rau hauv qib nrab kev ua tiav.
Parallelism
Hauv lawv cov kev qhia, lawv tham txog ob txoj kev sib txig (DATA_PARALLEL thiab AUTO_PARALLEL) thiab muab cov qauv kev cai uas cob qhia ResNet-50 nrog CIFAR cov ntaub ntawv rau ib qho kev ua haujlwm Ascend 910 (uas Kuv tsis tuaj yeem kuaj). DATA_PARALLEL yog hais txog ib lub tswv yim feem ntau hu ua cov ntaub ntawv parallelism, uas muaj cov faib cov ntaub ntawv kev cob qhia mus rau ntau tus neeg siv nyiaj, txhua qhov ntawm ib qho khiav ntawm tib qho qauv ntawm cov qauv, tab sis nyob rau hauv cov txheej txheem sib txawv. Kev Txhawb Nqa Lub Cav yog muab rau cov cim kev sib txig thiab tshwj xeeb rau AUTO_PARALLEL parallelism.
AUTO_PARALLEL hom ua kom zoo dua rau kev sib txuam los ntawm kev sib txuas ntawm cov ntaub ntawv kev sib txig sib xyaw (sib tham saum toj no) nrog cov qauv kev sib txig sib luag, uas tus qauv tau muab faib ua ntau qhov sib txawv, thiab txhua ntu txiav txim sib luag hauv cov khoom sib txawv. Qhov tsis siv neeg no hom xaiv qhov kev sib txig sib luag uas muaj cov txiaj ntsig zoo tshaj plaws, uas tuaj yeem nyeem txog hauv qhov "Automatic Parallel" ntu ntawm Qhov Txheej Txheem Ib Leeg (Automatic Parallel) ntawm MindSpore lub vev xaib (txawm hais tias lawv tsis piav qhia qhov kwv yees thiab cov kev txiav txim siab). Peb yuav tau tos kom muab sijhawm rau cov neeg ua haujlwm pab pawg los nthuav cov ntaub ntawv ntxiv thiab nkag siab cov ntsiab lus ntxiv hais txog lub tswv yim-parallelization. Tab sis nws yog qhov tseeb tias qhov no pib-parallelization lub tswv yim tseem ceeb heev, thiab qhov no yog qhov uas lawv yuav tsum thiab muaj peev xwm sib tw nrog TensorFlow lossis PyTorch, tau txais txiaj ntsig zoo dua li siv Huawei cov txheej txheem.
Npaj ua hom phiaj thiab yuav pab li cas
Muaj ntau txoj haujlwm tseem ceeb uas yuav tsum tau ua thiab txij ntawm lub sijhawm no lawv tau hloov kho cov tswv yim uas lawv muaj nyob rau hauv lub xyoo tom ntej hauv daim ntawv qhia kev ntawm cov nplooj ntawv nthuav dav rau ntawm nplooj ntawv no, tab sis lawv sib cav tias qhov muaj feem thib yuav raug kho raws li tus neeg siv.
Tswv yim. Lub sijhawm peb tuaj yeem nrhiav cov kab no:
- Txhawb rau ntau tus qauv (tseem tos cov qauv classic, GAN, RNN, Transformers, cov qauv kev kawm kom dav ntxiv, kev soj ntsuam qhov tseeb, AutoML, thiab lwm yam).
- Tshaj tawm APIs thiab cov tsev qiv ntawv txhawm rau txhim kho kev siv tau thiab cov kev paub dhau los ntawm lub cajmeem (ntau tus neeg ua haujlwm, ntau lub zog, ntau qhov kev khiav dej num, thiab lwm yam)
- Tshaj Tawm Huawei Ascend processor txhawb thiab ua haujlwm kom muaj txiaj ntsig zoo (ua kom zoo tshaj plaws, txhim kho kev siv nyiaj, thiab lwm yam)
- Kev hloov kho ntawm cov software pov thawj thiab kev ua tiav ntawm cov teeb tsa ua kom tau zoo (txhim kho cov sawv cev nruab nrab IR, ntxiv cov peev xwm hloov kho tshiab, thiab lwm yam).
- Txhawb nqa rau cov lus programming ntau ntxiv (tsis yog Python).
- Txhim kho tau faib kev kawm nrog kev ua kom tau zoo ntawm kev teem sijhawm tsis siv neeg, xa cov ntaub ntawv, thiab lwm yam.
- Txhim kho cov cuab yeej MindInsight kom nws yooj yim dua rau cov programmer kom "debug" thiab txhim kho hyperparameter kev sib tham thaum lub sijhawm kawm.
- Kev nce qib hauv kev xa tawm cov haujlwm kev ua haujlwm rau cov khoom siv hauv Edge (kev ruaj ntseg, txhawb rau cov qauv tsis-platform ntawm ONNX, thiab lwm yam)
Ntawm nplooj ntawv zej zog, koj tuaj yeem pom tias MindSpore muaj cov koom tes sab nraud ntawm Huawei thiab Suav, xws li University of Edinburgh, Imperial College London, University of Munster (Lub Tebchaws Yelemees) lossis Paris-Saclay University. Lawv hais tias lawv yuav ua raws cov qauv qhib kev tswj hwm thiab caw tag nrho cov neeg zej zog los koom ua ke rau hauv cov cai thiab cov ntaub ntawv.
Xaus
Tom qab nrawm nrawm thawj zaug, nws zoo li tsim nyog thiab tsim kev txiav txim siab (zoo li concurrency thiab tsis siv neeg sib txawv) tuaj yeem ntxiv chav rau kev txhim kho thiab kev ua tiav uas ua tiav kev ua tau zoo dua li cov haujlwm lawv xav outperform. Tab sis tseem tshuav ntau yam haujlwm ua ntej kom tau txais PyTorch thiab TensorFlow, thiab saum toj no tsim txhua lub zej zog, tsis yog! Txawm li cas los xij, peb txhua tus twb paub lawm tias nrog kev thim ntawm ib lub tuam txhab loj hauv qhov kev lag luam zoo li Huawei, txhua yam yog ua tau, lossis nws tau pom tseeb peb lub xyoos dhau los thaum PyTorch thawj (Facebook) tau tawm los tias nws yuav nyob ze rau pob taws. ntawm TensorFlow (Google)?