Compare commits

..

443 Commits

Author SHA1 Message Date
mindspore-ci-bot 25aecfb52c !1473 fix resize args_ size when op with workspace do hybrid_model_executor
4 years ago
zhou_lili 234abf4cb1 fix resize args_ when op with workspace do hybrid_model_executor
4 years ago
mindspore-ci-bot ef2538785d !1468 fix repeat rtmalloc device mem
4 years ago
计晨 7e4920112a !1465 add error msg
4 years ago
计晨 192a82d745 !1438 format log optimize
4 years ago
计晨 5057512666 !1456 日志整改
4 years ago
mindspore-ci-bot 0a7842cfa5 !1426 netout pass fix for onnx parse subgraph
4 years ago
wangxiaotian22 420b3894c6 for comment
4 years ago
mindspore-ci-bot c57bc21c98 !1466 fix optional input bug
4 years ago
zhou_lili e8fcd806f6 fix repeat rtmalloc device mem
4 years ago
wxl c384df5e58 fix optional input bug
4 years ago
wangxiaotian22 a4182c0bf8 add error msg
4 years ago
mindspore-ci-bot b964b15ee4 !1450 Reduce weight memory usage & Remove redundant memcpy
4 years ago
mindspore-ci-bot 20d014daee !1349 modify dump single op
4 years ago
mindspore-ci-bot f49140fcc7 !1459 ge code for fuzz build
4 years ago
mindspore-ci-bot 6187c9af0c !1451 add netoupt alwways
4 years ago
mindspore-ci-bot ca46906a5d !1452 fix stream switch
4 years ago
zhou_lili 279eb010c1 ge code of fuzz build
4 years ago
liudingyan 2252abcce8 report errormsg
4 years ago
zhou_chao1993 56825b12d5 modify dump single op
4 years ago
yangwei 3f2e8be1dc fix streamswitch
4 years ago
liyihan2@huawei.com c26a77f84b format log optimize
4 years ago
liyihan2@huawei.com baafe1804f format log optimize
4 years ago
gengchao4@huawei.com aeb0621113 add netoupt alwways
4 years ago
gengchao4@huawei.com dbafeb8531 add netoupt alwways
4 years ago
mindspore-ci-bot 513a5c3cdf !1445 Save atomic kernel bin to model.
4 years ago
liyihan2@huawei.com 0f75a2e531 format log optimize
4 years ago
chuxing dd64c8d549 single weight per model
4 years ago
liyihan2@huawei.com 61b239ef31 format log optimize
4 years ago
unknown 51d14e59b9 Save atomic kernel bin to model.
4 years ago
mindspore-ci-bot 4b522d8f4b !1440 optimize PrepareConstInputs if the node is a constant
4 years ago
mindspore-ci-bot dd62a6f095 !1335 modify set dump
4 years ago
chuxing 4d6af67e59 Optimize dependencies for const inputs
4 years ago
mindspore-ci-bot 0a18779050 !1432 AtomicAddrCleanPass::LinkToAllSecondNodes
4 years ago
zhou_chao1993 13bf1d1b4d modif set dump
4 years ago
lianghao 5efe0b6932 AtomicAddrCleanPass::LinkToAllSecondNodes
4 years ago
mindspore-ci-bot 550060c595 !1364 modify dump content
4 years ago
zhou_chao1993 087b973907 modif dump content
4 years ago
mindspore-ci-bot ea027d1c67 !1261 aicpu算子优先级提升
4 years ago
liyihan2@huawei.com b52f821c6e format log optimize
4 years ago
guopeian 3a220beb34 fix graph
4 years ago
liyihan2@huawei.com 58160a1c1e format log optimize
4 years ago
liyihan2@huawei.com 9f8afc38c5 format log optimize
4 years ago
liyihan2@huawei.com 330c12210e format log optimize
4 years ago
liyihan2@huawei.com 4566fb69c0 format log optimize
4 years ago
liyihan2@huawei.com 5533387c56 format log optimize
4 years ago
liyihan2@huawei.com 3ae4fb0bfa format log optimize
4 years ago
liyihan2@huawei.com e1398869c8 format log optimize
4 years ago
liyihan2@huawei.com 018d171ead format log optimize
4 years ago
liyihan2@huawei.com 4027a44402 format log optimize
4 years ago
计晨 751a5839a9 !1393 common formats log optimize
4 years ago
计晨 6f74983fae !1401 add error msg
4 years ago
计晨 49b2c8bdba !1389 add report errmsg and modify geloge
4 years ago
陈华 7ac947fa21 netout pass fix for onnx parse subgraph
4 years ago
mindspore-ci-bot 104ced84eb !1433 回退 'Pull Request !1427 : add netoutput always'
4 years ago
wangxiaotian22 8c0086e96a fix format
4 years ago
王涛 dff8d5f8d3 回退 'Pull Request !1427 : add netoutput always'
4 years ago
liudingyan 9a7cb76cb9 modify geloge and add err report
4 years ago
liudingyan d85228d6fb modify geloge and add err report
4 years ago
liudingyan bab2821062 modify code to add report errmsg
4 years ago
liudingyan 1bcc0df932 add errlog and modify geloge --2
4 years ago
liudingyan 99b60f4f92 add errlog and modify geloge --1
4 years ago
mindspore-ci-bot aeff798209 !1429 buffer pool skip continuous memory
4 years ago
mindspore-ci-bot 7873ffaf25 !1416 modified insert_op.proto
4 years ago
liyihan2@huawei.com ab134d9d57 common formats log optimize
4 years ago
mindspore-ci-bot af7704185d !1427 add netoutput always
4 years ago
李磊 7dfad6fe0d modified insert_op.proto
4 years ago
liyihan2@huawei.com 1b34f37311 common formats log optimize
4 years ago
liyihan2@huawei.com ff31cd4d15 common formats log optimize
4 years ago
mindspore-ci-bot 19b3eeddb1 !1408 dts:support ir build online dynamic model and add check input shape
4 years ago
wangzhengjun 59ef2d0fcd buffer pool skip continuous memory
4 years ago
mindspore-ci-bot a6a93109b0 !1423 Remove unused variable
4 years ago
liyihan2@huawei.com 123e9a43e2 common formats log optimize
4 years ago
zhengyuanhua a0206ee4a3 dts:support ir build online dynamic model
4 years ago
gengchao4@huawei.com b9850ebb2f add netoutput always
4 years ago
chuxing e97d560fb5 remove unused variable
4 years ago
mindspore-ci-bot d322f7b1a8 !1420 Bugfix: Known-shaped subgraph failed to dump op
4 years ago
liyihan2@huawei.com e143d7e829 common formats log optimize
4 years ago
chuxing e4413111e4 Fix dump in known-shaped subgraph
4 years ago
mindspore-ci-bot c9a4b65720 !1350 buffer_pool_allocator
4 years ago
wangxiaotian22 d8b1d0b308 add error msg
4 years ago
mindspore-ci-bot 7cc2f736e3 !1413 fix ts 4g memory question
4 years ago
mindspore-ci-bot b02b859e4e !1412 Bugfix: fix null owner graph error
4 years ago
wxl aa7f9c7167 fix 1951 ts 4g memory failed
4 years ago
wxl 9ad7e84a72 fix 1951 ts 4g memory failed
4 years ago
wxl 224a11549a fix 1951 ts 4g memory failed
4 years ago
lichun 7a3dba72af Bugfix: fix null owner graph error
4 years ago
wangzhengjun 2561188d96 buffer pool memory allocator
4 years ago
mindspore-ci-bot 322e3c1c87 !1406 The switch of step profile switches to model_load.
4 years ago
wangxiaotian22 b32fac224d add error msg
4 years ago
mindspore-ci-bot 9133560132 !1405 update submodule parser
4 years ago
zhaozhixuan e7171d1214 The switch of step profile switches to model_load.
4 years ago
mindspore-ci-bot 19e98c340f !1399 Add GetOriginalType for support RefSwitch & RefMerge
4 years ago
wangzhengjun 65dfc73343 update submodule parser
4 years ago
mindspore-ci-bot 68a0563010 !1404 更新 metadef 子仓关系
4 years ago
wangzhengjun d69fb2b5d2 update submodule metadef
4 years ago
mindspore-ci-bot dae0f853f9 !1397 fix import
4 years ago
chenyemeng 70df29aa61 Add GetOriginalType for support RefSwitch & RefMerge
4 years ago
计晨 e109b7d8d0 !1396 1395 添加HCCL拖尾优化的pass
4 years ago
medivh-x 033bdf7262 add hccl tailing optimization pass
4 years ago
liyihan2@huawei.com 1e04494d0e common formats log optimize
4 years ago
wangxiaotian22 3241cb6f29 add error msg
4 years ago
liyihan2@huawei.com ae84215d01 common formats log optimize
4 years ago
mindspore-ci-bot 36e073eba8 !1376 For step info.
4 years ago
yangwei 61dc2e9353 fix import
4 years ago
guopeian 38e4de4c17 add hong
4 years ago
计晨 e4f2a322a5 !1387 add error msg
4 years ago
liyihan2@huawei.com 2abae40cc1 common formats log optimize
4 years ago
liyihan2@huawei.com 6f08d5f0bb common formats log optimize
4 years ago
wangxiaotian22 04d17e7a39 modify INNER error to CALL error when new
4 years ago
mindspore-ci-bot f64ea5c860 !1390 Bugfix:fix error of get null subgraph
4 years ago
mindspore-ci-bot 9f2f45c74d !1394 Bugfix: While loop failed to restore original input after execution
4 years ago
liyihan2@huawei.com 1e610379db common formats log optimize
4 years ago
chuxing 4b4ed2e1c5 while loop failed to restore origin input after execution
4 years ago
mindspore-ci-bot 70121ab078 !1355 fix known graph address refresh
4 years ago
liyihan2@huawei.com 53536ea8f7 common formats log optimize
4 years ago
mindspore-ci-bot 2da0b5a24e !1391 rtMemcpy no input size is 0.
4 years ago
lichun c99ad051b9 Bugfix:fix error of get null subgraph
4 years ago
unknown 196f4d93c9 rtMemcpy no input size is 0.
4 years ago
lichun 0f5de61a80 Bugfix:fix error of get null subgraph
4 years ago
lichun 0954fff29b Bugfix:fix error of get null subgraph
4 years ago
wangxiaotian22 1adc95ae36 for cmetric
4 years ago
wangxiaotian22 50d237b381 process conflict
4 years ago
wangxiaotian22 a11e58133b fix conflict
4 years ago
wangxiaotian22 88b73dc98c add error msg
4 years ago
wangxiaotian22 a0bd2ce726 add error msg
4 years ago
mindspore-ci-bot 0714c8173e !1384 Performance optimization and fix memory leak.
4 years ago
mindspore-ci-bot dbb60fe7b0 !1382 support unknown while subgraph & error code fix
4 years ago
TangQunzhang dfd2df0c84 Performance optimization and fix memory leak.
4 years ago
lichun ba39c5375b support unknown while subgraph
4 years ago
mindspore-ci-bot 7321eb0669 !1379 optimize hccl op dependency
4 years ago
mindspore-ci-bot e0c79f8f39 !1380 Fix error of single_op memory free.
4 years ago
zhaozhixuan cbfc89d630 No need add ut.
4 years ago
zhaozhixuan 07b9a48f11 Fix error of single_op memory free.
4 years ago
chuxing 91baaf2393 fix ut
4 years ago
chuxing 171fda818a fix ut
4 years ago
zhaozhixuan 06f291208c Add ut.
4 years ago
chuxing b932d0a718 fix ut
4 years ago
chuxing 55dc62571f fix ut
4 years ago
chuxing a89298a045 ensure order
4 years ago
chuxing 6eddcd2d95 update log
4 years ago
zhaozhixuan e7df70fd4e Add ut.
4 years ago
chuxing e49e09d7a7 fix hccl
4 years ago
zhaozhixuan e8eeace382 Add ut.
4 years ago
zhaozhixuan d47d7b378a Fix bug.
4 years ago
unknown f4c343d7dd For step info.
4 years ago
unknown 6ae6d053c0 For step info.
4 years ago
计晨 f5eded92c3 !1332 ge geloge and report error
4 years ago
mindspore-ci-bot cf473fb4bc !1374 fix hccl loading error
4 years ago
计晨 eed602477b !1373 Common log optimize
4 years ago
chuxing 61f1cf34a5 opt log
4 years ago
liyihan2@huawei.com a74de10c02 Common log optimize
4 years ago
chuxing d17aa4b32c fix hccl
4 years ago
liudingyan 91b6167e7f modify report errmsg
4 years ago
liyihan2@huawei.com bc3879718e Common log optimize
4 years ago
liyihan2@huawei.com 5445cd0f86 Common log optimize
4 years ago
liudingyan aaed83e8ec update geloge and report errmsg 2
4 years ago
liyihan2@huawei.com 48ae6fcdb2 Merge branch 'master' of gitee.com:liyihan123/graphengine
4 years ago
mindspore-ci-bot 3a4d332a83 !1365 add define used by acl
4 years ago
mindspore-ci-bot 689dab39c7 !1353 Adding dependencies by parallel groups
4 years ago
mindspore-ci-bot da104ed39d !1359 sync profiling interface
4 years ago
mindspore-ci-bot b7dd89761a !1369 Fix bug of rtMemcpy input 0.
4 years ago
zhou_lili 9cda3adfb4 add declare used by acl
4 years ago
mindspore-ci-bot 9635b0c9b9 !1360 bugfix for atomic_addr_clean_pass
4 years ago
chuxing 91d57d07e3 fix sc
4 years ago
chuxing 795a935d34 fix Profiling
4 years ago
unknown 030e4a765e Fix bug of rtMemcpy input 0.
4 years ago
mindspore-ci-bot fc15462602 !1362 bugfix for bp profiling
4 years ago
mindspore-ci-bot f70fd8ac54 !1367 回退 'Pull Request !1356 : modify info log '
4 years ago
王笑天 ceff581694 回退 'Pull Request !1356 : modify info log '
4 years ago
mindspore-ci-bot 0667f28f38 !1356 modify info log
4 years ago
mindspore-ci-bot 309934a4e6 !1346 bugfix for auto fp profiling; modify superkernel funcname
4 years ago
gengchao4@huawei.com cb300f1043 bugfix for bp profiling
4 years ago
zhengyuanhua 8e11fb6cc0 sync profiling interface
4 years ago
y00500818 19e04e815c bugfix for atomic_addr_clean_pass
4 years ago
liyihan2@huawei.com 4ef1970f6d Common log optimize
4 years ago
wangxiaotian22 0766e71901 modify info
4 years ago
yangwei 93025cabf4 l2 buffer
4 years ago
chuxing deebe05906 update UT
4 years ago
mindspore-ci-bot 072e959b43 !1348 dts: when input node is dynamic, no need to cal memory size
4 years ago
mindspore-ci-bot 89942d36f4 !1296 online_inference
4 years ago
gengchao4@huawei.com 2d7e85d666 modify superkernel funcname
4 years ago
chuxing ceaec23300 serialize hccl ops
4 years ago
zhengyuanhua 2210a7177c dts: when input node is dynamic, no need to cal memory size
4 years ago
lianghao 2dfc16d5a0 online_inference
4 years ago
mindspore-ci-bot 48ee563ebb !1281 Transdata
4 years ago
mindspore-ci-bot 649f555801 !1347 Performance optimization
4 years ago
TangQunzhang d983cef480 Performance optimization
4 years ago
mindspore-ci-bot 424cabb049 !1336 sync runtime head
4 years ago
计晨 87c607433e !1344 rm op_desc print in kernel_task_info
4 years ago
zk c34f18ea54 Transdsd
4 years ago
wangxiaotian22 5386d26726 rm op_desc
4 years ago
zk 67181c1177 transdata111
4 years ago
zk 219170dc9d Transdata`
4 years ago
zk faf1d656e6 Transdata
4 years ago
zk a9a8320ecf Transdata
4 years ago
zhou_chao1993 e552726d1d sync runtime head
4 years ago
mindspore-ci-bot d5c245dd82 !1343 rm op_desc
4 years ago
wangxiaotian22 42edc50b65 rm op_desc
4 years ago
zk 604e04bdb2 Transdata
4 years ago
mindspore-ci-bot af9f8b7781 !1334 fix
4 years ago
liyihan2@huawei.com 14744209b9 Common log optimize
4 years ago
wangxiaotian22 06505151f4 fix
4 years ago
wangxiaotian22 fd97c34af6 for ut cov
4 years ago
wangxiaotian22 dc935c86c5 fix error
4 years ago
liyihan2@huawei.com 7b25976593 Common log optimize
4 years ago
liyihan2@huawei.com 229e7c13f7 Common log optimize
4 years ago
liyihan2@huawei.com 29af5ca015 Common log optimize
4 years ago
计晨 a97c148c85 !1327 add error message report
4 years ago
liyihan2@huawei.com be5eecabb7 Common log optimize
4 years ago
wangxiaotian22 ec78a87860 fix for ut
4 years ago
liyihan2@huawei.com fc58b5f404 Common log optimize
4 years ago
wangxiaotian22 e9e3751f81 fix for ut
4 years ago
liyihan2@huawei.com 11a72900c2 Common log optimize
4 years ago
wangxiaotian22 607eb3475c fix for ut
4 years ago
liyihan2@huawei.com 7070f39692 Common log optimize
4 years ago
liyihan2@huawei.com 876f9e301a Common log optimize
4 years ago
mindspore-ci-bot 38a33b0642 !1326 fix yellow compile error
4 years ago
wangxiaotian22 6d2c667965 fix format check
4 years ago
wangxiaotian22 86b428ca01 fix ut
4 years ago
zk 9e32b68458 Transdata
4 years ago
wangxiaotian22 470bd17be6 fix ut
4 years ago
wangxiaotian22 f14ab96a48 fix format
4 years ago
zhengyuanhua 9394d886f7 compile error in yellow
4 years ago
wangxiaotian22 d7e93d4415 format check
4 years ago
liyihan2@huawei.com 51a9cd52e1 Common log optimize
4 years ago
liyihan2@huawei.com e943ac3eab Common log optimize
4 years ago
wangxiaotian22 ecfdd3ee66 add error message
4 years ago
zk 42c3f49c82 sdwew
4 years ago
zk f8460f9e1d asdsad
4 years ago
mindspore-ci-bot 96eaa5364d !1311 Fix bug of const input index.
4 years ago
zk f304ba98b8 sdsdsd
4 years ago
zk 446b3c735e sddds
4 years ago
zk d3581c89ea sdsd
4 years ago
zk 592a31288f sdsd
4 years ago
mindspore-ci-bot f4ead96f46 !1320 profiling reporter max len
4 years ago
zk 9c29d07b68 sdsd
4 years ago
zk a17d5b7a0c sdsdd
4 years ago
zhaozhixuan 871efe285e Add ut.
4 years ago
zhaozhixuan 6af2a247fd Add ut.
4 years ago
mindspore-ci-bot 1d24765b0c !1318 Rename need_infer_again_
4 years ago
zhangxiaokun b01018ce89 Add UT delete_need_infer_again
4 years ago
mindspore-ci-bot 60a848da4f !1319 modify format
4 years ago
zk 992ac5e7c0 Transdata
4 years ago
wangxiaotian22 78c46a0909 modify info format
4 years ago
zhengyuanhua bf1e52a69a profiling reporter max len
4 years ago
zhangxiaokun 7fbfe1467f Rename need_infer_again_
4 years ago
zk b3082e8faf Transdata
4 years ago
zk 0ffa146eaa Transdata for va
4 years ago
zk b36bf81ab0 Transdata
4 years ago
zk f1039e62be Transdata for va
4 years ago
zk 7e8dc5cde8 Transdata
4 years ago
zk b544767367 sdsd
4 years ago
zk 60fe5ffb19 ssddd
4 years ago
zk 64ddc6a239 ssddd
4 years ago
mindspore-ci-bot 000b53aeb5 !1285 client log
4 years ago
mindspore-ci-bot cc922dda8d !1315 fixed compile issue of proto
4 years ago
李磊 e8bc4a48c6 fixed compile issue of proto
4 years ago
zk ed49f18a8a ssdd
4 years ago
liyihan2@huawei.com 1527ec37d7 client log
4 years ago
zk d5ab37c90e sdddds
4 years ago
unknown e1eb148756 Fix bug of const input index.
4 years ago
unknown 4155590955 Fix bug of const input index.
4 years ago
liyihan2@huawei.com 016c1550c8 client log
4 years ago
liyihan2@huawei.com d9c608a67d client log
4 years ago
liyihan2@huawei.com 4f4fd372d7 client log
4 years ago
mindspore-ci-bot f8d6c5c421 !1309 add check input shape range node
4 years ago
zhengyuanhua 4606e4b137 add check input shape range node func
4 years ago
liyihan2@huawei.com 12bdfce70b client log
4 years ago
mindspore-ci-bot 0731fc4026 !1162 parallel group
4 years ago
陈华 cf101e0aa2 parallel group
4 years ago
mindspore-ci-bot 097759e65c !1295 fix aipp check
4 years ago
mindspore-ci-bot 4618afaa2d !1290 Fix bug of single_op inferdepend.
4 years ago
zk 8e25598012 sdsd
4 years ago
zk 2f97c651e2 tttt
4 years ago
unknown d865ad49bf Fix error.
4 years ago
unknown bdb093ea8a Fix error.
4 years ago
计晨 9b9583c37e !1299 错误日志整改编译
4 years ago
liyihan2@huawei.com 4607c0cd68 client log
4 years ago
wangxiaotian22 2e4dbd3c56 info format modify
4 years ago
mindspore-ci-bot 5cc602de7e !1297 fixed compiled issue for proto files
4 years ago
mindspore-ci-bot 4fa93a81ea !1266 fix bug of dynamic shape load error
4 years ago
unknown d7a758da64 Fix error.
4 years ago
wangxiaotian22 a08c20d253 test format ut test
4 years ago
李磊 ec2d011dfb fixed compiled issue for proto files
4 years ago
wangxiaotian22 f8392e4b44 fix aipp check
4 years ago
mindspore-ci-bot bcd238038f !1271 dump for unknownshape
4 years ago
wxl 1751f0e462 fix bug of dynamic shape load error
4 years ago
unknown 94a3855182 Fix error.
4 years ago
unknown fc4b153af0 Add ut.
4 years ago
unknown 0a79ca0a06 Add ut.
4 years ago
unknown a53a705c6f Add ut.
4 years ago
mindspore-ci-bot 9d6de56d16 !1303 fix rt_model.h mismatch bug
4 years ago
medivh-x bb8f882bf6 fix rt_model.h mismatch bug
4 years ago
liudingyan 74944af874 update geloge and report errormessage
4 years ago
liyihan2@huawei.com b6be31b482 client log
4 years ago
mindspore-ci-bot 0664647c5a !1294 fix l2 buffer
4 years ago
mindspore-ci-bot 37eaab25e5 !1293 remove EXPERIMENTAL_DYNAMIC_PARTITION
4 years ago
mindspore-ci-bot 4923ada3db !1279 DROPOUTDOMASK
4 years ago
lianghao24@hisilicon.com c07ec5a2fc DROPOUTDOMASK
4 years ago
yangwei 6d12934d1f l2 buffer
4 years ago
lichun e2b6277329 remove EXPERIMENTAL_DYNAMIC_PARTITION
4 years ago
lichun 2e431b33be remove EXPERIMENTAL_DYNAMIC_PARTITION
4 years ago
lichun 54087481bf remove EXPERIMENTAL_DYNAMIC_PARTITION
4 years ago
lichun 032a6974d0 remove EXPERIMENTAL_DYNAMIC_PARTITION
4 years ago
lichun 5337cefcd4 remove EXPERIMENTAL_DYNAMIC_PARTITION
4 years ago
计晨 8387b9a6ce !1292 fix remove graph error
4 years ago
lichun bb87417aff remove EXPERIMENTAL_DYNAMIC_PARTITION
4 years ago
chuxing 10f777d0d4 fix remove graph error
4 years ago
wxl e203878910 fix bug of dynamic shape load error
4 years ago
unknown 751079bdcd Fix bug of single_op inferdepend.
4 years ago
unknown bf4c4aabf8 Fix bug of single_op inferdepend.
4 years ago
mindspore-ci-bot 9edd57eef2 !1268 Bugfix: online inference get const need from context first
4 years ago
mindspore-ci-bot 8c5d06e265 !1288 suojin
4 years ago
wangxiaotian22 3781cd7ecc suojin
4 years ago
zk 0565225eed Transdata
4 years ago
mindspore-ci-bot 9dd4873072 !1282 static check
4 years ago
liyihan2@huawei.com 496e7372ad client log
4 years ago
zhaoxinxin 723dcaf33f modified: ge/host_kernels/gather_v2_kernel.cc
4 years ago
mindspore-ci-bot 68bd9e7616 !1284 回退 'Pull Request !1269 : fix suojin'
4 years ago
王笑天 9da074ec6b 回退 'Pull Request !1269 : fix suojin'
4 years ago
zhou_chao1993 1f46bb83d2 static check
4 years ago
zk e11ff9d949 Transdata
4 years ago
zk 6ef4fa860c Transdata
4 years ago
zk 4b224a8d6f Transdata
4 years ago
zk 55d661ffeb Transdata
4 years ago
zk 34056d6d10 Transdata
4 years ago
zk 8284c726f2 Transdata
4 years ago
zk 58eab15b5c transdata
4 years ago
zk aef76524d4 Transdata
4 years ago
zk 459c9a4ab2 Transdata
4 years ago
mindspore-ci-bot b985227124 !1275 clean sc warning
4 years ago
wxl d74426596a fix bug of dynamic shape load error
4 years ago
wxl f8acefb43d fix bug of dynamic shape load error
4 years ago
wxl 2966232996 fix bug of dynamic shape load error
4 years ago
mindspore-ci-bot ab3a8609bf !1269 fix suojin
4 years ago
wangxiaotian22 df60c43648 suojin
4 years ago
mindspore-ci-bot aa80caeca4 !1276 static check 0316
4 years ago
mindspore-ci-bot 41cc6f2046 !1254 Fix variable fusion when variables occurr only in subgraphs
4 years ago
mindspore-ci-bot 0dde08ac12 !1272 modify for static check
4 years ago
zhaoxinxin 67282b4530 modified: tests/ut/common/graph/CMakeLists.txt
4 years ago
lwx911747 2afe0730e5 static buildcheck 0316
4 years ago
zhengyuanhua 0a769c64e3 clean sc
4 years ago
zhaoxinxin 238b90a991 modified: metadef
4 years ago
lwx911747 8d4a8bf553 static buildcheck 0316
4 years ago
mindspore-ci-bot 6d51265781 !1265 analyzer log
4 years ago
chenyemeng 7e6299fdab static check
4 years ago
wxl 952581264e fix bug of dynamic shape load error
4 years ago
liyihan2@huawei.com bc342a780f analyzer log
4 years ago
wxl 4d68daac23 fix bug of dynamic shape load error
4 years ago
liyihan2@huawei.com 37d6cb8f46 analyzer log
4 years ago
zhaoxinxin a1fce7c8fa modified: ge/hybrid/executor/hybrid_model_async_executor.cc
4 years ago
liyihan2@huawei.com 7e4f82222e analyzer log
4 years ago
wxl 537b1bc8bc fix bug
4 years ago
mindspore-ci-bot f5ca093953 !1263 fix error codes and static check warning
4 years ago
lichun b00f3de4b2 fix error codes
4 years ago
lichun 506cb87f9e fix error codes
4 years ago
liyihan2@huawei.com 72d724d141 analyzer log
4 years ago
liyihan2@huawei.com afa96a9862 analyzer log
4 years ago
mindspore-ci-bot 980bd62ab0 !1251 Feature:Support while infershape
4 years ago
lichun 7e5ad1db7e fix error codes
4 years ago
mindspore-ci-bot 51901f654a !1262 fix compile fail bug
4 years ago
lichun 7d87e54235 fix compile error
4 years ago
zhaoxinxin 848236b21c modified: ge/graph/passes/infershape_pass.cc
4 years ago
zhaoxinxin c293465b6c modified: ge/graph/passes/base_pass.cc
4 years ago
mindspore-ci-bot c86ae170b4 !1255 Unique LabelGoto args addr
4 years ago
mindspore-ci-bot 71a12e8661 !1256 offline dynamic shape inference support
4 years ago
zhaoxinxin 2572bed425 modified: tests/ut/ge/graph/passes/base_pass_unittest.cc
4 years ago
zhangxiaokun ba8899ddf4 Unique LabelGoto args addr
4 years ago
zhaoxinxin f203c70cfd modified: tests/ut/ge/graph/passes/base_pass_unittest.cc
4 years ago
lichun 26ef975200 offline dynamic shape inference support
4 years ago
zhangxiaokun 4a4d2c0132 Unique label goto addr
4 years ago
chuxing b153ca0391 fix variable fusion when variable only in subgraph
4 years ago
zhaoxinxin c067e32c68 modified: ge/graph/passes/base_pass.h
4 years ago
mindspore-ci-bot 7f94f51ef2 !1249 fix bug that all subgraph is unknown and netoutput format is not nd bug
4 years ago
mindspore-ci-bot b7a534a90a !1248 modify error log
4 years ago
mindspore-ci-bot 5e3d450ac8 !1245 add optune support for dynamic shape
4 years ago
mindspore-ci-bot 7019c576c5 !1246 update onnx format
4 years ago
zhaoxinxin 242afc4e67 modified: ge/graph/passes/base_pass.cc
4 years ago
mindspore-ci-bot b507314cd2 !1244 modify user input shape check
4 years ago
wangxiaotian22 ee95f078b4 for ut cov
4 years ago
wxl 08ecc484fd fix bug that all subgraph is unknown and netoutput format is not nd bug
4 years ago
wangxiaotian22 eadebcb9ff delete fail ut
4 years ago
wxl 64c4bbd8e7 fix bug that all subgraph is unknown and netoutput format is not nd bug
4 years ago
wangxiaotian22 b9e1a62faf fix ut
4 years ago
wangxiaotian22 e35eddf16a fix ut
4 years ago
wangxiaotian22 5d7eab5a4b fix ut
4 years ago
wxl 723f398670 fix bug that all subgraph is unknown and netoutput format is not nd bug
4 years ago
wangxiaotian22 79ae2d3fe1 fix
4 years ago
gengchao4@huawei.com 49aacf9e6f add for optune dynamic shape support
4 years ago
wangxiaotian22 a44695f245 fix
4 years ago
wangxiaotian22 e8dd99af4e for ut cov
4 years ago
gengchao4@huawei.com 48e0a68b62 add for optune dynamic shape support
4 years ago
guopeian 217c3e4b8a aicpu engine
4 years ago
wangxiaotian22 c211d1bd36 modify error log
4 years ago
zhengyuanhua ed6a811c15 checkout input user dim modify
4 years ago
gengchao4@huawei.com f8479e16d5 add for optune dynamic shape support
4 years ago
gengchao4@huawei.com bf14833ef4 add for optune dynamic shape support
4 years ago
mindspore-ci-bot 82b32210e2 !1238 static check 0312
4 years ago
mindspore-ci-bot e73d9f89b8 !1204 Bugfix: Tiger online inference change on executor
4 years ago
zhaoxinxin 5acba13261 modified: concat_offset_kernel.cc
4 years ago
mindspore-ci-bot d74016165b !1237 remove check shape by shape range
4 years ago
zhaoxinxin 56ff720fac modified: ../../tests/ut/ge/hybrid/ge_hybrid_unittest.cc
4 years ago
lwx911747 a63df26ead static check 0312
4 years ago
zhaoxinxin 801a1e0fca modified: gather_v2_kernel.cc
4 years ago
mindspore-ci-bot 992c791c7c !1236 move set stage in finalize
4 years ago
zhengyuanhua 33d609ebad remove check shape by shape range
4 years ago
y00500818 074e7d4f8c update onnx format
4 years ago
mindspore-ci-bot 9f027029d5 !1224 add process for some op need infershape when running
4 years ago
wangxiaotian22 3df7893398 move setstage in finalize
4 years ago
mindspore-ci-bot c5b77a0124 !1229 revert get log header
4 years ago
zhaoxinxin bab9bca596 modified: ge/graph/partition/dynamic_shape_partition.cc
4 years ago
zhaoxinxin ce83b1569d modified: tests/ut/ge/hybrid/ge_hybrid_unittest.cc
4 years ago
wangxiaotian22 bcd0fc5111 modify clang
4 years ago
wangxiaotian22 2532144c77 revert get logheader
4 years ago
wxl 1227e0339f add force infershape for some op
4 years ago
mindspore-ci-bot 305138f9f7 !1225 Replace rtLabelGotoEx by rtLabelSwitchByIndex
4 years ago
mindspore-ci-bot 2ece5f3b63 !1218 inference dynamic input
4 years ago
mindspore-ci-bot f7d8c04c57 !1226 modify data dumper
4 years ago
mindspore-ci-bot a028954204 !1222 error log modify
4 years ago
zhou_chao1993 684093d759 modify data dumper
4 years ago
wangxiaotian22 390905b877 modify
4 years ago
wangxiaotian22 11c9476b41 modify
4 years ago
zhangxiaokun cd16a4215d Fix util.h Check clang-format
4 years ago
wangxiaotian22 395fddbcff fix ut core
4 years ago
zhangxiaokun 8d8786bfd2 Replace rtLabelGotoEx by rtLabelSwitchByIndex
4 years ago
wxl 5ae267433b add force infershape for some op
4 years ago
wangxiaotian22 19a55bcdb4 modify
4 years ago
wangxiaotian22 919753675f add ut depend
4 years ago
zhaoxinxin 612463e089 modified: tests/ut/ge/hybrid/ge_hybrid_unittest.cc
4 years ago
wangxiaotian22 342944505a fix clang
4 years ago
wxl 365401b52f add force infershape for some op
4 years ago
wangxiaotian22 0f4cf5a291 fix clang
4 years ago
wangxiaotian22 0d09bdb890 ERROR log modify
4 years ago
zhengyuanhua 08206700f9 inference dynamic input
4 years ago
zhaoxinxin 3d0a83a455 modified: tests/ut/ge/hybrid/ge_hybrid_unittest.cc
4 years ago
wxl c94e0fbdc6 add force infershape for some op
4 years ago
zhaoxinxin 5fe85f3f85 modified: ge/graph/partition/dynamic_shape_partition.cc
4 years ago
zhaoxinxin 58a3e06c17 modified: ge/graph/build/graph_builder.cc
4 years ago
wjm f7840a1f93 async
4 years ago
wjm ab4118108d fix
4 years ago
wjm 0d3849db73 fix
4 years ago
wjm 91ec44e352 fix file num
4 years ago

@ -82,8 +82,8 @@ if (ENABLE_OPEN_SRC)
elseif(ENABLE_GE_COV OR ENABLE_GE_UT)
add_subdirectory(tests)
else()
find_module(slog libalog.so ${ASCEND_ATC_DIR} ${ASCEND_DRIVER_COMMON_DIR})
find_module(static_mmpa libmmpa.a ${ASCEND_ATC_DIR} ${ASCEND_RUNTIME_DIR})
find_module(slog libalog.so ${ASCEND_ATC_DIR})
find_module(static_mmpa libmmpa.a ${ASCEND_ATC_DIR})
if(PLATFORM STREQUAL "train")
find_module(adump_server libadump_server.a ${ASCEND_RUNTIME_DIR})
find_module(runtime libruntime.so ${ASCEND_RUNTIME_DIR})
@ -150,7 +150,6 @@ elseif(ENABLE_MS_TESTCASES)
include(cmake/external_libs/protobuf_static.cmake)
include(cmake/external_libs/protoc.cmake)
include(cmake/external_libs/securec.cmake)
include(cmake/external_libs/json.cmake)
include(cmake/FindModule.cmake)
include(cmake/intf_pub_linux.cmake)

@ -229,7 +229,7 @@ if [[ "X$ENABLE_GE_UT" = "Xon" || "X$ENABLE_GE_COV" = "Xon" ]]; then
rm -rf ${BASEPATH}/cov
mkdir ${BASEPATH}/cov
lcov -c -d build/tests/ut/ge -d build/tests/ut/common/graph/ -o cov/tmp.info
lcov -r cov/tmp.info '*/output/*' '*/build/opensrc/*' '*/build/proto/*' '*/third_party/*' '*/tests/*' '/usr/local/*' -o cov/coverage.info
lcov -r cov/tmp.info '*/output/*' '*/build/opensrc/*' '*/build/proto/*' '*/third_party/*' '*/tests/*' '/usr/local/*' '/usr/include/*' '*/metadef/*' '*/parser/*' -o cov/coverage.info
cd ${BASEPATH}/cov
genhtml coverage.info
fi

@ -9,6 +9,10 @@ if (GE_PB_PKG)
set(REQ_URL "${GE_PB_PKG}/libs/ge_nlohmann_json/include.zip")
set(MD5 "0dc903888211db3a0f170304cd9f3a89")
set(JSON_INCLUDE_DIR ${JSON_SRC_DIR})
#elseif (ENABLE_GITEE)
# set(REQ_URL "https://gitee.com/mirrors/JSON-for-Modern-CPP/repository/archive/v3.6.1.zip")
# set(MD5 "5bda78ce308e6cfcf614dcf1d5ff27a7")
#set(JSON_INCLUDE_DIR "${JSON_SRC_DIR}/include")
else()
set(REQ_URL "https://github.com/nlohmann/json/releases/download/v3.6.1/include.zip")
set(MD5 "0dc903888211db3a0f170304cd9f3a89")

@ -31,6 +31,7 @@ set(PROTO_HEADER_LIST
protobuf_generate(ge PROTO_SRCS PROTO_HDRS ${PROTO_LIST})
protobuf_generate(ge PROTO_CLIENT_SRCS PROTO_CLIENT_HDRS ${PROTO_CLIENT_LIST})
protobuf_generate(ge PROTO_HEADER_SRCS PROTO_HEADER_HDRS ${PROTO_HEADER_LIST})
protobuf_generate(ge_client PROTO_CLIENT_HEADER_SRCS PROTO_CLIENT_HEADER_HDRS ${PROTO_HEADER_LIST})
if (NOT ENABLE_D AND NOT ENABLE_ACL AND NOT ENABLE_MS_TESTCASES)
############ libge_proto_common.a ############
@ -56,7 +57,7 @@ target_link_libraries(ge_proto_common PRIVATE
############ libge_proto_client.a ############
add_library(ge_proto_client STATIC
${PROTO_HEADER_HDRS}
${PROTO_CLIENT_HEADER_HDRS}
${PROTO_CLIENT_SRCS}
)
@ -65,6 +66,11 @@ target_compile_definitions(ge_proto_client PRIVATE
google=ascend_private
)
target_include_directories(ge_proto_client PRIVATE
${CMAKE_BINARY_DIR}/proto/ge_client
${CMAKE_BINARY_DIR}/proto/ge_client/proto
)
target_compile_options(ge_proto_client PRIVATE
-O2
-fno-common
@ -189,6 +195,7 @@ set(TRAIN_SRC_LIST
"graph/passes/atomic_addr_clean_pass.cc"
"graph/passes/mark_same_addr_pass.cc"
"graph/passes/mark_graph_unknown_status_pass.cc"
"graph/passes/mark_node_unknown_shape_pass.cc"
"graph/passes/mark_agnostic_pass.cc"
"graph/partition/dynamic_shape_partition.cc"
"graph/partition/stage_partition.cc"
@ -209,6 +216,7 @@ set(TRAIN_SRC_LIST
"graph/passes/dimension_compute_pass.cc"
"graph/passes/dropout_pass.cc"
"graph/passes/hccl_group_pass.cc"
"graph/passes/hccl_tailing_optimization_pass.cc"
"graph/passes/enter_pass.cc"
"graph/passes/assign_remove_pass.cc"
"graph/passes/inplace_support_check_pass.cc"
@ -320,7 +328,9 @@ set(TRAIN_SRC_LIST
"graph/passes/variable_ref_useless_control_out_delete_pass.cc"
"graph/passes/end_of_sequence_add_control_pass.cc"
"graph/passes/memcpy_addr_async_pass.cc"
"graph/passes/parallel_group_pass.cc"
"graph/passes/set_input_output_offset_pass.cc"
"graph/passes/buffer_pool_memory_pass.cc"
"graph/preprocess/graph_preprocess.cc"
"graph/preprocess/insert_op/ge_aipp_op.cc"
"graph/preprocess/insert_op/util_insert_aipp_op.cc"
@ -399,6 +409,7 @@ set(TRAIN_SRC_LIST
"graph/build/memory/hybrid_mem_assigner.cc"
"graph/build/memory/max_block_mem_assigner.cc"
"graph/build/memory/var_mem_assign_util.cc"
"graph/build/memory/buffer_pool_mem_assigner.cc"
)
set(INFER_SRC_LIST
@ -499,6 +510,7 @@ set(INFER_SRC_LIST
"graph/passes/atomic_addr_clean_pass.cc"
"graph/passes/mark_same_addr_pass.cc"
"graph/passes/mark_graph_unknown_status_pass.cc"
"graph/passes/mark_node_unknown_shape_pass.cc"
"graph/passes/mark_agnostic_pass.cc"
"graph/common/omg_util.cc"
"graph/common/bcast.cc"
@ -605,8 +617,11 @@ set(INFER_SRC_LIST
"graph/passes/link_gen_mask_nodes_pass.cc"
"graph/passes/replace_with_empty_const_pass.cc"
"graph/passes/hccl_group_pass.cc"
"graph/passes/hccl_tailing_optimization_pass.cc"
"graph/passes/memcpy_addr_async_pass.cc"
"graph/passes/set_input_output_offset_pass.cc"
"graph/passes/parallel_group_pass.cc"
"graph/passes/buffer_pool_memory_pass.cc"
"graph/manager/model_manager/event_manager.cc"
"graph/manager/util/rt_context_util.cc"
"graph/manager/util/variable_accelerate_ctrl.cc"
@ -670,6 +685,7 @@ set(INFER_SRC_LIST
"graph/build/memory/hybrid_mem_assigner.cc"
"graph/build/memory/max_block_mem_assigner.cc"
"graph/build/memory/var_mem_assign_util.cc"
"graph/build/memory/buffer_pool_mem_assigner.cc"
)
if (NOT ENABLE_D AND NOT ENABLE_ACL AND NOT ENABLE_MS_TESTCASES)
@ -700,6 +716,7 @@ target_compile_definitions(ge_runner PRIVATE
DAVINCI_CLOUD
google=ascend_private
FUNC_VISIBILITY
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
)
target_compile_options(ge_runner PRIVATE
@ -775,6 +792,7 @@ target_compile_definitions(ge_compiler PRIVATE
COMPILE_OMG_PACKAGE
google=ascend_private
FUNC_VISIBILITY
$<$<STREQUAL:${ENABLE_OPEN_SRC},True>:ONLY_COMPILE_OPEN_SRC>
)
target_compile_options(ge_compiler PRIVATE
@ -937,6 +955,10 @@ add_library(atc_stub_ge_compiler SHARED
add_dependencies(atc_stub_ge_compiler ge_stub)
target_compile_options(atc_stub_ge_compiler PRIVATE
-fno-common
)
target_link_libraries(atc_stub_ge_compiler PRIVATE
$<BUILD_INTERFACE:intf_pub>
)
@ -973,6 +995,10 @@ add_library(fwk_stub_ge_runner SHARED
add_dependencies(fwk_stub_ge_runner ge_stub)
target_compile_options(fwk_stub_ge_runner PRIVATE
-fno-common
)
target_link_libraries(fwk_stub_ge_runner PRIVATE
$<BUILD_INTERFACE:intf_pub>
)

@ -155,12 +155,12 @@ std::shared_ptr<GraphInfo> Analyzer::GetJsonObject(uint64_t session_id, uint64_t
std::lock_guard<std::recursive_mutex> lg(mutex_);
auto iter = graph_infos_.find(session_id);
if (iter == graph_infos_.end()) {
GELOGE(PARAM_INVALID, "[Check][Session_id]session_id:%lu does not exist! graph_id:%lu.", session_id, graph_id);
GELOGE(PARAM_INVALID, "[Check][SessionId]session_id:%lu does not exist! graph_id:%lu", session_id, graph_id);
return nullptr;
} else {
auto iter1 = (iter->second).find(graph_id);
if (iter1 == (iter->second).end()) {
GELOGE(PARAM_INVALID, "[Check][Graph_id]graph_id:%lu does not exist! session_id:%lu.", graph_id, session_id);
GELOGE(PARAM_INVALID, "[Check][GraphId]graph_id:%lu does not exist! session_id:%lu.", graph_id, session_id);
return nullptr;
}
GELOGI("GetJsonObject Success!session_id:%lu graph_id:%lu", session_id, graph_id);
@ -200,7 +200,7 @@ ge::Status Analyzer::CreateAnalyzerFile() {
}
ge::Status Analyzer::SaveAnalyzerDataToFile(uint64_t session_id, uint64_t graph_id) {
GELOGD("start to save analyze file.");
GELOGD("start to save analyze file");
auto graph_info = GetJsonObject(session_id, graph_id);
GE_CHECK_NOTNULL(graph_info);
@ -221,7 +221,10 @@ ge::Status Analyzer::SaveAnalyzerDataToFile(uint64_t session_id, uint64_t graph_
try {
json_file_ << jsn.dump(kJsonDumpLevel) << std::endl;
} catch (nlohmann::detail::type_error &e) {
GELOGE(FAILED, "[Json.dump][GraphInfo]json.dump to analyze file [%s] failed because [%s], session_id:%lu, graph_id:%lu", json_file_name_.c_str(), e.what(), session_id, graph_id);
GELOGE(FAILED,
"[Json.dump][GraphInfo]json.dump to analyze file [%s] failed because [%s],"
"session_id:%lu, graph_id:%lu",
json_file_name_.c_str(), e.what(), session_id, graph_id);
ret_failed = true;
}
json_file_.close();
@ -229,7 +232,7 @@ ge::Status Analyzer::SaveAnalyzerDataToFile(uint64_t session_id, uint64_t graph_
}
ge::Status Analyzer::DoAnalyze(DataInfo &data_info) {
GELOGD("start to do analyzer process!");
GELOGD("start to do analyzer process");
auto pnode = data_info.node_ptr;
GE_CHECK_NOTNULL(pnode);
@ -241,7 +244,9 @@ ge::Status Analyzer::DoAnalyze(DataInfo &data_info) {
GE_CHECK_NOTNULL(graph_info);
auto status = SaveOpInfo(desc, data_info, graph_info);
if (status != SUCCESS) {
GELOGE(status, "[Check][SaveOpInfo]save op info: desc_name [%s] desc_type [%s] failed!", desc->GetName().c_str(), desc->GetType().c_str());
GELOGE(status,
"[Check][SaveOpInfo]save op info: desc_name [%s] desc_type [%s] failed!",
desc->GetName().c_str(), desc->GetType().c_str());
return FAILED;
}
// create json file

File diff suppressed because it is too large Load Diff

@ -88,6 +88,7 @@ message AippOpParams {
int32 right_padding_size = 69;
int32 top_padding_size = 70;
int32 bottom_padding_size = 71;
float padding_value = 72;
int32 mean_chn_0 = 10;
int32 mean_chn_1 = 11;

@ -16,6 +16,7 @@ set(PROTO_LIST
)
protobuf_generate(ge PROTO_SRCS PROTO_HDRS ${PROTO_LIST})
protobuf_generate(ge_static PROTO_STATIC_SRCS PROTO_STATIC_HDRS ${PROTO_LIST})
set(SRC_LIST
"context/ctx.cc"
@ -127,7 +128,7 @@ target_link_libraries(ge_common PRIVATE
)
############ libge_common.a ############
add_library(ge_common_static STATIC ${SRC_LIST} ${PROTO_HDRS})
add_library(ge_common_static STATIC ${SRC_LIST} ${PROTO_STATIC_HDRS})
target_compile_definitions(ge_common_static PRIVATE
PROTOBUF_INLINE_NOT_IN_HEADERS=0
HOST_VISIBILITY
@ -158,7 +159,7 @@ target_include_directories(ge_common_static PRIVATE
${METADEF_DIR}/inc/external/graph
${METADEF_DIR}/inc/graph
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/proto/ge
${CMAKE_BINARY_DIR}/proto/ge_static
#### yellow zone ####
${GE_DEPEND_DIR}/inc
${GE_DEPEND_DIR}/inc/cce

@ -33,7 +33,8 @@ const int kFileOpSuccess = 0;
namespace ge {
Status FileSaver::OpenFile(int32_t &fd, const std::string &file_path) {
if (CheckPath(file_path) != SUCCESS) {
GELOGE(FAILED, "Check output file failed.");
GELOGE(FAILED, "[Check][FilePath]Check output file failed, file_path:%s.", file_path.c_str());
REPORT_CALL_ERROR("E19999", "Check output file failed, file_path:%s.", file_path.c_str());
return FAILED;
}
@ -45,7 +46,8 @@ Status FileSaver::OpenFile(int32_t &fd, const std::string &file_path) {
fd = mmOpen2(real_path, M_RDWR | M_CREAT | O_TRUNC, mode);
if (fd == EN_INVALID_PARAM || fd == EN_ERROR) {
// -1: Failed to open file; - 2: Illegal parameter
GELOGE(FAILED, "Open file failed. mmpa_errno = %d, %s", fd, strerror(errno));
GELOGE(FAILED, "[Open][File]Failed. mmpa_errno = %d, %s", fd, strerror(errno));
REPORT_INNER_ERROR("E19999", "Open file failed, mmpa_errno = %d, error:%s.", fd, strerror(errno));
return FAILED;
}
return SUCCESS;
@ -62,7 +64,9 @@ Status FileSaver::WriteData(const void *data, uint32_t size, int32_t fd) {
while (size > size_1g) {
write_count = mmWrite(fd, reinterpret_cast<void *>(seek), size_1g);
if (write_count == EN_INVALID_PARAM || write_count == EN_ERROR) {
GELOGE(FAILED, "Write data failed. mmpa_errorno = %ld, %s", write_count, strerror(errno));
GELOGE(FAILED, "[Write][Data]Failed, mmpa_errorno = %ld, error:%s", write_count, strerror(errno));
REPORT_INNER_ERROR("E19999", "Write data failed, mmpa_errorno = %ld, error:%s.",
write_count, strerror(errno));
return FAILED;
}
size -= size_1g;
@ -75,7 +79,9 @@ Status FileSaver::WriteData(const void *data, uint32_t size, int32_t fd) {
// -1: Failed to write to file; - 2: Illegal parameter
if (write_count == EN_INVALID_PARAM || write_count == EN_ERROR) {
GELOGE(FAILED, "Write data failed. mmpa_errorno = %ld, %s", write_count, strerror(errno));
GELOGE(FAILED, "[Write][Data]Failed. mmpa_errorno = %ld, error:%s", write_count, strerror(errno));
REPORT_INNER_ERROR("E19999", "Write data failed, mmpa_errorno = %ld, error:%s.",
write_count, strerror(errno));
return FAILED;
}
@ -85,7 +91,8 @@ Status FileSaver::WriteData(const void *data, uint32_t size, int32_t fd) {
Status FileSaver::SaveWithFileHeader(const std::string &file_path, const ModelFileHeader &file_header, const void *data,
int len) {
if (data == nullptr || len <= 0) {
GELOGE(FAILED, "Model_data is null or the length[%d] less than 1.", len);
GELOGE(FAILED, "[Check][Param]Failed, model_data is null or the length[%d] is less than 1.", len);
REPORT_INNER_ERROR("E19999", "Save file failed, model_data is null or the length:%d is less than 1.", len);
return FAILED;
}
@ -104,7 +111,8 @@ Status FileSaver::SaveWithFileHeader(const std::string &file_path, const ModelFi
} while (0);
// Close file
if (mmClose(fd) != 0) { // mmClose 0: success
GELOGE(FAILED, "Close file failed.");
GELOGE(FAILED, "[Close][File]Failed, error_code:%u errmsg:%s", ret, strerror(errno));
REPORT_INNER_ERROR("E19999", "Close file failed, error_code:%u errmsg:%s", ret, strerror(errno));
ret = FAILED;
}
return ret;
@ -140,60 +148,95 @@ Status FileSaver::SaveWithFileHeader(const std::string &file_path, const ModelFi
}
} while (0);
// Close file
GE_CHK_BOOL_RET_STATUS(mmClose(fd) == EN_OK, FAILED, "Close file failed.");
if (mmClose(fd) != EN_OK) {
GELOGE(FAILED, "[Close][File]Failed, error_code:%u errmsg:%s", ret, strerror(errno));
REPORT_CALL_ERROR("E19999", "Close file failed, error_code:%u errmsg:%s", ret, strerror(errno));
ret = FAILED;
}
return ret;
}
Status FileSaver::SaveToBuffWithFileHeader(const ModelFileHeader &file_header,
ModelPartitionTable &model_partition_table,
const std::vector<ModelPartition> &partitionDatas,
const std::vector<ModelPartition> &partition_datas,
ge::ModelBufferData &model) {
const vector<ModelPartitionTable *> model_partition_tables = { &model_partition_table };
const std::vector<std::vector<ModelPartition>> all_partition_datas = { partition_datas };
return SaveToBuffWithFileHeader(file_header, model_partition_tables, all_partition_datas, model);
}
Status FileSaver::SaveToBuffWithFileHeader(const ModelFileHeader &file_header,
const vector<ModelPartitionTable *> &model_partition_tables,
const std::vector<std::vector<ModelPartition>> &all_partition_datas,
ge::ModelBufferData &model) {
GE_CHK_BOOL_RET_STATUS(
!partitionDatas.empty() && model_partition_table.num != 0 && model_partition_table.num == partitionDatas.size(),
FAILED, "Invalid param:partition data size is (%u), model_partition_table.num is (%zu).",
model_partition_table.num, partitionDatas.size());
uint32_t model_header_size = sizeof(ModelFileHeader);
uint32_t table_size = static_cast<uint32_t>(SIZE_OF_MODEL_PARTITION_TABLE(model_partition_table));
uint32_t total_size = model_header_size + table_size;
for (const auto &partitionData : partitionDatas) {
auto ret = ge::CheckUint32AddOverflow(total_size, partitionData.size);
GE_CHK_BOOL_RET_STATUS(ret == SUCCESS, FAILED, "add uint32 overflow!");
total_size = total_size + partitionData.size;
GE_CHK_BOOL_RET_STATUS(model_partition_tables.size() == all_partition_datas.size(), PARAM_INVALID,
"Model table size %zu does not match partition size %zu.",
model_partition_tables.size(), all_partition_datas.size());
for (size_t index = 0; index < model_partition_tables.size(); ++index) {
auto &cur_partiton_data = all_partition_datas[index];
auto &cur_model_partition_table = *model_partition_tables[index];
GE_CHK_BOOL_RET_STATUS(!cur_partiton_data.empty() && cur_model_partition_table.num != 0
&& cur_model_partition_table.num == cur_partiton_data.size(), FAILED,
"Invalid param: partition data size is (%zu), model_partition_table.num is (%u).",
cur_partiton_data.size(), cur_model_partition_table.num);
}
uint64_t model_header_size = sizeof(ModelFileHeader);
uint64_t total_size = model_header_size;
for (size_t index = 0; index < model_partition_tables.size(); ++index) {
auto &cur_model_partition_table = *model_partition_tables[index];
total_size += static_cast<uint64_t>(SIZE_OF_MODEL_PARTITION_TABLE(cur_model_partition_table));
auto &cur_partition_data = all_partition_datas[index];
for (const auto &partition_data : cur_partition_data) {
auto ret = ge::CheckUint64AddOverflow(total_size, partition_data.size);
GE_CHK_BOOL_RET_STATUS(ret == SUCCESS, FAILED, "Add uint64 overflow!");
total_size += partition_data.size;
}
}
// save to buff
auto buff = reinterpret_cast<uint8_t *>(malloc(total_size));
GE_CHK_BOOL_RET_STATUS(buff != nullptr, FAILED, "malloc failed!");
GE_PRINT_DYNAMIC_MEMORY(malloc, "file buffer.", total_size)
GE_CHK_BOOL_RET_STATUS(buff != nullptr, FAILED, "Malloc failed!");
GE_PRINT_DYNAMIC_MEMORY(malloc, "File buffer.", total_size)
model.data.reset(buff, [](uint8_t *buff) {
GELOGD("Free online model memory.");
free(buff);
buff = nullptr;
});
model.length = total_size;
uint32_t left_space = total_size;
auto ret_mem1 = memcpy_s(buff, left_space, reinterpret_cast<void *>(const_cast<ModelFileHeader *>(&file_header)),
model_header_size);
GE_CHK_BOOL_RET_STATUS(ret_mem1 == 0, FAILED, "memcpy_s failed!");
uint64_t left_space = total_size;
auto ret_mem = memcpy_s(buff, left_space, reinterpret_cast<void *>(const_cast<ModelFileHeader *>(&file_header)),
model_header_size);
GE_CHK_BOOL_RET_STATUS(ret_mem == EOK, FAILED, "Memcpy_s failed!");
buff += model_header_size;
left_space -= model_header_size;
auto ret_mem2 = memcpy_s(buff, left_space, reinterpret_cast<void *>(&model_partition_table), table_size);
GE_CHK_BOOL_RET_STATUS(ret_mem2 == 0, FAILED, "memcpy_s failed!");
buff += table_size;
left_space -= table_size;
for (const auto &partitionData : partitionDatas) {
auto ret_mem3 = memcpy_s(buff, left_space, reinterpret_cast<void *>(const_cast<uint8_t *>(partitionData.data)),
partitionData.size);
GE_CHK_BOOL_RET_STATUS(ret_mem3 == 0, FAILED, "memcpy failed!");
buff += partitionData.size;
left_space -= partitionData.size;
for (size_t index = 0; index < model_partition_tables.size(); ++index) {
auto &cur_tabel = *model_partition_tables[index];
uint64_t table_size = static_cast<uint64_t>(SIZE_OF_MODEL_PARTITION_TABLE(cur_tabel));
ret_mem = memcpy_s(buff, left_space, reinterpret_cast<void *>(&cur_tabel), table_size);
GE_CHK_BOOL_RET_STATUS(ret_mem == EOK, FAILED, "Memcpy_s failed!");
buff += table_size;
left_space -= table_size;
auto &cur_partition_data = all_partition_datas[index];
for (const auto &partition_data : cur_partition_data) {
ret_mem = memcpy_s(buff, left_space, reinterpret_cast<void *>(const_cast<uint8_t *>(partition_data.data)),
partition_data.size);
GE_CHK_BOOL_RET_STATUS(ret_mem == EOK, FAILED, "Memcpy_s failed!");
buff += partition_data.size;
left_space -= partition_data.size;
}
}
return SUCCESS;
}
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status FileSaver::CheckPath(const std::string &file_path) {
// Determine file path length
if (file_path.size() >= MMPA_MAX_PATH) {
GELOGE(FAILED, "Path is too long:%zu", file_path.size());
GELOGE(FAILED, "[Check][FilePath]Failed, file path's length:%zu > mmpa_max_path:%d",
file_path.size(), MMPA_MAX_PATH);
REPORT_INNER_ERROR("E19999", "Check file path failed, file path's length:%zu > mmpa_max_path:%d",
file_path.size(), MMPA_MAX_PATH);
return FAILED;
}
@ -212,7 +255,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status FileSaver::CheckPath(con
// If there is a path before the file name, create the path
if (path_split_pos != -1) {
if (CreateDirectory(std::string(file_path).substr(0, static_cast<size_t>(path_split_pos))) != kFileOpSuccess) {
GELOGE(FAILED, "CreateDirectory failed, file path:%s.", file_path.c_str());
GELOGE(FAILED, "[Create][Directory]Failed, file path:%s.", file_path.c_str());
return FAILED;
}
}
@ -223,7 +266,8 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status FileSaver::CheckPath(con
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status
FileSaver::SaveToFile(const string &file_path, const ge::ModelData &model, const ModelFileHeader *model_file_header) {
if (file_path.empty() || model.model_data == nullptr || model.model_len == 0) {
GELOGE(FAILED, "Incorrected input param. file_path.empty() || model.model_data == nullptr || model.model_len == 0");
GELOGE(FAILED, "[Save][File]Incorrect input param, file_path is empty or model_data is nullptr or model_len is 0");
REPORT_INNER_ERROR("E19999", "Save file failed, at least one of the input parameters(file_path, model_data, model_len) is incorrect");
return FAILED;
}
@ -240,7 +284,8 @@ FileSaver::SaveToFile(const string &file_path, const ge::ModelData &model, const
const Status ret = SaveWithFileHeader(file_path, file_header, model.model_data, file_header.length);
if (ret != SUCCESS) {
GELOGE(FAILED, "Save file failed, file_path:%s, file header len:%u.", file_path.c_str(), file_header.length);
GELOGE(FAILED, "[Save][File]Failed, file_path:%s, file_header_len:%u, error_code:%u.",
file_path.c_str(), file_header.length, ret);
return FAILED;
}
@ -305,7 +350,7 @@ Status FileSaver::SaveWithFileHeader(const std::string &file_path, const ModelFi
// Write partition data
auto &cur_partition_datas = all_partition_datas[index];
for (const auto &partition_data : cur_partition_datas) {
GELOGI("GC:size[%u]", partition_data.size);
GELOGI("part_size[%u]", partition_data.size);
GE_CHK_BOOL_TRUE_EXEC_WITH_LOG(
WriteData(static_cast<const void *>(partition_data.data), partition_data.size, fd) != SUCCESS, ret = FAILED;
break);
@ -313,14 +358,19 @@ Status FileSaver::SaveWithFileHeader(const std::string &file_path, const ModelFi
}
} while (0);
// Close file
GE_CHK_BOOL_RET_STATUS(mmClose(fd) == EN_OK, FAILED, "Close file failed.");
if (mmClose(fd) != 0) { // mmClose 0: success
GELOGE(FAILED, "[Close][File]Failed, error_code:%u errmsg:%s", ret, strerror(errno));
REPORT_CALL_ERROR("E19999", "Close file failed, error_code:%u errmsg:%s", ret, strerror(errno));
ret = FAILED;
}
return ret;
}
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status FileSaver::SaveToFile(const string &file_path, const void *data,
int len) {
if (data == nullptr || len <= 0) {
GELOGE(FAILED, "Model_data is null or the length[%d] less than 1.", len);
GELOGE(FAILED, "[Check][Param]Failed, model_data is null or the length[%d] is less than 1.", len);
REPORT_INNER_ERROR("E19999", "Save file failed, the model_data is null or its length:%d is less than 1.", len);
return FAILED;
}
@ -335,7 +385,8 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status FileSaver::SaveToFile(co
// Close file
if (mmClose(fd) != 0) { // mmClose 0: success
GELOGE(FAILED, "Close file failed.");
GELOGE(FAILED, "[Close][File]Failed, error_code:%u errmsg:%s", ret, strerror(errno));
REPORT_CALL_ERROR("E19999", "Close file failed, error_code:%u errmsg:%s", ret, strerror(errno));
ret = FAILED;
}
return ret;

@ -80,9 +80,14 @@ class FileSaver {
static Status SaveToBuffWithFileHeader(const ModelFileHeader &file_header,
ModelPartitionTable &model_partition_table,
const std::vector<ModelPartition> &partitionDatas,
const std::vector<ModelPartition> &partition_datas,
ge::ModelBufferData& model);
static Status SaveToBuffWithFileHeader(const ModelFileHeader &file_header,
const std::vector<ModelPartitionTable *> &model_partition_tables,
const std::vector<std::vector<ModelPartition>> &all_partition_datas,
ge::ModelBufferData &model);
static Status SaveToFile(const string &file_path, const void *data, int len);
protected:
@ -113,8 +118,8 @@ class FileSaver {
ModelPartitionTable &model_partition_table,
const std::vector<ModelPartition> &partition_datas);
static Status SaveWithFileHeader(const std::string &file_path, const ModelFileHeader &file_header,
vector<ModelPartitionTable *> &model_partition_tables,
const vector<vector<ModelPartition>> &all_partition_datas);
std::vector<ModelPartitionTable *> &model_partition_tables,
const std::vector<std::vector<ModelPartition>> &all_partition_datas);
};
} // namespace ge
#endif // GE_COMMON_AUTH_FILE_SAVER_H_

@ -41,14 +41,16 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status MemoryDumper::DumpToFile
GE_CHECK_NOTNULL(filename);
GE_CHECK_NOTNULL(data);
if (len == 0) {
GELOGE(FAILED, "len is 0.");
GELOGE(FAILED, "[Check][Param]Failed, data length is 0.");
REPORT_INNER_ERROR("E19999", "Check param failed, data length is 0.");
return PARAM_INVALID;
}
// Open the file
int fd = OpenFile(filename);
if (fd == kInvalidFd) {
GELOGE(FAILED, "Open file failed.");
GELOGE(FAILED, "[Open][File]Failed, filename:%s.", filename);
REPORT_INNER_ERROR("E19999", "Opne file failed, filename:%s.", filename);
return FAILED;
}
@ -57,13 +59,15 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status MemoryDumper::DumpToFile
int32_t mmpa_ret = mmWrite(fd, data, len);
// mmWrite return -1:Failed to write data to filereturn -2:Invalid parameter
if (mmpa_ret == EN_ERROR || mmpa_ret == EN_INVALID_PARAM) {
GELOGE(FAILED, "Write to file failed. errno = %d, %s", mmpa_ret, strerror(errno));
GELOGE(FAILED, "[Write][Data]Failed, errno = %d, error:%s", mmpa_ret, strerror(errno));
REPORT_INNER_ERROR("E19999", "Write data failed, errno = %d, error:%s.", mmpa_ret, strerror(errno));
ret = FAILED;
}
// Close the file
if (mmClose(fd) != EN_OK) { // mmClose return 0: success
GELOGE(FAILED, "Close file failed.");
GELOGE(FAILED, "[Close][File]Failed, error_code:%u, filename:%s.", ret, filename);
REPORT_INNER_ERROR("E19999", "Close file failed, error_code:%u, filename:%s.", ret, filename);
ret = FAILED;
}
@ -89,7 +93,8 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status MemoryDumper::Open(const
fd_ = OpenFile(filename);
if (fd_ == kInvalidFd) {
GELOGE(FAILED, "Open %s failed.", filename);
GELOGE(FAILED, "[Open][File]Failed, filename:%s.", filename);
REPORT_INNER_ERROR("E19999", "Open file:%s failed.", filename);
return FAILED;
}
@ -104,7 +109,8 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status MemoryDumper::Dump(void
int32_t mmpa_ret = mmWrite(fd_, data, len);
// mmWrite return -1:failed to write data to filereturn -2:invalid parameter
if (mmpa_ret == EN_ERROR || mmpa_ret == EN_INVALID_PARAM) {
GELOGE(FAILED, "Write to file failed. errno = %d, %s", mmpa_ret, strerror(errno));
GELOGE(FAILED, "[Write][Data]Failed, errno = %d, error:%s", mmpa_ret, strerror(errno));
REPORT_INNER_ERROR("E19999", "Write data to file failed, errno = %d, error:%s.", mmpa_ret, strerror(errno));
return FAILED;
}
@ -157,7 +163,8 @@ int MemoryDumper::OpenFile(const char *filename) {
int32_t fd = mmOpen2(real_path.c_str(), M_RDWR | M_CREAT | O_TRUNC, mode);
if (fd == EN_ERROR || fd == EN_INVALID_PARAM) {
GELOGE(kInvalidFd, "open file failed. errno = %d, %s", fd, strerror(errno));
GELOGE(kInvalidFd, "[Open][File]Failed. errno = %d, error:%s, filename:%s.",
fd, strerror(errno), filename);
return kInvalidFd;
}
return fd;

@ -96,7 +96,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status DumpManager::SetDumpConf
dump_mode = dump_config.dump_mode;
GELOGI("Dump mode is %s", dump_mode.c_str());
dump_properties.SetDumpMode(dump_mode);
dump_properties_map_.emplace(kInferSessionId, dump_properties);
dump_properties_map_[kInferSessionId] = dump_properties;
return SUCCESS;
}

@ -20,6 +20,7 @@
#include "common/ge/datatype_util.h"
#include "framework/common/debug/ge_log.h"
#include "framework/common/util.h"
#include "framework/common/types.h"
#include "graph/anchor.h"
#include "graph/ge_tensor.h"
#include "graph/op_desc.h"
@ -55,8 +56,10 @@ void DumpOp::SetLoopAddr(void *global_step, void *loop_per_iter, void *loop_cond
loop_cond_ = reinterpret_cast<uintptr_t>(loop_cond);
}
void DumpOp::SetDynamicModelInfo(const string &dynamic_model_name, uint32_t dynamic_model_id) {
void DumpOp::SetDynamicModelInfo(const string &dynamic_model_name, const string &dynamic_om_name,
uint32_t dynamic_model_id) {
dynamic_model_name_ = dynamic_model_name;
dynamic_om_name_ = dynamic_om_name;
dynamic_model_id_ = dynamic_model_id;
}
@ -200,6 +203,28 @@ Status DumpOp::ExecutorDumpOp(aicpu::dump::OpMappingInfo &op_mapping_info) {
return SUCCESS;
}
Status DumpOp::SetDumpModelName(aicpu::dump::OpMappingInfo &op_mapping_info) {
std::set<std::string> model_list = dump_properties_.GetAllDumpModel();
bool not_find_by_omname = model_list.find(dynamic_om_name_) == model_list.end();
bool not_find_by_modelname = model_list.find(dynamic_model_name_) == model_list.end();
std::string dump_model_name = not_find_by_omname ? dynamic_model_name_ : dynamic_om_name_;
if (model_list.find(DUMP_ALL_MODEL) == model_list.end()) {
if (not_find_by_omname && not_find_by_modelname) {
std::string model_list_str;
for (auto &model : model_list) {
model_list_str += "[" + model + "].";
}
GELOGW("Model %s will not be set to dump, dump list: %s", dump_model_name.c_str(), model_list_str.c_str());
return FAILED;
}
}
if (!dump_model_name.empty() && dump_properties_.IsDumpOpen()) {
GELOGD("Dump model name is %s", dump_model_name.c_str());
op_mapping_info.set_model_name(dump_model_name);
}
return SUCCESS;
}
Status DumpOp::LaunchDumpOp() {
GELOGI("Start to launch dump op %s", op_desc_->GetName().c_str());
int32_t device_id = 0;
@ -209,8 +234,7 @@ Status DumpOp::LaunchDumpOp() {
return RT_ERROR_TO_GE_STATUS(rt_ret);
}
if (device_id < 0) {
GELOGE(ACL_ERROR_GE_INTERNAL_ERROR,
"Check device_id failed, device_id = %d, which should be not less than 0.",
GELOGE(ACL_ERROR_GE_INTERNAL_ERROR, "Check device_id failed, device_id = %d, which should be not less than 0.",
device_id);
return ACL_ERROR_GE_INTERNAL_ERROR;
}
@ -220,11 +244,12 @@ Status DumpOp::LaunchDumpOp() {
op_mapping_info.set_flag(kAicpuLoadFlag);
op_mapping_info.set_dump_step(dump_properties_.GetDumpStep());
op_mapping_info.set_model_id(dynamic_model_id_);
if (!dynamic_model_name_.empty() && dump_properties_.IsDumpOpen()) {
op_mapping_info.set_model_name(dynamic_model_name_);
if (SetDumpModelName(op_mapping_info) != SUCCESS) {
return SUCCESS;
}
SetOpMappingLoopAddr(global_step_, loop_per_iter_, loop_cond_, op_mapping_info);
GELOGI("Dump step is %s ,dump path is %s ,in Launch dump op", dump_properties_.GetDumpStep().c_str(),
GELOGI("Dump step is %s ,dump path is %s in Launch dump op", dump_properties_.GetDumpStep().c_str(),
dump_path.c_str());
uint32_t task_id = 0;
uint32_t stream_id = 0;
@ -273,4 +298,4 @@ Status DumpOp::LaunchDumpOp() {
}
return SUCCESS;
}
} // namesapce ge
} // namespace ge

@ -34,12 +34,13 @@ class DumpOp {
vector<uintptr_t> output_addrs, rtStream_t stream);
Status LaunchDumpOp();
void SetLoopAddr(void *global_step, void *loop_per_iter, void *loop_cond);
void SetDynamicModelInfo(const string &dynamic_model_name, uint32_t dynamic_model_id);
void SetDynamicModelInfo(const string &dynamic_model_name, const string &dynamic_om_name, uint32_t dynamic_model_id);
private:
Status ExecutorDumpOp(aicpu::dump::OpMappingInfo &op_mapping_info);
Status DumpOutput(aicpu::dump::Task &task);
Status DumpInput(aicpu::dump::Task &task);
Status SetDumpModelName(aicpu::dump::OpMappingInfo &op_mapping_info);
DumpProperties dump_properties_;
OpDescPtr op_desc_;
@ -54,6 +55,7 @@ class DumpOp {
uintptr_t loop_cond_;
std::string dynamic_model_name_;
std::string dynamic_om_name_;
std::uint32_t dynamic_model_id_;
};
} // namespace ge

@ -35,14 +35,14 @@ const std::string kDumpStatusOpen = "on";
const uint32_t kAicoreOverflow = (0x1 << 0);
const uint32_t kAtomicOverflow = (0x1 << 1);
const uint32_t kAllOverflow = (kAicoreOverflow | kAtomicOverflow);
}
} // namespace
namespace ge {
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY DumpProperties::DumpProperties(const DumpProperties &other) {
CopyFrom(other);
}
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY DumpProperties &DumpProperties::operator=(
const DumpProperties &other) {
const DumpProperties &other) {
CopyFrom(other);
return *this;
}
@ -97,7 +97,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY void DumpProperties::InitByOpti
// The following is the new dump scenario of the fusion operator
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY void DumpProperties::AddPropertyValue(
const std::string &model, const std::set<std::string> &layers) {
const std::string &model, const std::set<std::string> &layers) {
for (const std::string &layer : layers) {
GELOGI("This model %s config to dump layer %s", model.c_str(), layer.c_str());
}
@ -138,7 +138,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY std::set<std::string> DumpPrope
}
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY std::set<std::string> DumpProperties::GetPropertyValue(
const std::string &model) const {
const std::string &model) const {
auto iter = model_dump_properties_map_.find(model);
if (iter != model_dump_properties_map_.end()) {
return iter->second;
@ -147,8 +147,9 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY std::set<std::string> DumpPrope
}
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY bool DumpProperties::IsLayerNeedDump(
const std::string &model, const std::string &om_name, const std::string &op_name) const {
const std::string &model, const std::string &om_name, const std::string &op_name) const {
// if dump all
GELOGD("model name is %s om name is %s op is %s in layer need dump", model.c_str(), om_name.c_str(), op_name.c_str());
if (model_dump_properties_map_.find(DUMP_ALL_MODEL) != model_dump_properties_map_.end()) {
return true;
}
@ -203,7 +204,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY const std::string &DumpProperti
}
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY void DumpProperties::SetDumpOpSwitch(
const std::string &dump_op_switch) {
const std::string &dump_op_switch) {
dump_op_switch_ = dump_op_switch;
}
@ -270,4 +271,4 @@ void DumpProperties::SetDumpDebugOptions() {
GELOGI("ge.exec.enableDumpDebug is false or is not set.");
}
}
} // namespace
} // namespace ge

@ -80,13 +80,11 @@ Status OpdebugRegister::RegisterDebugForStream(rtStream_t stream, uint32_t op_de
uint32_t debug_stream_id = 0;
uint32_t debug_task_id = 0;
#ifdef ONLY_COMPILE_OPEN_SRC
auto rt_ret = rtDebugRegisterForStream(stream, op_debug_mode, op_debug_addr_, &debug_stream_id, &debug_task_id);
if (rt_ret != RT_ERROR_NONE) {
GELOGE(RT_FAILED, "rtDebugRegisterForStream error, ret: 0x%X", rt_ret);
return RT_ERROR_TO_GE_STATUS(rt_ret);
}
#endif
GELOGD("debug_task_id:%u, debug_stream_id:%u in stream overflow.", debug_task_id, debug_stream_id);
data_dumper.SaveOpDebugId(debug_task_id, debug_stream_id, p2p_debug_addr_, true);
return SUCCESS;
@ -94,7 +92,6 @@ Status OpdebugRegister::RegisterDebugForStream(rtStream_t stream, uint32_t op_de
void OpdebugRegister::UnregisterDebugForStream(rtStream_t stream) {
rtError_t rt_ret = RT_ERROR_NONE;
#ifdef ONLY_COMPILE_OPEN_SRC
if (stream != nullptr) {
GELOGD("start call rtDebugUnRegisterForStream in unknown shape over flow.");
rt_ret = rtDebugUnRegisterForStream(stream);
@ -102,7 +99,6 @@ void OpdebugRegister::UnregisterDebugForStream(rtStream_t stream) {
GELOGW("rtDebugUnRegisterForStream failed, ret: 0x%X", rt_ret);
}
}
#endif
if (op_debug_addr_ != nullptr) {
rt_ret = rtFree(op_debug_addr_);
@ -145,4 +141,4 @@ Status OpdebugRegister::MallocMemForOpdebug() {
return SUCCESS;
}
} // namespace ge
} // namespace ge

@ -154,7 +154,11 @@ Status DataTypeTransfer::TransDataType(const CastArgs &args, TransResult &result
std::shared_ptr<uint8_t> dst(new (std::nothrow) uint8_t[total_size], std::default_delete<uint8_t[]>());
if (dst == nullptr) {
GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, "Failed to alloc the memory for dst buf %zu, data size %zu", total_size, args.src_data_size);
GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION,
"[Allocate][DSTMemory]Failed, memory for dst buf %zu, data size %zu",
total_size, args.src_data_size);
REPORT_CALL_ERROR("E19999", "Failed to allocate memory for dst buf %zu, data size %zu",
total_size, args.src_data_size);
return ACL_ERROR_GE_MEMORY_ALLOCATION;
}

@ -49,11 +49,15 @@ Status CheckArgsForC1hwncoc0ToHwcn(const TransArgs &args) {
return ACL_ERROR_GE_DATATYPE_INVALID;
}
if (!CheckShapeValid(src_shape, kC1hwncoc0DimsNum)) {
GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "Failed to check src shape %s", ShapeToString(src_shape).c_str());
GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "[Check][SrcShape]Failed, src shape %s",
ShapeToString(src_shape).c_str());
REPORT_CALL_ERROR("E19999", "Failed to check src shape %s", ShapeToString(src_shape).c_str());
return ACL_ERROR_GE_SHAPE_INVALID;
}
if (!CheckShapeValid(dst_shape, kHwcnDimsNum)) {
GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "Failed to check dst shape %s.", ShapeToString(dst_shape).c_str());
GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "[Check][DSTShape]Failed, dst shape %s.",
ShapeToString(dst_shape).c_str());
REPORT_CALL_ERROR("E19999", "Failed to check dst shape %s", ShapeToString(dst_shape).c_str());
return ACL_ERROR_GE_SHAPE_INVALID;
}
auto cube_size = GetCubeSizeByDataType(args.src_data_type);
@ -73,9 +77,17 @@ Status CheckArgsForC1hwncoc0ToHwcn(const TransArgs &args) {
Status GetDstDataAfterTrans(const TransArgs &args, TransResult &result, int size, int64_t total_size) {
std::shared_ptr<uint8_t> dst(new (std::nothrow) uint8_t[total_size], std::default_delete<uint8_t[]>());
if (dst == nullptr) {
GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, "Failed to trans format from %s to %s, can not alloc the memory for dst buf %ld, shape %s",
GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION,
"[Allocate][DSTMemory]Failed to allcoate memory for dst buf %ld, "
"shape %s when trans format from %s to %s",
total_size, ShapeToString(args.dst_shape).c_str(),
TypeUtils::FormatToSerialString(args.src_format).c_str(),
TypeUtils::FormatToSerialString(args.dst_format).c_str(), total_size, ShapeToString(args.dst_shape).c_str());
TypeUtils::FormatToSerialString(args.dst_format).c_str());
REPORT_CALL_ERROR("E19999", "Failed to allcoate memory for dst buf %ld, "
"shape %s when trans format from %s to %s",
total_size, ShapeToString(args.dst_shape).c_str(),
TypeUtils::FormatToSerialString(args.src_format).c_str(),
TypeUtils::FormatToSerialString(args.dst_format).c_str());
return ACL_ERROR_GE_MEMORY_ALLOCATION;
}
@ -115,10 +127,16 @@ Status GetDstDataAfterTrans(const TransArgs &args, TransResult &result, int size
static_cast<size_t>(size));
if (ret != EOK) {
GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED,
"Failed to copy data from C1HWNCoC0[%ld, %ld, %ld, %ld, %ld, %ld] offset %ld to "
"[Operate][Memory]Failed to copy data from "
"C1HWNCoC0[%ld, %ld, %ld, %ld, %ld, %ld] offset %ld to "
"HWCN[%ld, %ld, %ld, %ld] offset %ld, err-code %d",
c1_idx, h_idx, w_idx, n_idx, co_idx, c0_idx, src_offset, h_idx, w_idx, c_idx, n_idx, dst_offset,
ret);
c1_idx, h_idx, w_idx, n_idx, co_idx, c0_idx, src_offset,
h_idx, w_idx, c_idx, n_idx, dst_offset, ret);
REPORT_CALL_ERROR("E19999", "Failed to copy data from "
"C1HWNCoC0[%ld, %ld, %ld, %ld, %ld, %ld] offset %ld to "
"HWCN[%ld, %ld, %ld, %ld] offset %ld, err-code %d",
c1_idx, h_idx, w_idx, n_idx, co_idx, c0_idx, src_offset,
h_idx, w_idx, c_idx, n_idx, dst_offset, ret);
return ACL_ERROR_GE_MEMORY_OPERATE_FAILED;
}
}
@ -144,8 +162,13 @@ Status FormatTransferC1hwncoc0Hwcn::TransFormat(const TransArgs &args, TransResu
result.length = static_cast<size_t>(total_size);
return SUCCESS;
}
GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "Get %ld total size from dst shape %s, src shape %s.", total_size,
ShapeToString(args.dst_shape).c_str(), ShapeToString(args.src_shape).c_str());
GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "[Get][Shape]Failed, total size %ld from dst shape %s, "
"src shape %s.",
total_size, ShapeToString(args.dst_shape).c_str(),
ShapeToString(args.src_shape).c_str());
REPORT_CALL_ERROR("E19999", "Get shape faield, total size %ld from dst shape %s, src shape %s.",
total_size, ShapeToString(args.dst_shape).c_str(),
ShapeToString(args.src_shape).c_str());
return ACL_ERROR_GE_SHAPE_INVALID;
}
GELOGD("Begin to trans format from C1HWNCoC0 to HWCN, src shape %s, data type %s, dst shape %s, memory size %ld.",
@ -153,9 +176,16 @@ Status FormatTransferC1hwncoc0Hwcn::TransFormat(const TransArgs &args, TransResu
ShapeToString(args.dst_shape).c_str(), total_size);
ret = GetDstDataAfterTrans(args, result, size, total_size);
if (ret != SUCCESS) {
GELOGE(ret, "Failed to get data after trans, src shape %s, data type %s, dst shape %s, memory size %ld",
ShapeToString(args.src_shape).c_str(), TypeUtils::DataTypeToSerialString(args.src_data_type).c_str(),
ShapeToString(args.dst_shape).c_str(), total_size);
GELOGE(ret, "[Get][Data]Failed when after trans, src shape %s, data type %s, dst shape %s, "
"memory size %ld, error_code %u",
ShapeToString(args.src_shape).c_str(),
TypeUtils::DataTypeToSerialString(args.src_data_type).c_str(),
ShapeToString(args.dst_shape).c_str(), total_size, ret);
REPORT_CALL_ERROR("E19999", "Failed to get data after trans, src shape %s, data type %s, "
"dst shape %s, memory size %ld, error_code %u",
ShapeToString(args.src_shape).c_str(),
TypeUtils::DataTypeToSerialString(args.src_data_type).c_str(),
ShapeToString(args.dst_shape).c_str(), total_size, ret);
return ret;
}
return SUCCESS;

@ -94,9 +94,14 @@ Status TransFormatDhwckToFz3D(const TransArgs &args, TransResult &result) {
std::shared_ptr<uint8_t> dst(new (std::nothrow) uint8_t[dst_size], std::default_delete<uint8_t[]>());
if (dst == nullptr) {
GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, "Failed to trans format from %s to %s, can not alloc the memory for dst buf %ld",
TypeUtils::FormatToSerialString(args.src_format).c_str(),
TypeUtils::FormatToSerialString(args.dst_format).c_str(), dst_size);
GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, "[Allocate][DSTMemory]Failed to allcoate memory "
"for dst buf %ld when trans format from %s to %s",
dst_size, TypeUtils::FormatToSerialString(args.src_format).c_str(),
TypeUtils::FormatToSerialString(args.dst_format).c_str());
REPORT_CALL_ERROR("E19999", "Failed to allcoate memory for dst buf %ld "
"when trans format from %s to %s",
dst_size, TypeUtils::FormatToSerialString(args.src_format).c_str(),
TypeUtils::FormatToSerialString(args.dst_format).c_str());
return ACL_ERROR_GE_MEMORY_ALLOCATION;
}
@ -122,8 +127,10 @@ Status TransFormatDhwckToFz3D(const TransArgs &args, TransResult &result) {
args.data + src_idx * data_size, static_cast<size_t>(data_size));
}
if (ret != EOK) {
GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, "Failed to operate the dst memory at offset %ld, error-code %d, pad mode %d",
dst_offset, ret, pad_zero);
GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, "[Operate][DSTMemory]Failed at "
"offset %ld, error-code %d, pad mode %d", dst_offset, ret, pad_zero);
REPORT_CALL_ERROR("E19999", "Failed to operate dst memory at offset %ld, "
"error-code %d, pad mode %d", dst_offset, ret, pad_zero);
return ACL_ERROR_GE_MEMORY_OPERATE_FAILED;
}
}

@ -95,9 +95,14 @@ Status TransFormatDhwncToFz3DTranspose(const TransArgs &args, TransResult &resul
std::shared_ptr<uint8_t> dst(new (std::nothrow) uint8_t[dst_size], std::default_delete<uint8_t[]>());
if (dst == nullptr) {
GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, "Failed to trans format from %s to %s, can not alloc the memory for dst buf %ld",
TypeUtils::FormatToSerialString(args.src_format).c_str(),
TypeUtils::FormatToSerialString(args.dst_format).c_str(), dst_size);
GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, "[Allocate][DSTMemory]Failed to allcoate memory "
"for dst buf %ld when trans format from %s to %s",
dst_size, TypeUtils::FormatToSerialString(args.src_format).c_str(),
TypeUtils::FormatToSerialString(args.dst_format).c_str());
REPORT_CALL_ERROR("E19999", "Failed to allcoate memory for dst buf %ld "
"when trans format from %s to %s",
dst_size, TypeUtils::FormatToSerialString(args.src_format).c_str(),
TypeUtils::FormatToSerialString(args.dst_format).c_str());
return ACL_ERROR_GE_MEMORY_ALLOCATION;
}
@ -123,8 +128,10 @@ Status TransFormatDhwncToFz3DTranspose(const TransArgs &args, TransResult &resul
args.data + src_idx * data_size, static_cast<size_t>(data_size));
}
if (ret != EOK) {
GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, "Failed to operate the dst memory at offset %ld, error-code %d, pad mode %d",
dst_offset, ret, pad_zero);
GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, "[Operate][DSTMemory]Failed at "
"offset %ld, error-code %d, pad mode %d", dst_offset, ret, pad_zero);
REPORT_CALL_ERROR("E19999", "Failed to operate dst memory at offset %ld, "
"error-code %d, pad mode %d", dst_offset, ret, pad_zero);
return ACL_ERROR_GE_MEMORY_OPERATE_FAILED;
}
}

@ -41,16 +41,26 @@ Status CheckArgsForFracZToHwcn(const TransArgs &args) {
return ACL_ERROR_GE_FORMAT_INVALID;
}
if (!CheckDataTypeSupported(args.src_data_type)) {
GELOGE(ACL_ERROR_GE_DATATYPE_INVALID, "Failed to trans shape from FORMAT_FRACTAL_Z to HWCN, invalid data type %s",
GELOGE(ACL_ERROR_GE_DATATYPE_INVALID, "[Check][DataType]Failed, "
"shape from FORMAT_FRACTAL_Z to HWCN, invalid data type %s",
TypeUtils::DataTypeToSerialString(args.src_data_type).c_str());
REPORT_INNER_ERROR("E19999", "Failed to trans shape from FORMAT_FRACTAL_Z to HWCN, "
"invalid data type %s",
TypeUtils::DataTypeToSerialString(args.src_data_type).c_str());
return ACL_ERROR_GE_DATATYPE_INVALID;
}
if (!CheckShapeValid(src_shape, kFracZDimsNum)) {
GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "Failed to check src shape %s", ShapeToString(src_shape).c_str());
GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "[Check][Shape]Value is invalid, src shape %s",
ShapeToString(src_shape).c_str());
REPORT_CALL_ERROR("E19999", "Src shape %s check invalid",
ShapeToString(src_shape).c_str());
return ACL_ERROR_GE_SHAPE_INVALID;
}
if (!CheckShapeValid(dst_shape, kHwcnDimsNum)) {
GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "Failed to check dst shape %s", ShapeToString(dst_shape).c_str());
GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "[Check][Shape]Value is invalid, dst shape %s",
ShapeToString(dst_shape).c_str());
REPORT_CALL_ERROR("E19999", "Dst shape %s check invalid",
ShapeToString(dst_shape).c_str());
return ACL_ERROR_GE_SHAPE_INVALID;
}
int64_t c0 = GetCubeSizeByDataType(args.src_data_type);
@ -66,7 +76,7 @@ Status CheckArgsForFracZToHwcn(const TransArgs &args) {
FmtToStr(ShapeToString(dst_shape));
GE_ERRORLOG_AND_ERRORMSG(ACL_ERROR_GE_SHAPE_INVALID, error.c_str());
return ACL_ERROR_GE_SHAPE_INVALID;
}
}
return SUCCESS;
}
@ -74,9 +84,17 @@ Status CheckArgsForFracZToHwcn(const TransArgs &args) {
Status GetDstDataAfterTrans(const TransArgs &args, TransResult &result, const int size, const int64_t total_size) {
std::shared_ptr<uint8_t> dst(new (std::nothrow) uint8_t[total_size], std::default_delete<uint8_t[]>());
if (dst == nullptr) {
GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, "Failed to trans format from %s to %s, can not alloc the memory for dst buf %ld, shape %s",
GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION,
"[Allocate][DSTMemory]Failed, memory for dst buf %ld, shape %s "
"when trans format from %s to %s",
total_size, ShapeToString(args.dst_shape).c_str(),
TypeUtils::FormatToSerialString(args.src_format).c_str(),
TypeUtils::FormatToSerialString(args.dst_format).c_str(), total_size, ShapeToString(args.dst_shape).c_str());
TypeUtils::FormatToSerialString(args.dst_format).c_str());
REPORT_CALL_ERROR("E19999", "Failed to alloc the memory for dst buf %ld, shape %s "
"when trans format from %s to %s",
total_size, ShapeToString(args.dst_shape).c_str(),
TypeUtils::FormatToSerialString(args.src_format).c_str(),
TypeUtils::FormatToSerialString(args.dst_format).c_str());
return ACL_ERROR_GE_MEMORY_ALLOCATION;
}
@ -114,9 +132,12 @@ Status GetDstDataAfterTrans(const TransArgs &args, TransResult &result, const in
static_cast<size_t>(size));
if (ret != EOK) {
GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED,
"Failed to copy data from FracZ offset %ld to HWCN[%ld, %ld, %ld, %ld] "
"offset %ld, err-code %d",
"[Operate][Memory]Failed to copy data from FracZ offset %ld to "
"HWCN[%ld, %ld, %ld, %ld] offset %ld, err-code %d",
src_offset, h_idx, w_idx, c_idx, n_idx, dst_offset, ret);
REPORT_CALL_ERROR("E19999", "Failed to copy data from FracZ offset %ld to "
"HWCN[%ld, %ld, %ld, %ld], offset %ld, err-code %d",
src_offset, h_idx, w_idx, c_idx, n_idx, dst_offset, ret);
return ACL_ERROR_GE_MEMORY_OPERATE_FAILED;
}
}
@ -142,9 +163,12 @@ Status FormatTransferFracZHwcn::TransFormat(const TransArgs &args, TransResult &
result.length = static_cast<size_t>(total_size);
return SUCCESS;
}
GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "Get %ld total size from dst shape %s, src shape %s", total_size,
ShapeToString(args.dst_shape).c_str(), ShapeToString(args.src_shape).c_str());
GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "[Get][ShapeSize]Failed, "
"total size %ld from dst shape %s, src shape %s", total_size,
ShapeToString(args.dst_shape).c_str(), ShapeToString(args.src_shape).c_str());
REPORT_CALL_ERROR("E19999", "Failed to get total size %ld from "
"dst shape %s, src shape %s", total_size,
ShapeToString(args.dst_shape).c_str(), ShapeToString(args.src_shape).c_str());
return ACL_ERROR_GE_SHAPE_INVALID;
}
GELOGD("Begin to trans format from FracZ to HWCN, src shape %s, data type %s, dst shape %s, memory size %ld",
@ -152,9 +176,16 @@ Status FormatTransferFracZHwcn::TransFormat(const TransArgs &args, TransResult &
ShapeToString(args.dst_shape).c_str(), total_size);
ret = GetDstDataAfterTrans(args, result, size, total_size);
if (ret != SUCCESS) {
GELOGE(ret, "Failed to get data after trans, src shape %s, data type %s, dst shape %s, memory size %ld",
ShapeToString(args.src_shape).c_str(), TypeUtils::DataTypeToSerialString(args.src_data_type).c_str(),
ShapeToString(args.dst_shape).c_str(), total_size);
GELOGE(ret, "[Get][Data]Failed after trans, src shape %s, "
"data type %s, dst shape %s, memory size %ld, error_code %u",
ShapeToString(args.src_shape).c_str(),
TypeUtils::DataTypeToSerialString(args.src_data_type).c_str(),
ShapeToString(args.dst_shape).c_str(), total_size, ret);
REPORT_CALL_ERROR("E19999", "Failed to get data after trans, src shape %s, "
"data type %s, dst shape %s, memory size %ld, error_code %u",
ShapeToString(args.src_shape).c_str(),
TypeUtils::DataTypeToSerialString(args.src_data_type).c_str(),
ShapeToString(args.dst_shape).c_str(), total_size, ret);
return ret;
}
return SUCCESS;

@ -37,20 +37,30 @@ Status CheckArgsForFracZToNchw(const TransArgs &args) {
std::string error = "Dose not support trans format from " +
FmtToStr(TypeUtils::FormatToSerialString(args.src_format)) + " to " +
FmtToStr(TypeUtils::FormatToSerialString(args.dst_format));
GE_ERRORLOG_AND_ERRORMSG(UNSUPPORTED, error.c_str());
GE_ERRORLOG_AND_ERRORMSG(ACL_ERROR_GE_FORMAT_INVALID, error.c_str());
return ACL_ERROR_GE_FORMAT_INVALID;
}
if (!CheckDataTypeSupported(args.src_data_type)) {
GELOGE(ACL_ERROR_GE_DATATYPE_INVALID, "Failed to trans shape from FORMAT_FRACTAL_Z to NCHW, invalid data type %s",
GELOGE(ACL_ERROR_GE_DATATYPE_INVALID, "[Check][DataType]Failed, "
"shape from FORMAT_FRACTAL_Z to NCHW, invalid data type %s",
TypeUtils::DataTypeToSerialString(args.src_data_type).c_str());
REPORT_INNER_ERROR("E19999", "Failed to trans shape from FORMAT_FRACTAL_Z to NCHW, "
"invalid data type %s",
TypeUtils::DataTypeToSerialString(args.src_data_type).c_str());
return ACL_ERROR_GE_DATATYPE_INVALID;
}
if (!CheckShapeValid(src_shape, kFracZDimsNum)) {
GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "Failed to check src shape %s", ShapeToString(src_shape).c_str());
GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "[Check][Shape]Value is invalid, src shape %s",
ShapeToString(src_shape).c_str());
REPORT_CALL_ERROR("E19999", "Src shape %s check invalid",
ShapeToString(src_shape).c_str());
return ACL_ERROR_GE_SHAPE_INVALID;
}
if (!CheckShapeValid(dst_shape, kNchwDimsNum)) {
GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "Failed to check dst shape %s", ShapeToString(dst_shape).c_str());
GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "[Check][Shape]Value is invalid, dst shape %s",
ShapeToString(dst_shape).c_str());
REPORT_CALL_ERROR("E19999", "Dst shape %s check invalid",
ShapeToString(dst_shape).c_str());
return ACL_ERROR_GE_SHAPE_INVALID;
}
int64_t c0 = GetCubeSizeByDataType(args.src_data_type);
@ -59,10 +69,15 @@ Status CheckArgsForFracZToNchw(const TransArgs &args) {
}
int64_t c1 = Ceil(dst_shape.at(kNchwC), c0);
int64_t n0 = Ceil(dst_shape.at(kNchwN), static_cast<int64_t>(kNiSize));
if (src_shape.at(kFracZHWC1) != dst_shape.at(kNchwH) * dst_shape.at(kNchwW) * c1 || src_shape.at(kFracZC0) != c0 ||
src_shape.at(kFracZNi) != kNiSize || src_shape.at(kFracZN0) != n0) {
GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "Failed to check relationship between src and dst shape, src shape %s, dst shape %s",
if (src_shape.at(kFracZHWC1) != dst_shape.at(kNchwH) * dst_shape.at(kNchwW) * c1 ||
src_shape.at(kFracZC0) != c0 || src_shape.at(kFracZNi) != kNiSize || src_shape.at(kFracZN0) != n0) {
GELOGE(ACL_ERROR_GE_SHAPE_INVALID,
"[Check][Shape]Failed to check relationship between src and dst shape, "
"src shape %s, dst shape %s",
ShapeToString(src_shape).c_str(), ShapeToString(dst_shape).c_str());
REPORT_INNER_ERROR("E19999", "Failed to check relationship between src and dst shape, "
"src shape %s, dst shape %s",
ShapeToString(src_shape).c_str(), ShapeToString(dst_shape).c_str());
return ACL_ERROR_GE_SHAPE_INVALID;
}
@ -72,9 +87,17 @@ Status CheckArgsForFracZToNchw(const TransArgs &args) {
Status GetDstDataAfterTrans(const TransArgs &args, TransResult &result, const int size, const int64_t total_size) {
std::shared_ptr<uint8_t> dst(new (std::nothrow) uint8_t[total_size], std::default_delete<uint8_t[]>());
if (dst == nullptr) {
GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, "Failed to trans format from %s to %s, can not alloc the memory for dst buf %ld, shape %s",
GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION,
"[Allocate][DSTMemory]Failed, memory for dst buf %ld, shape %s "
"when trans format from %s to %s",
total_size, ShapeToString(args.dst_shape).c_str(),
TypeUtils::FormatToSerialString(args.src_format).c_str(),
TypeUtils::FormatToSerialString(args.dst_format).c_str(), total_size, ShapeToString(args.dst_shape).c_str());
TypeUtils::FormatToSerialString(args.dst_format).c_str());
REPORT_CALL_ERROR("E19999", "Failed to alloc the memory for dst buf %ld, shape %s "
"when trans format from %s to %s",
total_size, ShapeToString(args.dst_shape).c_str(),
TypeUtils::FormatToSerialString(args.src_format).c_str(),
TypeUtils::FormatToSerialString(args.dst_format).c_str());
return ACL_ERROR_GE_MEMORY_ALLOCATION;
}
@ -112,9 +135,12 @@ Status GetDstDataAfterTrans(const TransArgs &args, TransResult &result, const in
static_cast<size_t>(size));
if (ret != EOK) {
GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED,
"Failed to copy data from FracZ offset %ld to NCHW[%ld, %ld, %ld, %ld] offset %ld, "
"err-code %d",
"[Operate][Memory]Failed to copy data from FracZ offset %ld to "
"NCHW[%ld, %ld, %ld, %ld] offset %ld, err-code %d",
src_offset, n_idx, c_idx, h_idx, w_idx, dst_offset, ret);
REPORT_CALL_ERROR("E19999","Failed to copy data from FracZ offset %ld to "
"NCHW[%ld, %ld, %ld, %ld] offset %ld, err-code %d",
src_offset, n_idx, c_idx, h_idx, w_idx, dst_offset, ret );
return ACL_ERROR_GE_MEMORY_OPERATE_FAILED;
}
}
@ -141,8 +167,12 @@ Status FormatTransferFracZNchw::TransFormat(const TransArgs &args, TransResult &
return SUCCESS;
}
GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "Get %ld total size from dst shape %s, src shape %s", total_size,
ShapeToString(args.dst_shape).c_str(), ShapeToString(args.src_shape).c_str());
GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "[Get][ShapeSize]Failed, total size %ld from dst shape %s, "
"src shape %s", total_size,
ShapeToString(args.dst_shape).c_str(), ShapeToString(args.src_shape).c_str());
REPORT_CALL_ERROR("E19999", "Failed to get total size %ld from dst shape %s, src shape %s",
total_size,
ShapeToString(args.dst_shape).c_str(), ShapeToString(args.src_shape).c_str());
return ACL_ERROR_GE_SHAPE_INVALID;
}
GELOGD("Begin to trans format from FracZ to NCHW, src shape %s, data type %s, dst shape %s, memory size %ld",
@ -151,9 +181,16 @@ Status FormatTransferFracZNchw::TransFormat(const TransArgs &args, TransResult &
ret = GetDstDataAfterTrans(args, result, size, total_size);
if (ret != SUCCESS) {
GELOGE(ret, "Failed to get data after trans, src shape %s, data type %s, dst shape %s, memory size %ld",
ShapeToString(args.src_shape).c_str(), TypeUtils::DataTypeToSerialString(args.src_data_type).c_str(),
GELOGE(ret, "[Get][Data]Failed, after trans, src shape %s, data type %s, "
"dst shape %s, memory size %ld",
ShapeToString(args.src_shape).c_str(),
TypeUtils::DataTypeToSerialString(args.src_data_type).c_str(),
ShapeToString(args.dst_shape).c_str(), total_size);
REPORT_CALL_ERROR("E19999", "Failed to get data after trans, src shape %s, "
"data type %s, dst shape %s, memory size %ld",
ShapeToString(args.src_shape).c_str(),
TypeUtils::DataTypeToSerialString(args.src_data_type).c_str(),
ShapeToString(args.dst_shape).c_str(), total_size);
return ret;
}
return SUCCESS;

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

Loading…
Cancel
Save