Compare commits

...
472 Commits
Author SHA1 Message Date
weili10 e0d724c3c6 update cann version.
Signed-off-by: weili10 <liwei386@huawei.com>
2023-01-30 13:19:59 +00:00
weili10 0ea0d95f7b update README.zh.md.
Signed-off-by: weili10 <liwei386@huawei.com>
2023-01-19 08:02:48 +00:00
i-robot d4ffa0a823 !2129 Unified version number format.
Merge pull request !2129 from 闫鹏全/v1.5.0
2023-01-17 06:18:50 +00:00
闫鹏全 a47d202e3e Unified version number format. 2023-01-14 18:49:24 +08:00
AtlasAccount 6db8b2d88d 同步1.5.0 bb20140941c0d6e6dcbdba9a0510bbbe5e20b791
!3620 Add exclude aicore engine of viewcopy and index.
    Merge pull request !3620 from 於欣洁/master
2022-12-26 23:00:43 +08:00
AtlasAccount 03a193fd0d 同步1.5.0 4ece93ce4b22e422f5e7bb9a71ae3df4b607a0d9
!3619 [Fix] revert Pull Request !3618 : [Feature] Modify the size of AvgPoolV2Grad to int32
    Merge pull request !3619 from weili10/revert-merge-3618-master
2022-12-16 16:31:09 +08:00
AtlasAccount 513f46decc 同步1.5.0 b152e9648995ac6de929cbac3e20dbcd1435ac66
!3618 [Feature] Modify the size of AvgPoolV2Grad to int32
    Merge pull request !3618 from 戢芳/avg_pool2d_grad1.5
2022-12-15 12:00:45 +08:00
weili10 2b48121bbf update OWNERS.
Signed-off-by: weili10 <liwei386@huawei.com>
2022-12-13 09:28:10 +00:00
weili10 e3e229839f update OWNERS.
Signed-off-by: weili10 <liwei386@huawei.com>
2022-12-09 02:14:36 +00:00
weili10 88719bd40a update OWNERS.
Signed-off-by: weili10 <liwei386@huawei.com>
2022-11-30 06:40:47 +00:00
i-robot 3fc20b8b30 !1600 新API清单更新
Merge pull request !1600 from 彭子荣/v1.5.0
2022-11-17 12:08:48 +00:00
pengzirong e751f65710 api清单更新 2022-11-16 16:29:52 +08:00
weili10 86a79738b3 update OWNERS.
Signed-off-by: weili10 <liwei386@huawei.com>
2022-11-14 09:23:47 +00:00
weili10 5fcd2ba271 update OWNERS.
Signed-off-by: weili10 <liwei386@huawei.com>
2022-11-14 08:59:57 +00:00
AtlasAccount cb18de2fef 同步1.5.0 f98435a698ede814e377438beb38045da3aeec04
!3614 【BugFix】补充nllloss_2d的weight赋0的判断条件
    Merge pull request !3614 from 戢芳/nllloss_debug1.5
2022-11-07 12:00:50 +08:00
AtlasAccount b292bc05c9 同步1.5.0 ffe03b307b8cbd4d2e60b19588cf5f250d5e0b2a
!3613 [refactor]npu_dtype_cast replace to function.
    Merge pull request !3613 from darin123/master
--
    !3608 [refactor]npu_dtype_cast replace to function.
    Merge pull request !3608 from darin123/master
2022-11-01 23:00:43 +08:00
AtlasAccount 95cf34f163 同步1.5.0 ee09df85b727ced2406ae91ab6045b1438a8a098
!3610 【Refactor】taskqueue重构:优化usleep与结构体析构
    Merge pull request !3610 from yangxiaorun/master
2022-10-27 23:00:56 +08:00
weili10 eb4a799674 update README.zh.md.
Signed-off-by: weili10 <liwei386@huawei.com>
2022-10-22 04:05:54 +00:00
AtlasAccount d1305fd848 同步1.5.0 eee06586452597ab040198a7bb79b7bcc1874c2d
Merge: 00ae3c23f 03716faf1
    !3605 [fix] scalar scene and rank=1 scene do not support nz
    Merge pull request !3605 from 王强/master
Merge: 4b3479311 f01d27c64
    !3606 index和viewcopy修改入参编译选项
    Merge pull request !3606 from 王晓/index_viewcopy_independent
    index and viewcopy fix
    [fix] scalar scene and rank=1 scene do not support nz
2022-10-20 19:31:13 +08:00
weili10 c5f7e64aa5 update README.zh.md.
Signed-off-by: weili10 <liwei386@huawei.com>
2022-10-20 01:46:06 +00:00
AtlasAccount abc10caebd 同步1.5.0 4b347931184da0fbc47dfacb77e6a9425a433727
!3598 index indexput v3
    Merge pull request !3598 from 王晓/index_v3_new
2022-10-15 00:11:48 +08:00
AtlasAccount fd7a52be39 同步1.5.0 d8d3a108ba68f16924a3402ede78741168feb87b
!3601 更改版本号6->7
    Merge pull request !3601 from 王夏夏/master
2022-10-12 23:00:39 +08:00
AtlasAccount 847cbbbb1a 同步1.5.0 9b3fd49c7369bd86888e11e14d6885be70a58cd9
!3591 【bernoulli适配】 bernoulli IR修改,适配层对齐 & cast 问题处理
    Merge pull request !3591 from 沈鹏程/108_bernoulli_IR
--
    !3585 GridSampler2D入参修改符合 算子IR
    Merge pull request !3585 from aikede/1.5_bug_grid
--
    !3590 修复index中转连续走aicpu导致性能下降问题
    Merge pull request !3590 from 王晓/index_mae
--
    !3587 修复index_select反向index_add不支持index为0维问题
    Merge pull request !3587 from 王晓/index_add
--
    !3586 【BugFix】修复index_put check indices报错
    Merge pull request !3586 from hxf12345677/inp
2022-10-08 23:00:55 +08:00
AtlasAccount 681f5543e4 同步1.5.0 012b968a50c9b3557045dc9a0b09da03c6ea6424
!3583 【BugFix】修复maksed_select的输出shape
    Merge pull request !3583 from 戢芳/maksed_select1.5
--
    !3582 【BugFix】修复avgpool2d 算子输出shape错误问题, 对不支持三维输入做增维操作
    Merge pull request !3582 from 戢芳/avgpool2d
--
    !3584 【BCM】indexput 适配
    Merge pull request !3584 from hxf12345677/indexput
2022-09-29 23:00:43 +08:00
AtlasAccount 1a380aefee 同步1.5.0 42069cd2f18462b54e5822b0d6b439fe35b462d1
!3581 【BugFix】_unique2算子fp16场景存在精度问题,转fp32规避
    Merge pull request !3581 from 戢芳/unique1.5
--
    !3580 masked_select支持非bool mask
    Merge pull request !3580 from 王晓/maskedselect
2022-09-27 23:00:44 +08:00
AtlasAccount d52f542aa7 同步1.5.0 88e743638d41a0f36453d07936e8d5b647d60b39
!3573 【BCM】upsample_nearest1d调用Resize
    Merge pull request !3573 from 戢芳/resize1.5
--
    !3570 【算子适配】 MaskedSelect改为第三类算子适配
    Merge pull request !3570 from hxf12345677/maskselect
2022-09-20 23:00:43 +08:00
AtlasAccount e434ebc805 同步1.5.0 240174e62da5c45598faea4e89da5fbef194a904
!3566 【算子适配】 unique2改为第三类算子适配
    Merge pull request !3566 from hxf12345677/un
--
    !3564 Modify randperm adapt to StatelessRandperm
    Merge pull request !3564 from 王晓/1.5randperm_n_input
2022-09-19 23:04:53 +08:00
AtlasAccount 41bfe9c544 同步1.5.0 6a60895589b231dd9384f70f5cba13e8dc122339
!3563 index算子IR变更(商分)
    Merge pull request !3563 from 王晓/1.5rc3_index
2022-09-17 23:01:05 +08:00
AtlasAccount df05b7a031 同步1.5.0 5a0f37cc0c586468171426572ac3b9e5c5953c90
!3561 【bugfix】修复onehot算子,入参为scalar时,性能下降问题
    Merge pull request !3561 from hxf12345677/oneh
2022-09-16 23:00:38 +08:00
AtlasAccount c39e008d3b 同步1.5.0 810a702dc3adf05f76e18879fb1ffd6f1cbfb048
!3559 index算子IR变更
    Merge pull request !3559 from 王晓/1.5index_new
2022-09-15 23:00:38 +08:00
AtlasAccount 3d3750411f 同步1.5.0 9d0053314e398e674a0be7a5ee85efb9ae584e3d
!3543 【算子适配】nms_rotated_npu调用NPU算子IR更新
    Merge pull request !3543 from 赖长铃/rotatednms
2022-09-14 23:00:43 +08:00
AtlasAccount 11e4eb7eb8 同步1.5.0 c3e94122d4a11c7f269e7d0a345fcba578a99736
!3554 【BCM整改】multinomial增加seed、offset
    Merge pull request !3554 from 戢芳/multinomial
2022-09-13 23:00:42 +08:00
AtlasAccount defe0587f6 同步1.5.0 0513d0db60b14371538432e8162b44be92a94fbc
!3557 cummin算子IR变更,适配同步修改
    Merge pull request !3557 from 王晓/cummin_axis
2022-09-06 23:00:42 +08:00
AtlasAccount dffecfba93 同步1.5.0 de2ef9dae9391c65c614e2d9a6db5812b53704d2
!3553 index算子调用添加输入IR名称
    Merge pull request !3553 from 赖长铃/index
2022-09-03 12:00:40 +08:00
AtlasAccount d57152e0cd 同步1.5.0 e064c1da43eb595f7e3d399f4c292bf246ef6a07
!3548 随机数算子uniform_, random_, normal更换算子,固定seed
    Merge pull request !3548 from 王晓/stateless_ops
2022-09-01 12:00:38 +08:00
AtlasAccount 04c8dfea99 同步1.5.0 9fd6202960a4d44aeded5f13d3a779c940214709
!3550 【bugfix】 修改index 算子mask入参为const节点
    Merge pull request !3550 from hxf12345677/inde
--
    !3551 add: 新增npu_convolution_transpose_backward的反向函数绑定
    Merge pull request !3551 from 郭夏/master
2022-08-30 23:07:01 +08:00
i-robot db66d80806 !1181 网络模型移植与训练指南全文问题检查&多机多卡训练适配指南资料修改
Merge pull request !1181 from 彭子荣/v1.5.0
2022-08-29 12:42:32 +00:00
pengzirong 9ab75c8967 网络模型移植与训练指南全文问题检查&环境变量代码缺少空格 2022-08-26 10:27:19 +08:00
AtlasAccount c8085ae921 同步1.5.0 6f5fbe514fc753be519861b9a7365e651be96c92
!3546 回退 Pull Request !3508 : sum算子对int64型数据的支持
    Merge pull request !3546 from weili10/revert-merge-3508-master
2022-08-25 23:00:54 +08:00
AtlasAccount 2032d04858 同步1.5.0 653dafb269ce01c9a69fee887ada4259390cedc8
!3545 移除module.forward中未使用的increase_step
    Merge pull request !3545 from lj_new/master
2022-08-25 12:01:14 +08:00
AtlasAccount 255de550cc 同步1.5.0 f2176df2b7169e8d6207f0627414dbef54b75bd6
!3544 ptcopy切换为viewcopy
    Merge pull request !3544 from 王晓/viewcopy1.5
2022-08-24 23:00:42 +08:00
weili10 7a8ecbca90 update OWNERS.
Signed-off-by: weili10 <liwei386@huawei.com>
2022-08-18 11:53:17 +00:00
AtlasAccount 43f5a19a2f 同步1.5.0 f0cc489eb4751724ad1dbdefa32d924afe5fe661
!3538 【BugFix】同步embedding_renorm算子适配逻辑与1.8一致
    Merge pull request !3538 from 戢芳/embedding1.5
2022-08-11 23:00:35 +08:00
AtlasAccount 93a2fdc566 同步1.5.0 2bbc1d6af71acaf0a9b983fd6ef5bbda648813ba
!3539 【适配】bernoulli 适配    算子原型改动,适配层对齐修改
    Merge pull request !3539 from 沈鹏程/IR_by_bernoulli
2022-08-09 23:03:15 +08:00
i-robot 6d23724871 !1095 网络模型移植与训练指南修改
Merge pull request !1095 from 彭子荣/v1.5.0
2022-08-08 12:28:31 +00:00
pengzirong 32f82f58ef 更新跳转链接与分布式训练添加 2022-08-08 16:35:51 +08:00
AtlasAccount dfec8bbb20 同步1.5.0 a92bbcbb21ebb73ac4d19283eae79f24fc1b128a
!3537 【1.5】回退非host memory修改
    Merge pull request !3537 from 周和光/fix_storage_format
2022-08-04 12:04:24 +08:00
AtlasAccount 4fd08f5fc6 同步1.5.0 b17ba4b0bac8928b2684843afaf123ac3fb113e7
!3533 回退 Pull Request !3525 : sum算子对int64型数据的支持
    Merge pull request !3533 from weili10/revert-merge-3525-master
--
    !3532 【bernoulli】remove stream synchronization for model
    Merge pull request !3532 from 沈鹏程/modify_bernoulli
2022-07-29 23:01:37 +08:00
AtlasAccount e5e76d5ff0 同步1.5.0 f3228834e071b9ab9653d095546e2c8af48e0cf7
!3531 【1.5】修正host memory未设置storage Shape/Format问题
    Merge pull request !3531 from 周和光/fix_storage_format
--
    !3527 bernoulli 算子适配,算子新增优化随机数机制,提高兼容性
    Merge pull request !3527 from 沈鹏程/adapt_bernoulli
2022-07-28 23:00:37 +08:00
AtlasAccount 1ca343fff0 同步1.5.0 a9374eaab1592005e73feafddd74ee679b303113
!3528 【bugfix】修复one_hot算子走aicpu分支时报错场景
    Merge pull request !3528 from hxf12345677/one
2022-07-27 23:00:54 +08:00
i-robot 99172aa0ca !1088 Updated English docs.
Merge pull request !1088 from zwy/v1.5.0
2022-07-26 06:20:15 +00:00
AtlasAccount 2b58bddcb0 同步1.5.0 0d9083e346bb706963742f6cdfc845506f3422ad
!3525 sum算子对int64型数据的支持
    Merge pull request !3525 from aikede/b_sum_dtype
2022-07-26 12:01:12 +08:00
AtlasAccount 4f7caaaf7f 同步1.5.0 36b80ca87a878ac507db4bef09f19404d4b126d8
!3510 回退sort修改
    Merge pull request !3510 from 王夏夏/master
2022-07-25 23:00:42 +08:00
yanhuiling 02298ccc80 Updated English docs. 2022-07-25 17:26:26 +08:00
AtlasAccount f80b97dadc 同步1.5.0 8578cd9a5cd15907af28c87f2a097dae7f8a7366
!3517 支持rng_state
    Merge pull request !3517 from hanjun/master
2022-07-20 12:01:07 +08:00
AtlasAccount b31dfee2d7 同步1.5.0 7d9dd60df7b13268f8ec703cddf03598dd31e4d5
!3504 opcmd支持dtype传参
    Merge pull request !3504 from 王晓/dtype_attr
2022-07-18 23:00:37 +08:00
AtlasAccount 64c1e12c6a 同步1.5.0 3e6c6f59c99032f0dfe854079dc237cc8d9f9895
!3508 sum算子对int64型数据的支持
    Merge pull request !3508 from aikede/b_sum_dtype
2022-07-15 12:00:38 +08:00
weili10 732ae7c134 update maintenance status for 3.0.rc2 2022-07-15 03:30:31 +00:00
i-robot 333c907f8d !1048 多机多卡训练适配指南 英文资料更新
Merge pull request !1048 from 彭子荣/v1.5.0
2022-07-13 08:32:22 +00:00
pengzirong 2e7e39b507 update ip tothe smple ip
1
2022-07-12 15:30:50 +08:00
i-robot 57cc74e900 !1043 Update README and PyTorch Installation Guide based on Chinese revisions.
Merge pull request !1043 from zwy/v1.5.0
2022-07-11 13:30:52 +00:00
weili10 c3a5d05424 !1034 网络模型移植与训练指南修改
Merge pull request !1034 from 彭子荣/v1.5.0
2022-07-11 09:35:58 +00:00
zwy a18e48a834 Updated README and PyTorch Installation Guide based on Chinese revisions. 2022-07-11 16:42:26 +08:00
pengzirong 5930dbec25 网络模型移植与训练指南新增硬件支持说明 2022-07-11 14:48:31 +08:00
AtlasAccount a932e65f9e 同步1.5.0 d5b893e768dc36d410b90986c4534cf4f9a3bf63
!3507 [bugfix] right lock for task queue
    Merge pull request !3507 from 蒋荣强/master
2022-07-11 12:00:47 +08:00
i-robot 6e3dbfa3c7 !1028 V1.5.0资料更新
Merge pull request !1028 from 彭子荣/v1.5.0
2022-07-11 03:33:36 +00:00
pengzirong 889d2ae716 v1.5.0README与安装指南修改
1

1
2022-07-11 09:51:52 +08:00
AtlasAccount bdc0d2a819 同步1.5.0 ece606e4dc43d9a9e0d6986b524b077ef76174a2
!3505 bugfix:删除cmake中的rpath=True设置
    Merge pull request !3505 from 施博/master
2022-07-09 23:00:43 +08:00
AtlasAccount d5aca3c9d8 同步1.5.0 9cb0b5fffe4a53ce5a086488a0d3fff32b3f4379
!3500 sort算子走fp32 && 更新版本号post5->post6
    Merge pull request !3500 from 王夏夏/master
2022-07-07 23:00:40 +08:00
weili10 5b477928d5 !1012 README与安装指南差异修改
Merge pull request !1012 from 彭子荣/v1.5.0
2022-07-07 09:53:39 +00:00
pengzirong 6daeb34d1e 更新README与安装指南差异与问题
更新依赖下载

i
2022-07-07 16:55:05 +08:00
AtlasAccount 67b74b6919 同步1.5.0 6f0751810b75da99796af08cdf031057982e11e8
!3496 ASCEND_OPP_PATH 路径错误增加GE报错信息
    Merge pull request !3496 from 汪瑞哲/master
2022-07-04 12:00:48 +08:00
i-robot 8c019dc9f6 !988 torch1.5 环境变量说明调整
Merge pull request !988 from 李超/v1.5.0
2022-07-02 03:12:50 +00:00
李超 138ccbab13 update environment variables 2022-07-02 09:57:47 +08:00
AtlasAccount e8e34e1648 同步1.5.0 533ca3e0e3162f24ac8a6634b02e832a635ffcc5
!3497 回退 Pull Request !3486 : Conv2d适配模糊编译二进制
    Merge pull request !3497 from weili10/revert-merge-3486-master
2022-07-01 23:00:43 +08:00
i-robot c693353ef1 !981 API 支持度资料修改
Merge pull request !981 from 彭子荣/v1.5.0
2022-07-01 06:46:10 +00:00
pengzirong f9b8c654cf torch.cdist支持度修改 2022-07-01 09:40:45 +08:00
i-robot 350a490e87 !976 README更新
Merge pull request !976 from 彭子荣/v1.5.0
2022-06-30 08:23:26 +00:00
pengzirong e7d59cbfaf 多机多卡训练适配指南修改资料中IP为样例IP 2022-06-30 15:49:06 +08:00
pengzirong 32ca47c016 readme与安装指南合并,内容拷贝到安装指南 2022-06-30 15:42:22 +08:00
AtlasAccount 88bc2d63eb 同步1.5.0 206e8a36c89c7493c546e7840f544a853b7edc40
!3494 【bugfix】 修复cdist算子,属性p=inf,npu报错
    Merge pull request !3494 from hxf12345677/cdist
2022-06-30 12:00:41 +08:00
AtlasAccount 7c14ecce0d 同步1.5.0 0e58834e66ebecc031387b2ca0d71fa163eaa4e1
!3488 wrap AclopCompileAndExecuteV2
    Merge pull request !3488 from 王晓/unique_consecutive_wrap
--
    !3481 【bugfix】修复all算子输入为空Tensor,计算结果错误场景
    Merge pull request !3481 from hxf12345677/all
--
    !3482 【BugFix】修复floor_divide算子int32格式的精度问题(同步1.8)
    Merge pull request !3482 from 戢芳/divide1.5
2022-06-27 23:03:17 +08:00
AtlasAccount a05df6bdda 同步1.5.0 4caaee8d3fcaede8044157f462739d2997b33f39
!3480 BernoulliCust适配
    Merge pull request !3480 from 李思杰/bernoulli_cust
--
    !3486 Conv2d适配模糊编译二进制
    Merge pull request !3486 from 郭鹏/master
--
    !3478 unique_consecutive适配
    Merge pull request !3478 from 王晓/unique_consecutive
2022-06-25 23:00:34 +08:00
AtlasAccount b3a7f790c8 同步1.5.0 e71da1b59d7e685f8c2260a4dbb4f1eee12149fd
!3483 回退 Pull Request !3466 : randn算子适配,支持seed配置,以及对dtype类型的attr支持
    Merge pull request !3483 from weili10/revert-merge-3466-master
--
    !3477 all算子支持uint8入参
    Merge pull request !3477 from aikede/b_all
2022-06-23 23:00:42 +08:00
AtlasAccount 88e7cd0667 同步1.5.0 0b1ffcfd22b713fc3bdbbb1be8b4cc91cf1cff9c
!3473 fix bug of lazy print
    Merge pull request !3473 from wangyu/dev
2022-06-21 12:00:34 +08:00
AtlasAccount 38267666fe 同步1.5.0 61605a199df457a6bb82d1311f7b1d03681cbbc3
!3471 去除InputPair操作
    Merge pull request !3471 from hxf12345677/ho
2022-06-20 23:00:43 +08:00
AtlasAccount b387a3427d 同步1.5.0 a7cf1481f9b810ad1fcef773781df9e7d6a4d89b
!3465 ne支持int32输入
    Merge pull request !3465 from aikede/b_ne
2022-06-16 23:02:02 +08:00
AtlasAccount 3f4ffba595 同步1.5.0 1db3bc5742446fb80b5cde89057e00318cc11cef
!3462 删除requirements.txt文件中重复pyyaml
    Merge pull request !3462 from 王夏夏/master
--
    !3466 randn算子适配,支持seed配置,以及对dtype类型的attr支持
    Merge pull request !3466 from 王晓/randn_seed
--
    !3459 Fixed Split K BUG
    Merge pull request !3459 from 唐超/fixed_NZ_bug
2022-06-16 12:01:19 +08:00
i-robot 154bcfced6 !911 安装指南资料修改
Merge pull request !911 from 彭子荣/v1.5.0
2022-06-15 07:01:20 +00:00
AtlasAccount 12303a6da0 同步1.5.0 99252a026bee508d110da24ca95a5185afff6664
!3461 修复部分模型因为算子重复编译导致的asstride性能下降问题
    Merge pull request !3461 from 李超/dev-asstrided
2022-06-14 23:01:40 +08:00
pengzirong 7a20b65e2f 修改下载昇腾适配APEX的源码命令 2022-06-14 17:12:06 +08:00
i-robot d11cd94156 !897 处理器名称更新
Merge pull request !897 from 彭子荣/v1.5.0
2022-06-10 10:00:31 +00:00
pengzirong c45de03e71 ASCEND 710 -->ASCEND 310P 2022-06-10 16:48:42 +08:00
AtlasAccount c87f2cd51b 同步1.5.0 612acab3aa879a5479b280cf55ba66affbd61e96
!3456 【BugFix】thredshold算子去D
    Merge pull request !3456 from 戢芳/threshold1.5
2022-06-07 12:01:35 +08:00
AtlasAccount a6189a76e5 同步1.5.0 953a0f6b93c6bf0fc8f35545f493fb7e5de3f34d
!3455 【BugFix】lstm_cell_backward构造bias输出时,type与i一致
    Merge pull request !3455 from 戢芳/lstm_cell_fix
2022-06-02 23:00:47 +08:00
AtlasAccount 73c47b1e64 同步1.5.0 23f0a06a8b1571ddbfce2b334dc27dc68e3ee8ff
!3430 BernoulliCust算子适配
    Merge pull request !3430 from 龚政/Bernoulli
2022-06-01 23:04:31 +08:00
AtlasAccount 2d7d639562 同步1.5.0 09cc7f597fc187168c6c77ca235d56658c97d8d9
!3453 arange算子默认输出类型和cpu修改一致
    Merge pull request !3453 from aikede/b_arange
2022-06-01 12:08:14 +08:00
AtlasAccount ace64b8445 同步1.5.0 140c0f720af4fb23b979e3d435182295b655b534
!3452 为Mul算子tensor*scalar新增一个UT
    Merge pull request !3452 from 詹隽/add_test
2022-05-31 23:00:45 +08:00
AtlasAccount c06ce48b89 同步1.5.0 179c0ba3b26763b29fb3208b44aaa7ed749a1e52
!3445 【功能修复】适配层主动调用cpu的cast方法解决算子不支持不同dtype输入问题
    Merge pull request !3445 from 詹隽/scalar_bug
--
    !3447 【新接口】1.5动态shape新接口
    Merge pull request !3447 from 詹隽/dynamic_interface
--
    !3428 Only_MM_Split_k
    Merge pull request !3428 from 唐超/only_mm_split
2022-05-25 23:00:52 +08:00
i-robot 274b892c56 !829 1.5新增combine_grad说明
Merge pull request !829 from lj_new/v1.5.0
2022-05-25 03:04:23 +00:00
AtlasAccount 7e2c3d7979 同步1.5.0 63ee4d2144db51de342e2f477f482ef9ee2bd26f
!3431 [optimize] 非连续流程优化
    Merge pull request !3431 from 李超/git
--
    !3443 【BugFix】file rename
    Merge pull request !3443 from 戢芳/rename1.8
2022-05-24 23:00:50 +08:00
i-robot 4b396515d5 !818 README更新
Merge pull request !818 from 彭子荣/v1.5.0
2022-05-24 09:19:12 +00:00
AtlasAccount 2d8ece95b3 同步1.5.0 90382c1c71d343f9609471fd2055e9f551ada92b
!3439 【FixBug】修复lstm中lengths[0]不为T时的场景
    Merge pull request !3439 from 王晓/lstm_shape
--
    !3435 【1.5算子适配】lstm_cell、lstm_cell_backward
    Merge pull request !3435 from 戢芳/lstm_cell1.5
2022-05-23 23:04:59 +08:00
lj_new de3435090b 1.5新增combine_grad说明 2022-05-23 04:00:20 +00:00
lj_new 27cf56f730 1.5文档新增combine_ddp使用说明 2022-05-23 03:57:50 +00:00
AtlasAccount 4dc478adab 同步1.5.0 f45f80fb2d571e175dc7a9be2e9e3ced6d4ca11b
!3414 【bugfix】sub适配新增other的device判断、addmm和cat增加输入tensor类型检查
    Merge pull request !3414 from 郭夏/sub
--
    !3422 [Bugfix] Lt support LongTensor.
    Merge pull request !3422 from 尤安升/master
2022-05-19 15:26:49 +08:00
pengzirong e1f9bb08d1 更新配套参考表格 2022-05-19 11:45:42 +08:00
weili10 4b28c57993 update docs/zh/PyTorch安装指南/PyTorch安装指南.md. 2022-05-18 10:43:11 +00:00
weili10 6afb6c635b update README.zh.md. 2022-05-18 10:41:46 +00:00
weili10 3ae0c6ae3f !814 安装指南与README新增安装提示说明
Merge pull request !814 from 彭子荣/v1.5.0
2022-05-18 10:40:33 +00:00
pengzirong 30b9ebb94d 安装指南与README更新提示 2022-05-18 17:36:35 +08:00
AtlasAccount 844328508e 同步1.5.0 2cb9f26f9b0221d4951c1c2818af51b4954bd3c5
!3421 回退 Pull Request !3408 : 【1.5新算子适配】norm适配LpNorm算子
    Merge pull request !3421 from weili10/revert-merge-3408-master
2022-05-13 12:00:57 +08:00
AtlasAccount ec0828a267 同步1.5.0 1556b0eccd6f26c7570812b362754fa3b3201248
!3408 【1.5新算子适配】norm适配LpNorm算子
    Merge pull request !3408 from 肖代鹏/1.8_adapt_222
--
    !3412 下发优化代码回退
    Merge pull request !3412 from 李超/master-git
2022-05-12 11:57:25 +08:00
AtlasAccount 54c1b37228 同步1.5.0 9ecfb14a51719a8d6a917337560e90f5358dba40
!3397 更新apply_adam底层算子
    Merge pull request !3397 from 王晓/applyadam
--
    !3409 [bugfix] 暂时回退 get_npu_format修改
    Merge pull request !3409 from 李超/master
2022-05-10 23:01:53 +08:00
AtlasAccount 4b31ff2cb5 同步1.5.0 21a1c102215b8dbe98a41a0592126e48e09b6ff7
!3398 调整shutdown阶段资源释放流程
    Merge pull request !3398 from wangyu/dev
--
    !3391 调整进程退出阶段资源释放流程
    Merge pull request !3391 from wangyu/dev
2022-05-06 23:00:52 +08:00
AtlasAccount 150ead5660 同步1.5.0 09ea7e8fa7de87420d217775375b44f3509c26c1
!3393 sync dev to master
    Merge pull request !3393 from 王强/dev
2022-05-05 12:02:00 +08:00
AtlasAccount cfcc3a2f8b 同步1.5.0 4baf85d4d061ed874fe71c96b5a053aa973a5cd2
!3387 randperm 适配
    Merge pull request !3387 from 沈鹏程/randperm
2022-04-29 23:00:46 +08:00
weili10 aeba162110 update ascend pytorch version 2022-04-29 03:10:06 +00:00
AtlasAccount 7c31e72e10 同步1.5.0 0e3c8619b6df6775666c912ee8c35f8e663a6e93
!3384 【FixBug】修复max.out接口checkout错误场景
    Merge pull request !3384 from hxf12345677/max
--
    !3386 【bugfix】:修复embedding_renorm_适配导致图模式用例失败的问题
    Merge pull request !3386 from 郭夏/master
2022-04-27 23:00:56 +08:00
AtlasAccount e3e79304fd 同步1.5.0 08c9f799c3ebed16f8cab47bd6518c0598bcce76
!3381 [optimize] 非连续+适配层下发优化3
    Merge pull request !3381 from 李超/git
--
    !3380 dev合入master
    Merge pull request !3380 from 蒋荣强/dev
--
    !3379 merge master to dev
    Merge pull request !3379 from 蒋荣强/dev
--
    !3376 print入图功能,修复生成string的bug
    Merge pull request !3376 from wangyu/dev
--
    !3374 修复print入参场景下,异步h2d没有做内存释放控制的bug
    Merge pull request !3374 from wangyu/dev
--
    !3372 add format adaptation for ops that only support NCHW/NHWC
    Merge pull request !3372 from 王强/dev
--
    !3371 CMD重构,master to dev
    Merge pull request !3371 from 王强/dev
--
    !3362 print入图支持传递tensor name
    Merge pull request !3362 from wangyu/dev
--
    !3350 【1.5算子重构】 Pdist,QuantizePerChannel,Renorm,UpsampleLinear1d,SoftShrink
    Merge pull request !3350 from 肖代鹏/1.5_adapt_construction
    !3359 【1.5代码重构】quantize_per_tensor,repeat_interleave,soft_margin_loss,softshrink_backward,upsample_bicubic2d_backward
    Merge pull request !3359 from 肖代鹏/1.5_adapt_construction3
--
    !3370 add format adaptation for strideadd and col2im
    Merge pull request !3370 from 王强/dev
--
    !3367 【BugFix】logical_or,logsigmoid,logdet,matrix,nms_v4,nms_with_mask
    Merge pull request !3367 from 周凡/cg10
--
    !3369 【refactor】strideadd,one_hot,index,nllloss2d_backward
    Merge pull request !3369 from 王强/dev
    !3345 【refactor】strideadd,one_hot,index,nllloss2d_backward
    Merge pull request !3345 from 周凡/cg4zf
2022-04-25 23:00:47 +08:00
AtlasAccount 3c84bfa2c3 同步1.5.0 d39f2510376f93bd80161f9ab3fdf9b21e826a53
!3366 【fixbug】embedding_backward, embeddingdensebackward算子ut修改
    Merge pull request !3366 from hxf12345677/embedding
2022-04-21 12:00:59 +08:00
i-robot 7759024b2c !712 add pull request template
Merge pull request !712 from weili10/v1.5.0
2022-04-21 01:39:51 +00:00
AtlasAccount 0e5945d7e7 同步1.5.0 9ac4ebdfae709ae01e2b407c209b648551684920
!3364 【FixBug】修复kl_div_backward算子Reduction为Mean计算结果错误场景
    Merge pull request !3364 from hxf12345677/kld
--
    !3357 【BugFix】delete npu_transpose_to_contiguous
    Merge pull request !3357 from 戢芳/transpose1.5
--
    !3355 【FixBug】Celu算子名修改
    Merge pull request !3355 from hxf12345677/fix
2022-04-20 23:01:35 +08:00
weili10 af794ca02d add pull request template 2022-04-20 14:55:03 +08:00
i-robot 433d206ff7 !706 Updated README-EN and the LSTMCELL operator in the API Support (English version).
Merge pull request !706 from zwy/v1.5.0
2022-04-20 06:25:52 +00:00
AtlasAccount 15c670d1f8 同步1.5.0 e4200efc7b53ea596890b89f1b95af0cec999939
!3350 【1.5算子重构】 Pdist,QuantizePerChannel,Renorm,UpsampleLinear1d,SoftShrink
    Merge pull request !3350 from 肖代鹏/1.5_adapt_construction
--
    !3359 【1.5代码重构】quantize_per_tensor,repeat_interleave,soft_margin_loss,softshrink_backward,upsample_bicubic2d_backward
    Merge pull request !3359 from 肖代鹏/1.5_adapt_construction3
2022-04-19 23:00:47 +08:00
AtlasAccount 5a9ac1dece 同步1.5.0 ca6538008f5430012823113d501b241ca28d1ba3
!3353 增加e2e 打点,和pytorch profiler对应
    Merge pull request !3353 from 施博/master
2022-04-18 23:00:45 +08:00
yanhuiling 03739b8421 Update 2022-04-18 18:36:40 +08:00
yanhuiling 94f19f9447 Update 2022-04-18 18:21:13 +08:00
yinzijun 13e1c247bc !698 Updated English docs.
Merge pull request !698 from zwy/v1.5.0
2022-04-18 01:26:00 +00:00
yanhuiling cfe4effb45 Update 2022-04-16 17:42:05 +08:00
i-robot bf2a5a75f0 !694 安装指南中新增CANN版本配套表-v1.5.0
Merge pull request !694 from yinzijun/v1.5.0
2022-04-16 07:21:09 +00:00
yinzijun 9edee0857d 新增cann版本配套表 2022-04-16 06:54:57 +00:00
AtlasAccount 4f38dbfe21 同步1.5.0 a518461dd8e0665deb42ed7f0537c56b37b1edee
!3343 【BugFix】logical_or,logsigmoid,logdet,matrix,nms_v4,nms_with_mask
    Merge pull request !3343 from 周凡/cgmodzf
2022-04-16 12:00:52 +08:00
AtlasAccount e23edc496a 同步1.5.0 dac15bb346999be5a58602240d847cb6ce1efa10
!3349 【图模式】add const ops to graph inputs for graph construction
    Merge pull request !3349 from 王强/dev
--
    !3345 【refactor】strideadd,one_hot,index,nllloss2d_backward
    Merge pull request !3345 from 周凡/cg4zf
--
    !3344 回退lstm_cell的正反向适配
    Merge pull request !3344 from 戢芳/cell_back_master
2022-04-15 23:00:47 +08:00
i-robot 7b620de388 !685 AOE工具内容修改
Merge pull request !685 from 彭子荣/v1.5.0
2022-04-15 08:30:50 +00:00
pengzirong 49e47199f0 用户知识库目录修改 2022-04-15 09:56:20 +08:00
i-robot 40394042b1 !682 v1.5.0分支增加arm环境torchvision安装指导
Merge pull request !682 from 王夏夏/v1.5.0
2022-04-15 01:41:31 +00:00
AtlasAccount b3927b466a 同步1.5.0 43f88e44daf41afe422170bbcd5051aded1760ac
!3337 【max_pool2d算子补充ut】adaptive_max_pool2d,adaptive_max_pool2d_backward,max_pool2d_backward,max_pool2d_with_indices_backward
    Merge pull request !3337 from 周凡/modut
--
    !3333 【功能需求】print入图等需求合入
    Merge pull request !3333 from 蒋荣强/master
--
    !3336 【BugFix】take算子ApplyTensor使用错误
    Merge pull request !3336 from 戢芳/take1.5
2022-04-14 23:01:34 +08:00
xiaxia3 6285c99df0 v1.5.0 arm 安装torchvision指导 2022-04-14 21:27:45 +08:00
i-robot 2005dfa5cf !673 算子支持度修改
Merge pull request !673 from 彭子荣/v1.5.0
2022-04-14 08:29:03 +00:00
AtlasAccount 7f42d3111f 同步1.5.0 9e07c268868154f274d4f65da5a2f5562d942a82
!3322 [bugfix] 修复asstride计算错误问题
    Merge pull request !3322 from 李超/master
2022-04-14 12:00:48 +08:00
pengzirong e05a732de7 修改LSTMCELL算子不支持场景 2022-04-14 09:41:32 +08:00
AtlasAccount 9ee9b54722 同步1.5.0 f504941d8f78d7fae48644f368d065efa055b8b5
!3332 回退 Pull Request !3327 : 【refactor】strideadd,one_hot,index,nllloss2d_backward
    Merge pull request !3332 from weili10/revert-merge-3327-master
--
    !3331 【性能优化】dev优化合入到master
    Merge pull request !3331 from 蒋荣强/master
2022-04-13 23:00:46 +08:00
AtlasAccount 120ab81ead 同步1.5.0 69885324ad8af2b219cf45658f5e265f3c06e0bd
!3329 【refactor】logical_or,logsigmoid,logdet,matrix,nms_v4,nms_with_mask
    Merge pull request !3329 from 周凡/opcgzf1
--
    !3328 【1.5算子重构】take、gatherv2d、erfinv、elu_backeard
    Merge pull request !3328 from 戢芳/move1.5_2
--
    !3327 【refactor】strideadd,one_hot,index,nllloss2d_backward
    Merge pull request !3327 from 周凡/opcgzf
--
    !3324 【1.5算子重构】cdist,baddbmm,nnpack_spatial_convolution,det,true_divide
    Merge pull request !3324 from 戢芳/move1.5
--
    !3321 【1.5算子重构】col2im_backward
    Merge pull request !3321 from 戢芳/col2im1.5
2022-04-12 23:00:45 +08:00
i-robot d1ec3489a8 !659 补充NPU自定算子列表中缺失的算子
Merge pull request !659 from 彭子荣/v1.5.0
2022-04-12 01:44:15 +00:00
pengzirong 8af1e10abc 补充NPU自定算子列表中缺失的算子 (详细算子清单说明中存在)
u

u
2022-04-12 09:17:38 +08:00
weili10 d0cfe101cf !656 V1.5.0 问题单修改
Merge pull request !656 from 彭子荣/v1.5.0
2022-04-09 10:15:12 +00:00
pengzirong c1e759b93c V1.5.0问题单修改 2022-04-09 17:14:10 +08:00
i-robot 3e878edfd5 !650 刷新cann prof资料
Merge pull request !650 from 施博/v1.5
2022-04-09 03:21:55 +00:00
shibo19 34aad3ba20 刷新cann prof资料 2022-04-09 11:09:18 +08:00
AtlasAccount 2d3c963a8b 同步1.5.0 233b0f0a21bd2bfdd74bfda0eb149acdb09f8a93
!3313 【BugFix】规避lstm_cell_backward精度问题
    Merge pull request !3313 from 戢芳/lstm_cell_backward1.5
--
    !3314 删除cann prof不必要的参数设置
    Merge pull request !3314 from 施博/fix_e2e
--
    !3316 cann profiling默认关闭TRAINING_TRACE
    Merge pull request !3316 from lijing/master
2022-04-08 21:50:57 +08:00
i-robot 36b69a909b !645 版本说明与E2E工具内容更新
Merge pull request !645 from 彭子荣/v1.5.0
2022-04-08 11:24:52 +00:00
pengzirong e65c39e589 3.0.RC1版本说明书更新 2022-04-08 17:32:04 +08:00
pengzirong 96e2e34cbb 更新E2E prof工具内容 2022-04-08 17:19:09 +08:00
AtlasAccount 5fa7efcfba 同步1.5.0 22c1ca725cda8d89622b92d747a2c5d428423ca3
!3307 【bugfix】deformable_conv2d_backward
    Merge pull request !3307 from 周凡/defzf
--
    !3305 【功能修复】当eventfd相关接口发生EINTR错误,程序继续运行
    Merge pull request !3305 from 蒋荣强/master
--
    !3310 nll_loss加入溢出检测黑名单
    Merge pull request !3310 from 王夏夏/master
--
    !3309 增加编译选项控制
    Merge pull request !3309 from wangyu/master
2022-04-06 22:43:53 +08:00
AtlasAccount d0a4b62e54 同步1.5.0 04d73412bb8586ea1f72775753e04bc2f1ab2b95
!3306 aoe功能创建路径问题解决
    Merge pull request !3306 from 施博/fix_aoe_bug
2022-04-02 23:00:46 +08:00
AtlasAccount 2ea0c67fc1 同步1.5.0 bdc61eac1f3061568c7c46b7af40843b667bac04
!3302 shutdown前主动释放processgroup相关资源
    Merge pull request !3302 from wangyu/master
--
    !3300 刷新e2e 功能报错信息
    Merge pull request !3300 from 施博/fix_e2e_bug
2022-04-02 11:59:11 +08:00
weili10 4caa12ab7d update docs/zh/PyTorch安装指南/PyTorch安装指南.md. 2022-04-01 13:25:47 +00:00
i-robot 10a9e48f97 !596 删除1.8.1相关
Merge pull request !596 from 彭子荣/v1.5.0
2022-04-01 13:16:19 +00:00
weili10 cb45330ce1 update README.zh.md. 2022-04-01 13:13:39 +00:00
weili10 dc98244a89 update README.zh.md. 2022-04-01 12:39:18 +00:00
weili10 682eca49df update README.zh.md. 2022-04-01 12:37:00 +00:00
weili10 71554f76d1 update scripts/gen.sh. 2022-04-01 12:33:06 +00:00
weili10 c279e2e92a update scripts/gen.sh. 2022-04-01 12:20:40 +00:00
weili10 9fcd859d96 update README.zh.md. 2022-04-01 12:19:48 +00:00
weili10 294aef2b9b update scripts/gen.sh. 2022-04-01 12:06:14 +00:00
weili10 47b089cb6c update README.zh.md. 2022-04-01 12:00:45 +00:00
pengzirong fbde60dc1d 删除1.8.1相关 2022-04-01 19:54:58 +08:00
weili10 3a44ffc52e update scripts/gen.sh. 2022-04-01 10:37:27 +00:00
weili10 cb3d7402d2 update README.zh.md. 2022-04-01 09:24:07 +00:00
weili10 22c2d837ca update README.zh.md. 2022-04-01 09:12:23 +00:00
weili10 dca21b621a update scripts/gen.sh. 2022-04-01 09:11:03 +00:00
weili10 c2a7d66b13 update scripts/gen.sh. 2022-04-01 09:09:14 +00:00
weili10 5e5a2a7925 update README.zh.md. 2022-04-01 09:08:05 +00:00
AtlasAccount a3bb1f25c4 同步1.5.0 fd0ceb73a7c14a6b28d3839ecbd9c95ae74ab1c6
!3299 [bugfix] 修复 BN scale参数dtype引起精度问题
    Merge pull request !3299 from 李超/master1
--
    !3288 [feature] 解除asstrided算子精确编译限制
    Merge pull request !3288 from 李超/master
2022-03-31 23:00:46 +08:00
i-robot 0d33ee3e0d !585 刷新api资料,diag算子仅支持diagonal=0场景
Merge pull request !585 from 戢芳/msg_diag
2022-03-31 13:31:04 +00:00
pipihugh 796d41d691 刷新api资料,diag算子仅支持diagonal=0场景 2022-03-31 19:35:06 +08:00
AtlasAccount bdb376cdb3 同步1.5.0 7c9813a3a6d68c0231749a53486299bbc9352858
!3297 shutdown 前主动释放process group相关资源
    Merge pull request !3297 from wangyu/master
2022-03-31 09:39:20 +08:00
AtlasAccount 4dc31edf9a 同步1.5.0 6a8be028864854d4e204677c90f8ed9e421211e9
!3287 【BugFix】修复inverse不支持fp16 out场景
    Merge pull request !3287 from 王晓/inverse
--
    !3290 【BugFix】lstm_cell增加bias=false的场景
    Merge pull request !3290 from 戢芳/lstm_cell_debug
--
    !3294 回退 Pull Request !3284 : 在npu shutdown流程前主动释放process group
    Merge pull request !3294 from weili10/revert-merge-3284-master
2022-03-29 23:00:51 +08:00
AtlasAccount aafe2061ac 同步1.5.0 1fe05e27602d1ceed302541e3da9b6b02ef19aea
!3284 在npu shutdown流程前主动释放process group
    Merge pull request !3284 from wangyu/master
2022-03-28 12:23:43 +08:00
AtlasAccount 2eaee92eb0 同步1.5.0 392a9d7e12c3af78ce45a4f4241e26f6cc7d7336
!3280 【1.5算子适配】 ReplicationPad1dBackward 算子适配
    Merge pull request !3280 from 沈鹏程/replicatback
2022-03-26 23:00:46 +08:00
AtlasAccount 416deb85dd 同步1.5.0 e48e6bd63caa8764fd85ed823ca563e182e15465
!3277 [feature] 删除TRI_COMBINED_ENABLE环境变量
    Merge pull request !3277 from 李超/master
--
    !3272 【1.5算子适配】lstm_cell_backward
    Merge pull request !3272 from 戢芳/lstm_cell_back1.5
--
    !3275 规避as strided算子精度问题
    Merge pull request !3275 from 蒋荣强/master
--
    !3262 Add verbose in enable graph mode & Enhance error information about GE interface
    Merge pull request !3262 from 汪瑞哲/coding
2022-03-24 22:17:53 +08:00
AtlasAccount f1891c36af 同步1.5.0 73ce683bf259cd2cc357989a7a0fc0dd8de070f7
!3271 修复MobileNetV2网络dump问题
    Merge pull request !3271 from 周司南/master
2022-03-24 15:34:53 +08:00
AtlasAccount e7e6580ca2 同步1.5.0 d4966fde08017b8ef41b0d6fa15b2593d0f1df76
!3264 【图模式】enbale static memory opt
    Merge pull request !3264 from 王强/master
2022-03-23 19:51:38 +08:00
尤安升 c1f3ad0761 del pytorch1.8.1 2022-03-23 19:50:28 +08:00
AtlasAccount 913f54dc61 同步1.5.0 af5a43963bf86227fce4005d608fa87b83de6ed9
!3265 【BugFix】dropout_with_add_softmax算子名回退
    Merge pull request !3265 from 戢芳/dropout1.5
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-03-22 21:12:04 +08:00
AtlasAccount 31c3f964bd 同步1.5.0 db48001ed53f91ab992c88990cb9f70f9cd9fd8c
!3261 增加显式调用domask和genmask的接口
    Merge pull request !3261 from lijing/master
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-03-22 15:35:59 +08:00
AtlasAccount f70a8b1e31 同步1.5.0 8e14e688a1d328e931838d6b6f0be1fd28c69484
!3259 [bugfix] 修复asstride计算错误问题
    Merge pull request !3259 from 李超/master
--
    !3253 【1.5算子适配】lstm_cell
    Merge pull request !3253 from 戢芳/lstm_cell_forward1.5
--
    !3239 DDP:修复broadcast_coalesced部分数据错误的问题
    Merge pull request !3239 from 袁舰/master
--
    !3251 [bugfix] 修复asstride计算错误问题
    Merge pull request !3251 from 李超/master
--
    !3258 【BugFix】dropout_with_add_softmax修改算子名
    Merge pull request !3258 from 戢芳/dropout1.5
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-03-21 23:01:05 +08:00
AtlasAccount 6d5a62b73d 同步1.5.0 acd1a7fe34e0da7552bad2978550fa1bd20f6ddb
!3255 【Sortv2支持-1轴排序】sort_without_indices
    Merge pull request !3255 from 周凡/sortwizf
--
    !3256 aoe刷新支持的算子列表
    Merge pull request !3256 from 施博/fix_aoe
--
    !3254 【Topk算子实现改变,删除large_topk分支】topk
    Merge pull request !3254 from 周凡/topk318
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-03-18 23:01:17 +08:00
AtlasAccount 4f5ed6616a 同步1.5.0 9f59490e7edb5454f8fba51febee6002564c2377
!3246 增加融合算子MultiHeadAttention正反向适配
    Merge pull request !3246 from 李思杰/multi_head_attention
--
    !3245 【bugfix】修复batch_nms问题
    Merge pull request !3245 from 王晓/batch_nms
--
    !3250 【BugFix】layer_norm算子UT更改
    Merge pull request !3250 from 戢芳/layer_norm1.5
--
    !3247 aoe dump功能:屏蔽对不进行调优的算子
    Merge pull request !3247 from 施博/fix_aoe
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-03-17 23:00:54 +08:00
AtlasAccount 8d535a9189 同步1.5.0 a9ff45c79ee5b4ac41cf226589c428dce579cf65
!3249 [feature] 非连续环境变量移除
    Merge pull request !3249 from 李超/master
--
    !3248 同步刷新aoe接口
    Merge pull request !3248 from 施博/aoe_update
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-03-16 23:00:53 +08:00
AtlasAccount 563de6fbd9 同步1.5.0 35e6c75271c1bc4b6b9c0739cf734a458fa6b439
!3244 【图模式】deal with the problem of constructing graphs for op NPUClearFloatStatus.
    Merge pull request !3244 from 王强/master
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-03-16 12:01:24 +08:00
AtlasAccount ed367a62b7 同步1.5.0 eb8fa3576eed877700b0619b7a54eec4a5506847
!3238 支持cann prof区分step信息
    Merge pull request !3238 from 施博/fix_cann
--
    !3237 图模式 scalar-memory能力增强+单算子场景指定标量格式为ND
    Merge pull request !3237 from 王强/dev
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-03-14 12:01:04 +08:00
AtlasAccount 3eecafe015 同步1.5.0 0da5e0e53b04208d0556cb58e8e275c7f08b8e46
!3236 【BugFix】修复dropout_with_add_softmax用例bug
    Merge pull request !3236 from 戢芳/drop1.5
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-03-11 23:01:00 +08:00
AtlasAccount 274004f7ad 同步1.5.0 1bec1e30648214d6b887241e85d52a9359efb6a0
!3234 【BugFix】修复layer_norm结果不匹配的问题
    Merge pull request !3234 from 戢芳/layer_norm1.5
--
    !3229 【功能回退】暂时不使能aclrtQueryEventStatus接口
    Merge pull request !3229 from 蒋荣强/master
--
    !3210 bugfix: 修改Bernoulli启动第2个aicpu代码,原方案不可行,只能支持一种输入情况开启并行
    Merge pull request !3210 from 郭夏/b
--
    !3220 【ctclossv2算子泛化,支持输入targets为1D的场景(原仅支持2D)】ctc_losss
    Merge pull request !3220 from 周凡/ctczf
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-03-10 23:00:54 +08:00
AtlasAccount 6b9315ad91 同步1.5.0 f12e79810fc1f2347baa10d36a02ef2e417ea0ce
!3224 dev 合入 master
    Merge pull request !3224 from 王强/master
--
    !3216 【BugFix】layer_norm算子问题修复
    Merge pull request !3216 from 戢芳/layer_norm1.5
--
    !3219 合并dev
    Merge pull request !3219 from wangyu/master
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-03-08 23:01:01 +08:00
AtlasAccount 3c9a47cd8c 同步1.5.0 702251cf53328a3761755877cb919a7c0cbd9680
!3214 kl_div 1.5算子需求增加
    Merge pull request !3214 from hxf12345677/kl
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-03-08 12:01:10 +08:00
AtlasAccount 586b3fa039 同步1.5.0 0bb991acd040a67ff19c124b6c4d5f02d04ace4c
!3211 【BugFix】grid_sampler算子的问题修复
    Merge pull request !3211 from 戢芳/gridsampler1.5
--
    !3207 修复dropout_with_byte_mask_精度bug
    Merge pull request !3207 from 詹隽/dropoutv3_dev_fix
--
    !3208 refactor(NpuAny Type): reimplement Npu Any type
    Merge pull request !3208 from 宇世康/master
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-03-07 23:00:51 +08:00
AtlasAccount e093b4359a 同步1.5.0 89cc8d62897d765284d550bf432f34d950dd5210
!3204 [bugfix] 禁止asstrided算子参与模糊编译
    Merge pull request !3204 from 李超/master
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-03-04 23:01:08 +08:00
AtlasAccount a861f3cb96 同步1.5.0 161dc9d87f9db4ae1cc4d688ad771bc2602f86e5
!3199 【FixBug】topk大规模场景性能问题适配规避
    Merge pull request !3199 from 王晓/topk
--
    !3197 【1.5算子适配】dropout_with_add_softmax融合算子
    Merge pull request !3197 from 戢芳/dropadd
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-03-03 23:00:52 +08:00
AtlasAccount 47b5c52129 同步1.5.0 89cc2e50c164bc3f5bf17e7c46af7280c2024d77
!3182 pytorch适配DropoutV3
    Merge pull request !3182 from 詹隽/dropoutv3
--
    !3189 【Topk算子实现改变,删除large_topk分支】topk
    Merge pull request !3189 from 周凡/topkzf
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-03-02 23:00:53 +08:00
weili10 f738240fd5 update OWNERS. 2022-03-02 09:21:52 +00:00
i-robot c837a70844 !338 资料合入
Merge pull request !338 from 彭子荣/master
2022-03-01 09:47:50 +00:00
weili10 2a323fab49 update OWNERS. 2022-03-01 09:43:37 +00:00
pengzirong 1a08ccad88 update pics&contents of pytroch网络模型移植&训练指南&Pytroch 安装指南
update

update url of Pytorch installation

update url of Pytorch installation
2022-03-01 17:29:35 +08:00
AtlasAccount f7b065414b 同步1.5.0 d710800a5dafa29aefd6d80bd12150f6f5d2b615
!3181 修改InputWithoutContiguous warning级别,避免强制打屏
    Merge pull request !3181 from 李超/master
--
    !3169 增加npu_format_cast.Tensor、get_npu_format接口,test: format_cast
    Merge pull request !3169 from 王晓/format_cast
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-02-25 15:59:50 +08:00
AtlasAccount b3fbc1dee0 同步1.5.0 055bf8ca2bc6b3e2fcb09d23844017800bdb2302
!3168 移动NPUEvent.h到c10路径下
    Merge pull request !3168 from wangyu/master
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-02-21 12:00:49 +08:00
AtlasAccount ba413bdc6c 同步1.5.0 d1d273166807a809d3c72126b166a4d9115ea527
!3163 合并dev分支
    Merge pull request !3163 from weili10/dev
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-02-18 12:00:59 +08:00
i-robot 5193ae8b44 !274 刷新api资料,query接口不支持
Merge pull request !274 from 施博/master
2022-02-18 01:31:52 +00:00
shibo19 48b35ef669 刷新api资料,query接口不支持 2022-02-17 19:52:32 +08:00
AtlasAccount e382982f9f 同步1.5.0 362f14f3d12c289a1269e79b9b94f1ebba5a6136
!3155 更改非连续Torch warn类别
    Merge pull request !3155 from 李超/master
--
    !3136 HCCL:修改计算bucket采用的size标准
    Merge pull request !3136 from 袁舰/master
--
    !3137 modify: 修改median调用fill_传参形式,避免调用scalar接口导致频繁编译问题
    Merge pull request !3137 from 郭夏/median
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-02-14 23:01:04 +08:00
AtlasAccount 3107fe16f7 同步1.5.0 ee97ee4d3b4402b50322b002425cf2cca8939f7c
!3143 [optimize] 转连续通用PTCopy算子替换为asStrided算子
    Merge pull request !3143 from 李超/git_asstride
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-02-14 12:00:45 +08:00
AtlasAccount 178f3bc3c8 同步1.5.0 f318a3ebbfa9ffda6f09c187824b24b0b53cc183
!3149 1.5.0 小版本号变更
    Merge pull request !3149 from 周司南/masterbk
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-02-11 14:28:35 +08:00
AtlasAccount c085ad4eb7 同步1.5.0 7e62822bd52eb78d27b9161dc7b68caf77a3094c
!3146 提供DDP分布式流程下,skip grad allreduce的能力
    Merge pull request !3146 from wangyu/master
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-02-08 23:00:43 +08:00
彭子荣 0fc3c3a7c4 参考图片 2022-02-08 03:12:34 +00:00
AtlasAccount f89c8a2187 同步1.5.0 a6e7c66af4d9f068792ba80afc3e521bb86d9a85
!3141 【功能维测】新增ut防止开启队列的动态场景下算子attr被重复释放
    Merge pull request !3141 from 蒋荣强/ut
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-02-07 23:00:46 +08:00
i-robot aeca353926 !171 bugfix:修复英文资料的路径和拼写错误
Merge pull request !171 from shibo/master
2022-01-29 09:31:36 +00:00
shibo 6e3d104476 修复英文资料的路径和拼写错误 2022-01-29 16:48:50 +08:00
i-robot d003421c1a !166 bugfix: 修复资料中拼写错误
Merge pull request !166 from shibo/master
2022-01-29 08:37:35 +00:00
shibo 193772bbea 修复拼写错误 2022-01-29 15:35:06 +08:00
AtlasAccount 9ae625472e 同步1.5.0 a37d767dd4110c6561b35a19ae53f265ea71f563
!3139 图模式去除设置High Precision
    Merge pull request !3139 from wangyu/master
--
    !3138 [optimization]非连续下发优化
    Merge pull request !3138 from 李超/git_contiguous
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-01-28 23:01:27 +08:00
AtlasAccount 26178c3a1b 同步1.5.0 2f354fcc04b2186126affa38d94613d733c1af6b
!3134 【维持】queue执行接口加RECORD_HOST_FUNCTION
    Merge pull request !3134 from 蒋荣强/record
--
    !3130 默认开启模糊编译缓存文件落盘
    Merge pull request !3130 from 宇世康/master
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-01-27 12:01:08 +08:00
AtlasAccount be5356c0c6 同步1.5.0 994f343554d44acd58bea036c0b21d05cd90bd80
!3132 修改门禁把resnet作为必跑用例
    Merge pull request !3132 from 龚俊强/master
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-01-26 23:01:14 +08:00
AtlasAccount b3372ee933 同步1.5.0 fc962f2d66fc3ebb4183a5305f1c083cac522e7f
!3129 merge dev
    Merge pull request !3129 from 宇世康/master
--
    !3117 LinearBackwardKernelNpu中增加对grad的format校验,避免两次linear_backward_out_npu中对grad重复的transdata
    Merge pull request !3117 from 王姜奔/master
--
    !3124 【1.5算子适配】 ReplicationPad1d 算子适配(2)
    Merge pull request !3124 from 沈鹏程/rep
--
    !3102 【1.5算子适配】 reflectionPad1d 算子适配
    Merge pull request !3102 from 沈鹏程/reflectionPad1d
--
    !3126 回退 Pull Request !3114 : [optimize] 非连续转连续下发优化
    Merge pull request !3126 from weili10/revert-merge-3114-master
--
    !3120 fix option
    Merge pull request !3120 from 宇世康/dev
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-01-25 23:00:43 +08:00
AtlasAccount e96c816b06 同步1.5.0 05af491da69a887ee164bc6907ffbfec7df8a6c1
!3114 [optimize] 非连续转连续下发优化
    Merge pull request !3114 from 李超/contiguous0121
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-01-24 23:01:59 +08:00
AtlasAccount 7eeb579f3f 同步1.5.0 b5bb63fbee5ef9d0147b66a474d26f4129203516
!3116 [optimize] 非连续转连续下发优化-part1-UT修改
    Merge pull request !3116 from 李超/master
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
2022-01-23 23:01:10 +08:00
AtlasAccount c489d97007 同步1.5.0 e41693cd9a610d956c3fe7ea93cc14f96685fe2b
同步1.8.1 5ef4201b03e2651946576f806bef9fdaa7aa1d86
    !2903 1.8.1 addcmul算子适配
    Merge pull request !2903 from 孙幸/1.8_addcmul
--
    !3071 【1.8算子移植】 rsub 算子适配
    Merge pull request !3071 from 沈鹏程/1.8_rsub
--
    !2906 1.8.1 affinegridgenerator算子适配
    Merge pull request !2906 from 孙幸/1.8_affinegridgenerator
--
    !3105 【1.8.1算子适配】ger
    Merge pull request !3105 from 戢芳/ger1.8.1
--
    !3066 remainder1.8.1算子适配
    Merge pull request !3066 from hxf12345677/remainder
2022-01-22 12:00:45 +08:00
i-robot ca485063d0 !106 Updated FrameworkPTAdapter 2.0.4 Release Notes
Merge pull request !106 from yanhuiling/master
2022-01-22 02:48:07 +00:00
AtlasAccount 3cd7ed797d 同步1.5.0 e41693cd9a610d956c3fe7ea93cc14f96685fe2b
!3081 UT 公共文件调整
    Merge pull request !3081 from 龚俊强/master
同步1.8.1 82c1938da320d69e05d03498163d64defc76eb1a
    !3115 ceil算子1.8.1移植
    Merge pull request !3115 from hxf12345677/ceil
--
    !3108 【1.8.1算子适配】 Add Arange Operator
    Merge pull request !3108 from 周凡/NewArangezf
2022-01-21 23:00:55 +08:00
AtlasAccount 6ca23d5514 同步1.5.0 bc11aeb9574ec4229d260f6e335f9b94b9898d3a
同步1.8.1 7b005e2b1e14a04f1aea3a5d4f2e79279f7afff5
    !3103 batch_norm_backward_reduce算子1.8.1移植
    Merge pull request !3103 from hxf12345677/batch_norm_backward_reduce
2022-01-21 12:01:25 +08:00
yanhuiling 287c6e6cc3 update docs/en/RELEASENOTE/FrameworkPTAdapter 2.0.4 Release Notes.md. 2022-01-21 02:30:39 +00:00
yanhuiling 316cc29ee2 Updated this file 2022-01-21 02:27:55 +00:00
yanhuiling f77253ae52 删除文件 docs/en/RELEASENOTE/RELEASENOTE.md 2022-01-21 02:27:44 +00:00
AtlasAccount ae834d5ab6 同步1.5.0 bc11aeb9574ec4229d260f6e335f9b94b9898d3a
!3094 新增对ACL_AUTO_TUNE_MODE的设置的回调函数
    Merge pull request !3094 from 王姜奔/master
同步1.8.1 1fef46b8e6ced0439c22e93488794af076d0bb14
    !3083 【1.8算子迁移】npu_giou
    Merge pull request !3083 from wuxiankun/1.8giou
--
    !3089 【1.8算子适配】 Addbmm 算子适配
    Merge pull request !3089 from 沈鹏程/fix_errorName
--
    !3088 【1.8算子适配】 BinaryCrossEntropy 算子
    Merge pull request !3088 from 沈鹏程/1.8_Bce
--
    !3093 【1.8算子迁移】fast_gelu
    Merge pull request !3093 from wuxiankun/1.8fastgelu
--
    !3033 【1.8.1算子适配】log2
    Merge pull request !3033 from 王晓/1.8.1_log2
2022-01-20 23:00:53 +08:00
i-robot 824e689004 !103 资料合入1.18
Merge pull request !103 from 彭子荣/master
2022-01-20 11:10:54 +00:00
i-robot 456439d5fa !105 [资料修改] readme添加支持python3.9描述
Merge pull request !105 from 李超/master
2022-01-20 04:00:50 +00:00
李超 073a7ea5ff add python 3.9 to readme 2022-01-20 09:21:01 +08:00
AtlasAccount 5f3a2c11fc 同步1.5.0 a64dee29b83da4595f794a8a3f732750deac1fbb
!3082 【功能维测】增加acl接口失败时error msg打印
    Merge pull request !3082 from 蒋荣强/errmsg
同步1.8.1 4068c9ee00fc7808716c5bc10366340e58b837f4
    !3051 gather1.8.1算子移植
    Merge pull request !3051 from hxf12345677/gather
--
    !3070 【1.8算子适配】index
    Merge pull request !3070 from 戢芳/index1.8.1
2022-01-19 23:00:48 +08:00
彭子荣 c61f676a86 update docs/zh/RELEASENOTE/RELEASENOTE.md. 2022-01-19 02:12:47 +00:00
AtlasAccount 05b72bbd37 同步1.5.0 874be2eee35aa7e78f38d50936501a33a7992783
!3069 check_operators_in_prof 函数移入common目录
    Merge pull request !3069 from 龚俊强/master
--
    !3025 【Bugfix】pow不合理ut修改
    Merge pull request !3025 from wuxiankun/powfix
--
    !3068 pytorch单算子&图模式 GE初始化归一
    Merge pull request !3068 from wangyu/master
同步1.8.1 ec77daa5dbb2c1576105932848cd7411eb762d16
    !2679 add: grid_sampler_3d and backward for 1.8.1
    Merge pull request !2679 from 郭夏/grid_sampler_3d
2022-01-18 23:00:48 +08:00
pengzirong 5cc52fb0d1 delete 2022-01-18 17:23:39 +08:00
pengzirong fd7df84a23 update &delete 2022-01-18 17:22:07 +08:00
AtlasAccount b9b4bb55f2 同步1.5.0 007013d041515737cdc132a588baef68937739bc
!3024 【Optim】dropout模糊编译场景下用storage_size
    Merge pull request !3024 from wuxiankun/dropoutfix
同步1.8.1 de30180167ec61b5a87b6b736dce099e48b702f0
    !3049 【1.8.1算子适配】 Add Embedding Operator
    Merge pull request !3049 from 周凡/Embeddingzf
2022-01-17 23:00:51 +08:00
AtlasAccount 5c4774edfd 同步1.5.0 d47b18923e83b31836a378c1f25a7d6b38a35246
同步1.8.1 7b5815af14f46887f5a6f96a853ec42540d45439
    !3050 【1.8.1算子适配】nonzero
    Merge pull request !3050 from 戢芳/nonzero1.8.1
--
    !3048 【1.8.1算子适配】log
    Merge pull request !3048 from 戢芳/log1.8.1
--
    !3036 full1.8.1移植
    Merge pull request !3036 from hxf12345677/full
2022-01-17 12:00:50 +08:00
i-robot 9e8c744c9b !95 资料合入
Merge pull request !95 from 彭子荣/master
2022-01-17 03:29:33 +00:00
weili10 c69b311610 update README.zh.md. 2022-01-17 02:54:41 +00:00
AtlasAccount 4fc41a0ba9 同步1.5.0 d47b18923e83b31836a378c1f25a7d6b38a35246
!3041 非连续ut新增场景识别功能
    Merge pull request !3041 from 李超/contut_git
同步1.8.1 f5798433897cec7315b3c4975ebea87f870216ac
    !3032 bitwise_and 算子1.8.1移植
    Merge pull request !3032 from hxf12345677/bitwise_and
--
    !3007 【1.8算子适配】addcdiv算子适配
    Merge pull request !3007 from 戢芳/addcdiv1.8.1
--
    !3017 floor_divide算子  1.8移植
    Merge pull request !3017 from hxf12345677/floordivided
2022-01-14 23:00:47 +08:00
AtlasAccount 5e85916c11 同步1.5.0 2ed40e98c3f5324ed4688964b8e2e83672a4d11b
!3044 codecheck问题解决
    Merge pull request !3044 from shibo/codecheck_master
同步1.8.1 74798a86310dbeea6f2465943d62b08ff7242a13
    !3045 codecheck问题解决
    Merge pull request !3045 from shibo/codecheck_1.8
2022-01-14 11:08:22 +08:00
AtlasAccount 087c31c639 同步1.5.0 609b84e21970541672b3a3d778b457999d948a61
!3031 【FixBug】修复mul原地接口不支持bool类型的问题
    Merge pull request !3031 from 王晓/bool_mul_
--
    !3038 【BugFix】解决eye不支持bool类型的泛化问题
    Merge pull request !3038 from 陈庆/eye
--
    !2999 【图模式】为AOE不支持私有格式所做的一些工作
    Merge pull request !2999 from 宇世康/master
同步1.8.1 e6365127cfc0cfe901d34cc95687a8ae2b3e59d4
    !3040 【1.8算子适配】norm
    Merge pull request !3040 from 戢芳/norm1.8.1
--
    !3037 【1.8.1算子适配】 Add Bitwise_not Operator
    Merge pull request !3037 from 周凡/bitwise_notzf
--
    !3030 【1.8算子移植  bugfix】asin 算子适配  增加了check memory 、nochenk和checkout操作
    Merge pull request !3030 from 沈鹏程/1.8_asin
2022-01-13 23:00:48 +08:00
i-robot 5043e98a9d !97 Updated English documents in Pytorch docs
Merge pull request !97 from yanhuiling/master
2022-01-13 08:34:36 +00:00
i-robot da46157333 !96 【轻量级 PR】:Updated docs/en/RELEASENOTE/RELEASENOTE.md.
Merge pull request !96 from yanhuiling/N/A
2022-01-13 08:32:37 +00:00
AtlasAccount e4d4da89fb 同步1.5.0 b2885acb09ab80f7e83e7905103428e21767ec1c
!3023 修改cla错误注册路径
    Merge pull request !3023 from 周司南/master
--
    !3021 E2E prof: 增加RTS数据
    Merge pull request !3021 from shibo/update_e2e
同步1.8.1 d5a74a059f253c36d95d2e3147add3b73de69dc1
    !3020 【1.8算子适配】masked_fill_
    Merge pull request !3020 from 戢芳/masked_fill_1.8.1
--
    !3015 【1.8.1算子适配】 Add Sign Operator
    Merge pull request !3015 from 周凡/Signzf
2022-01-13 12:01:08 +08:00
yanhuiling 33ddeeacc1 updated this file 2022-01-13 01:35:53 +00:00
yanhuiling 7c25c163b5 updated this file 2022-01-13 01:24:38 +00:00
AtlasAccount 44456a207d 同步1.5.0 fe7bb42f9ad101851e6666d1f693cc832bb563e8
!2987 重构优化:将获取reducetion算子的reduce str属性方法提取
    Merge pull request !2987 from shibo/reduce_refactor
同步1.8.1 85feac381d2696f90686bddf4a1b20642feac2de
    !3013 【1.8算子适配】sort
    Merge pull request !3013 from 戢芳/sort1.8.1
--
    !2969 【1.8.1算子适配】 asin 算子适配
    Merge pull request !2969 from 沈鹏程/1.8_asin
2022-01-12 23:00:47 +08:00
yanhuiling e4545fc3a1 Updated this file 2022-01-12 13:07:55 +00:00
yanhuiling 4c55098d78 删除文件 docs/en/PyTorch Operator Support/PyTorch Operator Support.md 2022-01-12 13:07:22 +00:00
yanhuiling 6e5333f278 Updated this file 2022-01-12 13:07:00 +00:00
yanhuiling 5de24000dc 删除文件 docs/en/ONNX Operator List/ONNX Operator List.md 2022-01-12 13:06:40 +00:00
yanhuiling a70b2dc515 Updated this file 2022-01-12 13:06:04 +00:00
yanhuiling ce1a48074f 删除文件 docs/en/PyTorch Network Model Porting and Training Guide/PyTorch Network Model Porting and Training Guide.md 2022-01-12 13:05:39 +00:00
yanhuiling e6c723cf1d Added new three files. 2022-01-12 13:03:40 +00:00
彭子荣 5bd7ddf2b6 !1 update docs/en/PyTorch Operator Development Guide/PyTorch Operator Development Guide.md.
Merge pull request !1 from 阿里斯开扇/N/A
2022-01-12 02:08:50 +00:00
彭子荣 f519cc5110 !2 update docs/en/PyTorch Installation Guide/PyTorch Installation Guide.md.
Merge pull request !2 from 阿里斯开扇/N/A
2022-01-12 02:08:16 +00:00
彭子荣 3dd19b2755 !3 update docs/en/PyTorch Online Inference Guide/PyTorch Online Inference Guide.md.
Merge pull request !3 from 阿里斯开扇/N/A
2022-01-12 02:07:24 +00:00
AtlasAccount c441c8ab11 同步1.5.0 e04468a8072a298400e4663930375dac5e7c271b
同步1.8.1 226b38852b3d5f13696bddd50d98be6e4201b169
    !3011 BinaryCrossEntropyWithLogitsKernelNpu 算子适配
    Merge pull request !3011 from 沈鹏程/1.8_BinaryCrossEntropyWithLogitsKernelNpu
--
    !3012 upsample_nearest2d_backward.grad_input修改
    Merge pull request !3012 from hxf12345677/upsample_nearest2d_backward
--
    !2678 add: grid_sampler for 1.8.1
    Merge pull request !2678 from 郭夏/grid_sampler
2022-01-11 23:00:47 +08:00
阿里斯开扇 675e0d7869 update docs/en/PyTorch Online Inference Guide/PyTorch Online Inference Guide.md.
少量优化
2022-01-11 12:13:11 +00:00
阿里斯开扇 4c9cc52b0e update docs/en/PyTorch Installation Guide/PyTorch Installation Guide.md.
少量优化
2022-01-11 11:56:00 +00:00
yanhuiling 5f326039fd Updated docs/en/RELEASENOTE/RELEASENOTE.md.
Updated the English version based on the Chinese version.
2022-01-11 11:24:54 +00:00
阿里斯开扇 62fed021fe update docs/en/PyTorch Operator Development Guide/PyTorch Operator Development Guide.md.
少量优化
2022-01-11 11:19:59 +00:00
AtlasAccount 91837b9a3b 同步1.5.0 3cb40ae6d0f4a1ad2a059428e1d0a52a2a031573
!2883 modify: upsample_nearest3d反向支持FP16输入
    Merge pull request !2883 from 郭夏/upsample_nearest3d
同步1.8.1 b36205a79412c995f8af9d3dc1ce4f689230fdcf
    !2718 【1.8.1适配“MaxUnpool2d”】
    Merge pull request !2718 from 李攀/do_1.8.1
--
    !2988 添加UT:dataloader模块
    Merge pull request !2988 from shibo/add_data_181
--
    !3006 BinaryCrossEntropy算子适配
    Merge pull request !3006 from 沈鹏程/1.8_Bce
--
    !2970 argsort算子适配
    Merge pull request !2970 from 沈鹏程/1.8_argsort
--
    !2985 Argmax算子适配
    Merge pull request !2985 from 沈鹏程/1.8_argmax
2022-01-11 12:01:13 +08:00
AtlasAccount 57299e8539 同步1.5.0 a171f976cd63fd9c1827f0250862d74811a6dfae
同步1.8.1 2d27390353026584b536879952b84532e06ed4d3
    !2994 atan算子适配
    Merge pull request !2994 from 沈鹏程/1.8_atan
--
    !2990 atan2算子适配
    Merge pull request !2990 from 沈鹏程/1.8_atan2
--
    !3005 clamp算子适配
    Merge pull request !3005 from 沈鹏程/1.8_clamp
2022-01-10 23:00:46 +08:00
pengzirong 3a01034b86 update onnx operator support list 2022-01-10 11:46:45 +08:00
AtlasAccount e6ed5931a7 同步1.5.0 a171f976cd63fd9c1827f0250862d74811a6dfae
同步1.8.1 6d17cfd33a1f5783949d45fd9090da0fa886a61e
    !2977 单元测试引用文件结构
    Merge pull request !2977 from 龚俊强/pytorch1.8.1
2022-01-08 23:00:46 +08:00
AtlasAccount f7cd5ac04a 同步1.5.0 a171f976cd63fd9c1827f0250862d74811a6dfae
!3000 路径拼接使用os.path.join 代替直接字符串加
    Merge pull request !3000 from 龚俊强/master
--
    !3001 回退代码
    Merge pull request !3001 from wangyu/master
同步1.8.1 8937dfc7728adc20d3e5a8f8e6907a37361dd7d0
2022-01-07 23:00:52 +08:00
i-robot b05f263002 !93 资料合入
Merge pull request !93 from 彭子荣/master
2022-01-07 04:00:40 +00:00
pengzirong 8c5dd060e3 fix erro 2022-01-07 11:31:36 +08:00
pengzirong ac5c210a3f delete 2022-01-07 09:42:54 +08:00
pengzirong dde15147ef new file 2022-01-07 09:22:24 +08:00
pengzirong b08e75eb9b delete 2022-01-07 09:22:01 +08:00
pengzirong 8eb3985a69 Merge branch 'master' of gitee.com:peng-zirong/pytorch 2022-01-07 09:21:49 +08:00
pengzirong 745ea1d2ca new file 2022-01-07 09:21:24 +08:00
pengzirong 67d8b2d801 delete 2022-01-07 09:21:05 +08:00
pengzirong 0774236c93 new file 2022-01-07 09:18:23 +08:00
pengzirong 40c47421ab delete 2022-01-07 09:17:42 +08:00
pengzirong 3fbdcf7b02 Merge branch 'master' of gitee.com:peng-zirong/pytorch 2022-01-07 09:16:11 +08:00
AtlasAccount 150a34d6b9 同步1.5.0 c38bbfd7b64217ee049b8125ebf7497c2613c50f
!2997 【功能修复】解决因为memset导致的内存泄漏问题
    Merge pull request !2997 from 蒋荣强/memory
--
    !2961 [Requirement] 模型需求 var 算子适配
    Merge pull request !2961 from 沈鹏程/adapt_var
同步1.8.1 8937dfc7728adc20d3e5a8f8e6907a37361dd7d0
2022-01-06 23:00:52 +08:00
pengzirong 53296dbd84 delete 2022-01-06 17:52:47 +08:00
pengzirong b81e31a023 new files 2022-01-06 17:49:27 +08:00
pengzirong 4a91d7f244 delete all files 2022-01-06 17:49:05 +08:00
AtlasAccount f99e45f951 同步1.5.0 752642b4993a90359274fe49efeeace9718cde66
!2967 rotatediou适配     在原基础上增加两个attr属性
    Merge pull request !2967 from 沈鹏程/rotatediou_adapt
同步1.8.1 8937dfc7728adc20d3e5a8f8e6907a37361dd7d0
2022-01-06 12:00:50 +08:00
AtlasAccount 6b932a1c14 同步1.5.0 1e7b9443e574817d7513413e37d52254b0cfd93e
!2980 【bugfix】torch1.5不支持python3.9.不再提供编包支持
    Merge pull request !2980 from 李超/master
同步1.8.1 8937dfc7728adc20d3e5a8f8e6907a37361dd7d0
2022-01-05 23:00:47 +08:00
AtlasAccount 081221378d 同步1.5.0 7448ccd0ad9192c58cab04ef1c1097144c63b624
!2974 优化 graph_utils.py 引用结构
    Merge pull request !2974 from 龚俊强/master
--
    !2971 【泛化】适配层兜底,泛化BatchNormGatherStatsWithCounts算子精度
    Merge pull request !2971 from wuxiankun/bngswc16
同步1.8.1 8937dfc7728adc20d3e5a8f8e6907a37361dd7d0
    !2968 argmin算子适配
    Merge pull request !2968 from 沈鹏程/1.8_Argmin
--
    !2976 【支持3.9】pytorch1.8.1支持python3.9环境编包
    Merge pull request !2976 from 李超/pytorch1.8.1
2022-01-04 23:00:49 +08:00
AtlasAccount 8ef0a73f52 同步1.5.0 4aefefb8b34ba797713af6cea714fd3607fb3fd3
!2964 bugfix   处理   由于输出shape为空,导致模型报错问题
    Merge pull request !2964 from 沈鹏程/bug_fix1
同步1.8.1 b59213c0dad6f3384b4556683c023011f8fe1417
2021-12-31 23:00:47 +08:00
AtlasAccount fb4a88b4df 同步1.5.0 8c5b04d0e2827d4ea72a29f79edaebe8cba38a40
!2960 回退:reduce_op 影响范围广,不能再公共层修改
    Merge pull request !2960 from shibo/master
同步1.8.1 b59213c0dad6f3384b4556683c023011f8fe1417
2021-12-31 12:00:49 +08:00
AtlasAccount dbc635ffd8 同步1.5.0 6fcdca5a55cf72fa4ea07518a9ffedf72d7ae813
!2956 bugfix   处理 由于输出为空shape,导致模型报错问题
    Merge pull request !2956 from 沈鹏程/bug_fix
--
    !2957 bugfix 处理 由于输出为空shape,导致模型报错问题
    Merge pull request !2957 from 沈鹏程/bug_fix1
--
    !2954 【Bugfix】SyncBNTrainingUpdate 支持5hd操作
    Merge pull request !2954 from wuxiankun/204tr204tr5synbcwit
同步1.8.1 b59213c0dad6f3384b4556683c023011f8fe1417
    !2910 All算子适配
    Merge pull request !2910 from 沈鹏程/1.8_all
2021-12-30 23:00:47 +08:00
AtlasAccount 341a0d458e 同步1.5.0 b703cc7e3e21142ce0210f36f9b339e82a79bb92
!2948 【功能优化】队列执行接口增加RECORD_HOST_FUNCTION
    Merge pull request !2948 from 蒋荣强/master
同步1.8.1 ca365306224b30011046732c31a9766a3fcd608a
2021-12-30 12:00:49 +08:00
AtlasAccount 30dea0aa6b 同步1.5.0 15f933e18f5c64b5e1f4f2e46ab6ea59ac0caa85
!2949 修复bug,图模式set option之前先check option长度
    Merge pull request !2949 from wangyu/master
--
    !2945 【性能优化】增大release queue的size,避免队列归一后出现release queue满队列
    Merge pull request !2945 from 蒋荣强/ReleaseQueue
同步1.8.1 ca365306224b30011046732c31a9766a3fcd608a
2021-12-29 23:00:49 +08:00
AtlasAccount 9e457706a6 同步1.5.0 3589de64c034ae33997c1951003db08fb167f751
!2942 E2E prof:ut修改
    Merge pull request !2942 from shibo/e2e_bugfix
同步1.8.1 ca365306224b30011046732c31a9766a3fcd608a
2021-12-29 12:01:04 +08:00
AtlasAccount 9541c9b673 同步1.5.0 e08b3ae490cd0a3f0e358caa3a2a7f3b453e5708
!2932 modify:logical_and适配支持更多dtype类型输入
    Merge pull request !2932 from 郭夏/logical_and
--
    !2929 SyncBatchNorm: 修改命名、修复codecheck
    Merge pull request !2929 from 袁舰/master
--
    !2880 modify: upsample_trilinear3d正反向支持FP16输入
    Merge pull request !2880 from 郭夏/upsample_trilinear3d
同步1.8.1 ca365306224b30011046732c31a9766a3fcd608a
2021-12-28 23:00:44 +08:00
AtlasAccount ec8cc698f9 同步1.5.0 03c06784b9377d170df34173012e6f1e5d752161
!2939 合并dev分支
    Merge pull request !2939 from weili10/dev
--
    !2938 整理环境变量UT_FAST_MODE
    Merge pull request !2938 from 龚俊强/master
同步1.8.1 ca365306224b30011046732c31a9766a3fcd608a
    !2884 1.8.1 __And__算子适配
    Merge pull request !2884 from 孙幸/1.8_And
2021-12-27 23:00:51 +08:00
AtlasAccount 886e7defe3 同步1.5.0 53d356a5e5ddd64ea7f02df1d6ae4d6e6415962a
!2937 【modify】celu底层算子IR修改,pytorch同步修改
    Merge pull request !2937 from 王晓/celu
--
    !2935 修改test\test_npu目录下import语句
    Merge pull request !2935 from 龚俊强/master
--
    !2936 【图模式】图模式走GE的推理模式
    Merge pull request !2936 from 宇世康/master
同步1.8.1 b034ed3575df353a16ddfce2345c751982a02b3f
    !2909 Any算子适配
    Merge pull request !2909 from 沈鹏程/1.8_adaption
--
    !2922 1.8.1 addbmm+bmm算子适配
    Merge pull request !2922 from 孙幸/1.8_addbmm
2021-12-25 23:02:04 +08:00
AtlasAccount 8d079ca335 同步1.5.0 e7dbd0e1c5cc7020b673d836e8f7b0bfb0273b14
!2919 修复codexdex问题
    Merge pull request !2919 from 周司南/master
同步1.8.1 de23fbe927c2cf47ea37da06a001735b3cc65904
2021-12-23 23:01:00 +08:00
AtlasAccount dd58af6101 同步1.5.0 44c3eb40a822b553a7c7e4c86856f6dfaab1d247
!2916 SyncBatchNorm: NPU支持SyncBatchNorm特性
    Merge pull request !2916 from 袁舰/master
--
    !2925 embeding_bag正向host cpu处理&增加测试用例
    Merge pull request !2925 from 牛作东/emb_new
--
    !2923 【BugFix】SyncBn相关算子在混合精度的异常dtype问题修改
    Merge pull request !2923 from wuxiankun/syncbnfix
--
    !2914 bugfix:修复安全问题,对于nullptr检查
    Merge pull request !2914 from shibo/fix_null
--
    !2913 bugfix: cann prof在start时需要同步,保证device上算子全部执行完成
    Merge pull request !2913 from shibo/cann_fix
同步1.8.1 de23fbe927c2cf47ea37da06a001735b3cc65904
2021-12-22 23:01:08 +08:00
AtlasAccount b3a172415b 同步1.5.0 7e61d03b1349f162b348f5a16676252377fb56e1
!2891 【适配】自定义接口npu_rotated_box_encode和npu_rotated_box_decode适配
    Merge pull request !2891 from 陈庆/rotated_box
--
    !2905 bugfix  adapt RotatedIou
    Merge pull request !2905 from 沈鹏程/adaptIR
同步1.8.1 de23fbe927c2cf47ea37da06a001735b3cc65904
2021-12-21 23:00:48 +08:00
AtlasAccount 35c09c5858 同步1.5.0 95f1549a1eadb6c7c7e55033aaaa75810b5ce3aa
!2896 UT全量测试加入test_graph_mode test_dynamic_ops等目录下的用例
    Merge pull request !2896 from 龚俊强/master
同步1.8.1 de23fbe927c2cf47ea37da06a001735b3cc65904
    !2890 1.8.1 __Rshift__算子适配
    Merge pull request !2890 from 孙幸/1.8_Rshift
2021-12-21 12:00:51 +08:00
AtlasAccount da90916ab0 同步1.5.0 52e8bc75379dc3079e31ccbeb65ccebc3a80f191
!2897 embedding_bag_backward_npu hostcpu适配实现
    Merge pull request !2897 from 牛作东/master
--
    !2901 合并dev分支
    Merge pull request !2901 from weili10/dev
--
    !2904 python3.9环境jit index parsing告警解除
    Merge pull request !2904 from 李超/master
--
    !2902 修复E2E prof多次调用的问题
    Merge pull request !2902 from shibo/e2e_bugfix
同步1.8.1 f9f494b14ca91bbf236f99f78aef3927c7c3cdab
2021-12-20 23:24:47 +08:00
i-robot 12364d5728 !85 迭代3 需求
Merge pull request !85 from liuquan/master
2021-12-20 07:44:53 +00:00
liuquan eec0f1d6e1 quick start 2021-12-20 11:15:43 +08:00
AtlasAccount 8efe0da55e 同步1.5.0 9b0a379565e3d54a388600c587bc706356778d22
!2895 【FixUp】`Div`算子替换为`RealDiv`,满足int32下的负数的小数位处理
    Merge pull request !2895 from wuxiankun/RealDiv
同步1.8.1 f9f494b14ca91bbf236f99f78aef3927c7c3cdab
    !2881 1.8.1算子适配:index_select
    Merge pull request !2881 from 王晓/1.8_index_select_1
2021-12-18 23:01:13 +08:00
AtlasAccount 86b2def4fc 同步1.5.0 da86ec1bc3c86cfc584d4b5e94330a69367d1242
!2774 for potorch org test case
    Merge pull request !2774 from 邱彬/master
同步1.8.1 db9b820f4aba41894f26e187a67450e4b2064a4c
2021-12-17 23:00:55 +08:00
AtlasAccount 86c8e6deb9 同步1.5.0 3caf6d087849ae99931af5393a5c0c747e1330a6
!2794 【Issue】】Silu支持inplace
    Merge pull request !2794 from wuxiankun/issue1.0
--
    !2775 补充ut测试用例
    Merge pull request !2775 from 王夏夏/master
同步1.8.1 db9b820f4aba41894f26e187a67450e4b2064a4c
2021-12-16 23:02:06 +08:00
AtlasAccount e966169b78 同步1.5.0 704b98e1c093599b549fc69004270956af73b6b9
!2749 【Requirement】SyncBatchnorm内部接口算子batch_norm_gather_stats_with_counts适配
    Merge pull request !2749 from wuxiankun/bngswc
--
    !2874 prof增加UT用例
    Merge pull request !2874 from shibo/e2e_ut
--
    !2876 bugfix:修复profiler可能多次初始化错误
    Merge pull request !2876 from shibo/master
同步1.8.1 db9b820f4aba41894f26e187a67450e4b2064a4c
2021-12-16 12:02:47 +08:00
AtlasAccount 504fa67da2 同步1.5.0 d3724a9f1132ddb957773d154b801584903caa18
!2865 [Requirement] 模型需求 rotated_iou算子adapt
    Merge pull request !2865 from 沈鹏程/adaptIR
--
    !2882 Task: clean codecheck warnings
    Merge pull request !2882 from 赵光灿/master
同步1.8.1 db9b820f4aba41894f26e187a67450e4b2064a4c
2021-12-15 23:03:23 +08:00
AtlasAccount 37ee6fafaa 同步1.5.0 f1e3ae1004dd8b609c2c1ab4062a4769d31202c2
!2855 【Optim&reFactor】addcdivfp16转fp32提高精度优化
    Merge pull request !2855 from wuxiankun/addcdiv16
--
    !2856 【FixBug】BatchNormBackwardReduce针对未定义时tensor的问题修复
    Merge pull request !2856 from wuxiankun/bnwcbug
--
    !2878 【fixbug】加入空实现修复cpu编译
    Merge pull request !2878 from wuxiankun/bertadam
--
    !2852 bug: 修改batchnorm推理失败错误问题
    Merge pull request !2852 from 郭夏/bntrainingupdate
同步1.8.1 db9b820f4aba41894f26e187a67450e4b2064a4c
    !2863 【fixbug】修复1.8.1 ne重复分发的问题
    Merge pull request !2863 from 王晓/pytorch1.8.1
--
    !2879 clean codecheck warnings
    Merge pull request !2879 from 龚俊强/pytorch1.8.1
2021-12-14 23:02:11 +08:00
AtlasAccount cb11345fbe 同步1.5.0 fd0700df1eca64d01571072bb51d56143e3efde3
!2877 单元测试算子出错时加入resnet18测试
    Merge pull request !2877 from 龚俊强/master
--
    !2873 【适配】自定义接口npu_nms_rotated适配
    Merge pull request !2873 from 陈庆/nms
--
    !2871 Task: clean codecheck warnings
    Merge pull request !2871 from 赵光灿/master
同步1.8.1 558f739f09d9f9422ec0f8e283c9f80ab62b42e5
    !2872 删除pytorch181 test/test_npu/目录下重复的testcase
    Merge pull request !2872 from 龚俊强/pytorch1.8.1
--
    !2870 Feature: add NPU AMP testcases
    Merge pull request !2870 from 赵光灿/pytorch1.8.1
2021-12-14 12:00:47 +08:00
AtlasAccount 166c725588 同步1.5.0 5a25bc8c316500e25ec05872fab20c11263300bf
!2840 【适配】解决upsample_nearest1d不支持fp16场景
    Merge pull request !2840 from 陈庆/upsample
--
    !2848 E2E prof刷新:使用rangeStart方式代替push和pop
    Merge pull request !2848 from shibo/fix_e2e
--
    !2861 cann prof: bugfix
    Merge pull request !2861 from shibo/master
同步1.8.1 b43c20ebdc1a9654362128a1e0c026592997cbb3
2021-12-11 23:02:29 +08:00
AtlasAccount 4f4eaecb7f 同步1.5.0 ffe6546441045daf30e2160d9dedc3f804b9f256
!2868 回退 Pull Request !2828 : 【BugFix】adaptive_max_pool2d更换底层算子
    Merge pull request !2868 from shibo/revert-merge-2828-master
--
    !2867 回退 Pull Request !2833 : 【FixBug】max_pool2d泛化增强
    Merge pull request !2867 from shibo/revert-merge-2833-master
同步1.8.1 b43c20ebdc1a9654362128a1e0c026592997cbb3
2021-12-11 12:01:24 +08:00
liuquan 4603744324 updata 2021-12-10 17:05:42 +08:00
liuquan 501c17aade remove PyTorch API 2021-12-10 16:57:30 +08:00
liuquan b998cd272d updata API 2021-12-10 16:12:35 +08:00
i-robot bed57e03c3 !84 添加开源社区贡献文档CONTRIBUTING.zh.md
Merge pull request !84 from shibo/add_docs
2021-12-10 02:32:04 +00:00
AtlasAccount 1cba4e9e8c 同步1.5.0 9af15479e7efd03da611ca897f106bd8d86980bb
!2846 【图模式】修改编译选项option配置+使用data构图避免重复编译
    Merge pull request !2846 from 王强/master
--
    !2833 【FixBug】max_pool2d泛化增强
    Merge pull request !2833 from 王晓/max_pool2d
--
    !2854 [bugfix] 更改HCCL编译依赖so版本
    Merge pull request !2854 from 李超/master
--
    !2828 【BugFix】adaptive_max_pool2d更换底层算子
    Merge pull request !2828 from 王晓/adaptive_max_pool2d
--
    !2829 添加开源社区贡献文档CONTRIBUTING.zh.md
    Merge pull request !2829 from 周司南/master
同步1.8.1 b43c20ebdc1a9654362128a1e0c026592997cbb3
2021-12-09 23:00:58 +08:00
liuquan ad7017491b pytorch 2021-12-09 14:32:24 +08:00
AtlasAccount 548d08f5e9 同步1.5.0 3e3d5c3c32363c2dedbcaaeabe8f4724c3e179b3
!2842 concat算子使用静态算子
    Merge pull request !2842 from shibo/fix_queue
--
    !2801 delete unnecessary check, refactor env.sh
    Merge pull request !2801 from weili10/master
同步1.8.1 b43c20ebdc1a9654362128a1e0c026592997cbb3
    !2830 Feature: AMP in pytorch 1.8.1 adapt to NPU
    Merge pull request !2830 from 赵光灿/pytorch1.8.1
2021-12-09 12:00:43 +08:00
shibo 0d362b2572 Merge branch 'master' of gitee.com:ascend/pytorch into add_docs 2021-12-09 03:59:02 +00:00
shibo19 194352fe9e fix 2021-12-09 11:52:05 +08:00
liuquan c718961328 updata 2021-12-09 11:12:45 +08:00
AtlasAccount 67407fd00e 同步1.5.0 a067a49a8bf60af93c787eb092e646d6b3333ed2
!2823 modify: 修改BNTrainingUpdate算子mean和var在FP32时也进行强转FP32导致性能损失问题
    Merge pull request !2823 from 郭夏/bntrainingupdate
--
    !2841 AOE接口更新:dump接口opt参数仅支持nullptr
    Merge pull request !2841 from shibo/aoe_bugfix
同步1.8.1 c915e5ba3fe0831340ef817ec3fcad27fa5151c9
2021-12-08 23:01:13 +08:00
liuquan fad4a75b37 updata 2021-12-08 22:07:31 +08:00
liuquan 035121e1fb updata 2021-12-08 21:30:55 +08:00
shibo19 82d7341955 update 2021-12-08 16:43:36 +08:00
AtlasAccount 8cd641382e 同步1.5.0 4d9ff332ada3bc91bf37c4aaa97725040472d6fa
!2836 AOE接口更新
    Merge pull request !2836 from shibo/aoe_update
--
    !2751 【适配】LSTM双层双向场景适配
    Merge pull request !2751 from 陈庆/lstm_bi
同步1.8.1 c915e5ba3fe0831340ef817ec3fcad27fa5151c9
2021-12-08 12:00:43 +08:00
liuquan c6648343a7 updata 2021-12-08 10:11:23 +08:00
AtlasAccount 89a7a12a03 同步1.5.0 581620286789c28cb32617bd256ca57ecc925a90
!2805 【Optim】ApplyAdamV2算子侧有增强,适配层同步修改接口
    Merge pull request !2805 from wuxiankun/adalm
--
    !2826 Task: clean codecheck warnings
    Merge pull request !2826 from 赵光灿/master
--
    !2813 [非连续优化]-clone公共层耗时优化+转连续UT
    Merge pull request !2813 from 李超/cont_git1202-1
--
    !2811 modify: upsample_nearest3d支持FP16和6HD输入报错问题
    Merge pull request !2811 from 郭夏/upsample_nearest3d
同步1.8.1 c915e5ba3fe0831340ef817ec3fcad27fa5151c9
2021-12-07 23:00:56 +08:00
liuquan 4eba985a2f updata 2021-12-07 18:59:02 +08:00
liuquan ea8d8ad8c9 add code 2021-12-07 15:54:47 +08:00
liuquan 590e749dfe add pytorch train 2021-12-07 15:10:42 +08:00
AtlasAccount 6a949ada88 同步1.5.0 2b84dd37673a9c2588a4e8b9f296cdf70778511b
!2808 【BugFix】反向算子DynamicRNNGrad不支持指定direction,正向适配规避
    Merge pull request !2808 from 陈庆/lstm_direction
同步1.8.1 c915e5ba3fe0831340ef817ec3fcad27fa5151c9
2021-12-07 12:01:03 +08:00
AtlasAccount 40169ac353 同步1.5.0 bb6beaa95e6df9e0dc5499bc4cd360826ad846b2
!2791 【泛化】 gru支持batch_first参数
    Merge pull request !2791 from wuxiankun/optim2.0
--
    !2789 【1.5PT整改】整改PTUpsampleBilinear2dGrad
    Merge pull request !2789 from 李攀/bugfix
同步1.8.1 c915e5ba3fe0831340ef817ec3fcad27fa5151c9
    !2827 Task: clean codecheck warnings
    Merge pull request !2827 from 赵光灿/pytorch1.8.1
2021-12-06 23:00:55 +08:00
liuquan c13ed77bd6 updata API 2021-12-06 22:06:42 +08:00
shibo19 ea3dda5363 update 2021-12-06 17:37:02 +08:00
AtlasAccount d52329f755 同步1.5.0 41725bbf17d3b132f2f1ed13424c9e13f2770021
!2812 修复conv3d梯度分布式计算错误问题
    Merge pull request !2812 from lijing/master
--
    !2796 【Optim】SyncBatchNormBackwardReduce代码优化
    Merge pull request !2796 from wuxiankun/optim1.0
同步1.8.1 b668ec453ef4392fdb0585fd2d72756a0122f15c
    !2825 删除test/test_npu/目录下重复的testcase
    Merge pull request !2825 from 龚俊强/pytorch1.8.1
2021-12-06 12:00:42 +08:00
liuquan 9a2ffe7dc5 add pytorch 1.8.1 API 2021-12-06 11:25:29 +08:00
AtlasAccount 6102b560d4 同步1.5.0 02bce90c89c8ff9abd9973b6d2d7e097de46c858
!2822 taskqueue场景下release para不使用queue
    Merge pull request !2822 from shibo/fix_queue
同步1.8.1 438c8daf58550d882e8b4763910cc93b927d89f7
2021-12-05 23:01:03 +08:00
AtlasAccount a704d91840 同步1.5.0 f49cdb77ff1e8d8cca32a89097573208ee2cb1b8
!2819 [BugFix] 判断内存重叠是转换顺序,防止storage()为空
    Merge pull request !2819 from 宇世康/master
同步1.8.1 438c8daf58550d882e8b4763910cc93b927d89f7
2021-12-04 23:00:46 +08:00
liuquan 4dadfcf404 support python3.9 2021-12-04 15:51:23 +08:00
i-robot 643cc072eb !83 刷新readme
Merge pull request !83 from shibo/add_docs
2021-12-04 02:38:07 +00:00
AtlasAccount dc69d5441d 同步1.5.0 32cd40c1dd233f893dae2d351fac072cb4a0ffd9
!2806 【性能优化】scalar输入改成ACL_MEMTYPE_HOST_COMPILE_INDEPENDENT输入
    Merge pull request !2806 from 蒋荣强/scalar
同步1.8.1 438c8daf58550d882e8b4763910cc93b927d89f7
2021-12-03 23:00:55 +08:00
AtlasAccount 12e6d9f07a 同步1.5.0 aec197c05caa58c118810b9cc57069752966b9c0
!2804 modify: Bernoulli AICPU算子启用第2个流修改(参照dropout)
    Merge pull request !2804 from 郭夏/bernoulli
同步1.8.1 438c8daf58550d882e8b4763910cc93b927d89f7
2021-12-03 12:00:43 +08:00
AtlasAccount f6b284d021 同步1.5.0 b087ec154910da641e1e40b97ce3dde8f742d0c3
!2782 modify: batchnorm 支持FP16参数输入
    Merge pull request !2782 from 郭夏/bntrainingupdate
--
    !2807 删除test/test_npu/目录下重复的testcase
    Merge pull request !2807 from 龚俊强/master
--
    !2803 Task: clean codecheck warnings
    Merge pull request !2803 from 赵光灿/master
同步1.8.1 438c8daf58550d882e8b4763910cc93b927d89f7
2021-12-02 23:00:53 +08:00
shibo19 b87b437702 update readne 2021-12-02 09:39:32 +08:00
AtlasAccount 38675dbea0 同步1.5.0 4b53265e607eb120b4b1c7924014c5d45561632c
!2763 【性能优化】入队列优化
    Merge pull request !2763 from 蒋荣强/enqueue
--
    !2772 增加E2E profiling功能
    Merge pull request !2772 from shibo/e2e_better
同步1.8.1 438c8daf58550d882e8b4763910cc93b927d89f7
2021-12-01 23:00:51 +08:00
AtlasAccount e9a794a491 同步1.5.0 b08d8f7bbfa236bc413a16d0d2f8c8c086c3d654
!2798 【需求】【1.8反合1.5】1.8版本增加NPU独有算子反合1.5版本
    Merge pull request !2798 from 姚斌/master
同步1.8.1 438c8daf58550d882e8b4763910cc93b927d89f7
2021-12-01 12:00:44 +08:00
AtlasAccount 141d1b4c51 同步1.5.0 18dad28e5f25f2334f456aaf6d5f32680bccff25
!2784 提交图模式 test_contiguous ut 测试代码
    Merge pull request !2784 from 薛磊/test_nllloss
--
    !2776 Task: clean codecheck warnings
    Merge pull request !2776 from 赵光灿/master
--
    !2797 graph mode ut code style 3
    Merge pull request !2797 from 薛磊/pr_ut_1130
--
    !2767 modify: std规避ReduceStdWithMean算子输入0维或者1维1个元素时报错的问题
    Merge pull request !2767 from 郭夏/std_modify
--
    !2795 graph mode ut code style 2
    Merge pull request !2795 from 薛磊/pr_ut_code_check_v2
同步1.8.1 438c8daf58550d882e8b4763910cc93b927d89f7
2021-11-30 23:00:47 +08:00
AtlasAccount 9961ec03ae 同步1.5.0 58174932de2d5809cc64768eb3c43ea2bf981618
!2760 【优化】Div适配优化
    Merge pull request !2760 from 吴贤坤/fixbug5.0
同步1.8.1 438c8daf58550d882e8b4763910cc93b927d89f7
2021-11-30 12:00:58 +08:00
i-robot e8e641b331 !82 刷新docs文档:提示切换分支
Merge pull request !82 from shibo/add_docs
2021-11-30 01:50:08 +00:00
AtlasAccount eb29fd3e36 同步1.5.0 5185b6cbd85176ff1854db1ed80ef1c87147a3b0
!2786 【图模式】Run图接口添加RecordHostFunc,记录耗时
    Merge pull request !2786 from 宇世康/master
--
    !2792 PR门禁脚本改为运行test/test_npu/XXX/目录下脚本
    Merge pull request !2792 from 龚俊强/master
--
    !2788 graph mode ut code style
    Merge pull request !2788 from 薛磊/test_code_check
--
    !2755 【Bugfix】grid_sampler2d修改test_batchnormbackwardreduce脚本参数名修改重构
    Merge pull request !2755 from 吴贤坤/fixbug4.0
同步1.8.1 438c8daf58550d882e8b4763910cc93b927d89f7
    !2790 Task: clean codecheck warnings
    Merge pull request !2790 from 赵光灿/pytorch1.8.1
--
    !2773 1.8.1算子适配:ge,le
    Merge pull request !2773 from 王晓/1.8_ge_le_gt_lt
2021-11-29 23:00:45 +08:00
i-robot 0c5c61e3bc !81 Added README.en.md.
Merge pull request !81 from yanhuiling/master
2021-11-29 11:22:14 +00:00
shibo19 3708204f40 update docs 2021-11-29 10:55:12 +08:00
AtlasAccount fbdf33ddd0 同步1.5.0 2e9004844c45a4ef97f1642ec3ed395451115879
!2781 【Patch】gru bias bug 修复补丁
    Merge pull request !2781 from 吴贤坤/grupatch
--
    !2778 [Feature] 支持python3.9
    Merge pull request !2778 from 李超/py39
同步1.8.1 c2fd32bc49a6ce4170114c122a503d1c92589716
2021-11-27 12:00:47 +08:00
AtlasAccount 676978f973 同步1.5.0 ce7a96cd1f0d4ea0cc24bb1b134e534aca6c3ca9
!2783 nllloss2d 修改调用接口,删除老接口
    Merge pull request !2783 from 薛磊/dev_nllloss
--
    !2780 删除图模式contiguous, pow相关用例
    Merge pull request !2780 from 薛磊/del_contiguous
--
    !2771 解决图模式下 nllloss 适配层内存拷贝问题
    Merge pull request !2771 from 薛磊/pr_calcu_nllloss
--
    !2732 图模式ut
    Merge pull request !2732 from 薛磊/ut_graph
--
    !2779 【图模式】修复is graph mode接口的double free问题
    Merge pull request !2779 from 宇世康/master
--
    !2769 【图模式】 去除图模式的abi为1的依赖,需要等cann包更新后合入
    Merge pull request !2769 from 宇世康/ysk
同步1.8.1 c2fd32bc49a6ce4170114c122a503d1c92589716
2021-11-26 23:02:48 +08:00
AtlasAccount 6ff723d026 同步1.5.0 528664affa111c3976ff6a72ab9befa42ff96fef
!2713 【optimize】3d 类模型格式转换优化
    Merge pull request !2713 from 李超/3d_transdata
--
    !2727 add test case for the cross-device copy check
    Merge pull request !2727 from weili10/master
--
    !2761 Task: clean codecheck warnings
    Merge pull request !2761 from 赵光灿/master
同步1.8.1 c2fd32bc49a6ce4170114c122a503d1c92589716
    !2770 【BugFix】【需求】NPU独有算子适配apply_adam_out_npu、bert_apply_adam_out_npu
    Merge pull request !2770 from 姚斌/pytorch1.8.1
--
    !2762 Task: clean codecheck warnings
    Merge pull request !2762 from 赵光灿/pytorch1.8.1
2021-11-25 23:00:47 +08:00
AtlasAccount 184db237b1 同步1.5.0 841a9a8d082265efd5649d0d9c7cf050ea9379aa
!2748 [Requirement] 模型需求 rotated_overlaps算子adapt
    Merge pull request !2748 from 吴贤坤/rto
同步1.8.1 b220e1bfda03c88c7a5d72322e2fe2b68794149e
2021-11-25 12:00:51 +08:00
AtlasAccount df03cbe8d6 同步1.5.0 0941c08390a26f4ab4627f73371adf4bdd49b7c1
!2766 【优化】Dropout适配优化
    Merge pull request !2766 from 陈庆/drop
--
    !2753 修改PR门禁以及全量UT测试的判错标准
    Merge pull request !2753 from 龚俊强/master
--
    !2758 [contrib/npu/optimized_lib/] avoid warning
    Merge pull request !2758 from 王姜奔/master
--
    !2768 【图模式】set graph mode varibale mem max size to 1M
    Merge pull request !2768 from 王强/master
同步1.8.1 b220e1bfda03c88c7a5d72322e2fe2b68794149e
2021-11-24 23:00:47 +08:00
yanhuiling 02b5954125 added README.en.md.
added  README.en.md.
2021-11-24 14:05:14 +00:00
AtlasAccount c3723c6db0 同步1.5.0 5655fb8d0be5580b7870c5e8ec65f3ac2e9197a8
!2754 modify: 调用dot时修改为直接调用NPU函数,保证模糊编译能够正常运行
    Merge pull request !2754 from 郭夏/matmul
--
    !2757 【图模式】图模式与单算子模式都在empty与empty with format中将storage添加入context中
    Merge pull request !2757 from 宇世康/master
--
    !2756 【图模式】bugfix of switch between graph mode and single-op mode
    Merge pull request !2756 from 王强/master
同步1.8.1 b220e1bfda03c88c7a5d72322e2fe2b68794149e
2021-11-24 12:04:05 +08:00
AtlasAccount 2125edf662 同步1.5.0 57fb197351ff3087282bd37a01da3d2f59f67491
!2734 dump图以支持aoe功能
    Merge pull request !2734 from shibo/aoe
同步1.8.1 b220e1bfda03c88c7a5d72322e2fe2b68794149e
2021-11-23 23:00:48 +08:00
liuquan 273ab333eb GPU dump NPU load 2021-11-23 19:46:23 +08:00
AtlasAccount e698adf379 同步1.5.0 482cf5c72cbb3b52ebf4a626566aeaa6da014824
!2750 【FixBug】修复mse_loss在非nd场景下的报错
    Merge pull request !2750 from 王晓/mseloss
同步1.8.1 b220e1bfda03c88c7a5d72322e2fe2b68794149e
2021-11-23 12:00:42 +08:00
AtlasAccount 172a8154f8 同步1.5.0 49dfa00e664e205b94843572ac10064546583660
!2744 [acl profiling]兼容msprof,对msprof已经运行的错误不做处理
    Merge pull request !2744 from lijing/master
--
    !2729 【适配】npu_min接口适配
    Merge pull request !2729 from 陈庆/minv1
同步1.8.1 b220e1bfda03c88c7a5d72322e2fe2b68794149e
2021-11-22 23:01:02 +08:00
AtlasAccount e6c9ed0c77 同步1.5.0 774fb0bd7f1e7c30f18517e3ef5f41a7dc4761d6
!2730 【性能优化】优化出队列间隙耗时
    Merge pull request !2730 from 蒋荣强/optimize1
--
    !2743 跨so调用增加TORCH_NPU_API维护GraphExecutor单例
    Merge pull request !2743 from 宇世康/master
--
    !2741 【图模式】原地算子中,内存overlap判断情形增加IS_NULL
    Merge pull request !2741 from 宇世康/master
同步1.8.1 b220e1bfda03c88c7a5d72322e2fe2b68794149e
2021-11-19 23:01:33 +08:00
liuquan 30951b3eda update 2021-11-19 16:25:27 +08:00
weili10 d938e07a73 update README.zh.md. 2021-11-19 08:17:21 +00:00
weili10 8a5c0b30a1 update README.zh.md. 2021-11-19 08:14:41 +00:00
weili10 262d785419 update README.zh.md. 2021-11-19 08:14:05 +00:00
AtlasAccount cebdde8f48 同步1.5.0 fbee31be058af34c021da0f152d128ecf5e86c5d
同步1.8.1 b220e1bfda03c88c7a5d72322e2fe2b68794149e
    !2740 【bugfix】【需求】【1.8NPU独有算子适配整改】npu_bert_apply_adam
    Merge pull request !2740 from 姚斌/pytorch1.8.1
2021-11-19 00:41:55 +08:00
AtlasAccount e9257ed887 同步1.5.0 fbee31be058af34c021da0f152d128ecf5e86c5d
!2728 【功能修复】解决event入队列后的死锁问题
    Merge pull request !2728 from 蒋荣强/bug1
--
    !2677 graph mode cat和stack代码适配修改
    Merge pull request !2677 from 薛磊/dev_cat_stack
同步1.8.1 63b24dfd62f070475f36d43df01a74181ce90aa5
2021-11-18 19:54:32 +08:00
i-robot e420c35be6 !80 需求合入
Merge pull request !80 from liuquan/master
2021-11-18 09:27:43 +00:00
weili10 c5581b6189 update OWNERS. 2021-11-18 09:26:13 +00:00
AtlasAccount f44d2a8710 同步1.5.0 241bab3b3b873e4219bacf244e178e88abe85994
!2737 增加一些图模式需要的函数打桩+修复cuda版本的编译问题
    Merge pull request !2737 from 宇世康/master
--
    !2736 【图模式pr】view and contiguous changes of graph mode
    Merge pull request !2736 from 王强/master
--
    !2731 【Bugfix】LSTM反向梯度丢失
    Merge pull request !2731 from 陈庆/master
同步1.8.1 63b24dfd62f070475f36d43df01a74181ce90aa5
2021-11-18 12:00:45 +08:00
AtlasAccount 4eb5bbd3fe 同步1.5.0 a79fa0808e178fe36ee49ae22d874fa5cfa15bff
!2724 【图模式PR_2】pr_2的主要修改是融合GraphCommandImpl到OpCommandBase中,接管Opcmd的接口,在不改变单算子适配的情况下使能图构造
    Merge pull request !2724 from 宇世康/graph_mode
--
    !2725 fix broadcast opt verification conditions, avoid incorrect recognition of expand + view
    Merge pull request !2725 from 王强/master
同步1.8.1 63b24dfd62f070475f36d43df01a74181ce90aa5
2021-11-17 16:09:04 +08:00
AtlasAccount 0c58e128e7 同步1.5.0 cd7987730df2e98d4d725ddbee973db7645c656a
!2726 【功能修复】开启queue后删除oom保护机制
    Merge pull request !2726 from 蒋荣强/bug
--
    !2719 【FixBug】AICPU算子upsample_nearest3d正反向支持fp16
    Merge pull request !2719 from 王晓/up_n3d_b
同步1.8.1 63b24dfd62f070475f36d43df01a74181ce90aa5
    !2702 【需求】【1.8NPU独有算子适配】npu_bert_apply_adam、npu_apply_adam
    Merge pull request !2702 from 姚斌/pytorch1.8.1
--
    !2722 add cross-device copy check
    Merge pull request !2722 from weili10/pytorch1.8.1
2021-11-16 23:22:38 +08:00
AtlasAccount 0e1d68761b 同步1.5.0 73424f02c30a6800cf967c23920a27e5f4fbc212
!2721 add cross-device copy check
    Merge pull request !2721 from weili10/master
同步1.8.1 07edd5926b30109419e105521bc675f55ae0e3f6
2021-11-16 12:00:53 +08:00
AtlasAccount e161be6f75 同步1.5.0 474fcee57578ecb93985b22b3b50aff461250fd2
!2716 【图模式】 PR_1 :增量修改,增加图构造,图执行,图缓存的能力以及增加pytorch层的四个接口
    Merge pull request !2716 from 宇世康/graph_mode
同步1.8.1 07edd5926b30109419e105521bc675f55ae0e3f6
2021-11-16 10:11:52 +08:00
AtlasAccount 40e0982fe4 同步1.5.0 e0da7d2e6931d71edb7bbcba6d68d3d12f1bd20f
!2709 [contrib/npu/optimized_lib/] add SiLU
    Merge pull request !2709 from 王姜奔/silu
--
    !2714 【功能修复】解决record event入队列后,event资源延迟释放导致的evnet资源耗尽问题
    Merge pull request !2714 from 蒋荣强/bug
--
    !2670 【Bugfix】 修改&补充test.constant_pad_nd测试用例
    Merge pull request !2670 from 吴贤坤/fixbug2.0
--
    !2711 【FixBug】修复mv在输入为转置tensor时报错的问题
    Merge pull request !2711 from 王晓/mv
--
    !2712 调用aclopCompileAndExecute时判断gil锁是否被持有,持有的话释放。目的时防止TE编译算子时无法获取gil锁。
    Merge pull request !2712 from 宇世康/ysk
同步1.8.1 07edd5926b30109419e105521bc675f55ae0e3f6
2021-11-15 14:40:25 +08:00
liuquan 3a36da0345 modify IR2TBE 2021-11-13 17:44:27 +08:00
AtlasAccount 6a32513e71 同步1.5.0 226265063cfb50661352605720c96d09498e7564
!2697 【适配优化】constant_pad_nd性能优化
    Merge pull request !2697 from 陈庆/master
--
    !2695 【Bugfix】nll_loss输出格式修改
    Merge pull request !2695 from 吴贤坤/fixbug3.0
同步1.8.1 07edd5926b30109419e105521bc675f55ae0e3f6
2021-11-12 09:30:13 +08:00
AtlasAccount 3b92e80698 同步1.5.0 2f47f3a0304a181ecc4f75c6a36f329e6435b0b6
!2672 【Requirement】Gru多层双向功能适配补充
    Merge pull request !2672 from 吴贤坤/gru
--
    !2704 add: bincount for 1.5.1
    Merge pull request !2704 from 郭夏/bincount
--
    !2674 【FixBug】softmax_backward移除多余格式转换
    Merge pull request !2674 from 王晓/softmax_backward_nz
同步1.8.1 07edd5926b30109419e105521bc675f55ae0e3f6
    !2599 add:  erf op for ver 1.8.1
    Merge pull request !2599 from 郭夏/erf
2021-11-11 12:00:45 +08:00
AtlasAccount 127ddaeb87 同步1.5.0 ee9cf0fbc27e260173c16ce55a829f477e51f84f
同步1.8.1 120ae5365ebb24137b534ce063c7d7dc7a408c61
    !2657 【1.8.1】适配“upsamplebilinear2d”
Merge: 1fb062334 049b1e4f2
    !2662 【1.8.1】适配“Scatter_”
    Merge pull request !2662 from 李攀/do_1.8.1
--
    !2647 delete redundant check_match and invalid trans-contiguous code
    Merge pull request !2647 from weili10/pytorch1.8.1
2021-11-10 23:00:45 +08:00
AtlasAccount eb42aa1431 同步1.5.0 ee9cf0fbc27e260173c16ce55a829f477e51f84f
!2705 【性能优化】新增SCALAR_TO_HOST_MEM环境变量用于控制scalar输入的是否转为host memory
    Merge pull request !2705 from 蒋荣强/bug
同步1.8.1 a355a602d33f0fe3b65a627d9d0cf784309c1466
    !2700 bugfix: 修复profiler打印信息错误问题
    Merge pull request !2700 from shibo/profiler_bug
2021-11-10 20:46:37 +08:00
liuquan 3a1a239c76 modify format 2021-11-10 17:34:32 +08:00
liuquan 62c4f91fff modify format 2021-11-10 17:17:15 +08:00
liuquan ba0cdcc6f5 profiler 新增功能 2021-11-10 16:46:54 +08:00
AtlasAccount 9d8ba72c9b 同步1.5.0 7d56e9e47baa563428026b1315ea3e7155e29082
同步1.8.1 db8554c8db96ce9bac588aa6c0a9b6321482d76d
    !2696 【1.8算子适配】cdist、cdist_backward、pdist
    Merge pull request !2696 from 姚斌/pytorch1.8.1_1
2021-11-09 23:00:56 +08:00
AtlasAccount 77069c2c3e 同步1.5.0 7d56e9e47baa563428026b1315ea3e7155e29082
!2663 【图模式】Graph execute/construct/cache/utils功能以及正式python接口
    Merge pull request !2663 from 宇世康/master
同步1.8.1 c3ca90462e9c6d7cdefec410ce71b6d01ac76142
2021-11-09 12:00:50 +08:00
AtlasAccount 5510f37292 同步1.5.0 61e1a032928f4b80953bf4b130debba5f971a53d
!2699 修复RECORD_HOST_FUNCTION宏的bug,acl task queue线程也可以使用RECORD_HOST_FUNCTION
    Merge pull request !2699 from wangyu/master
--
    !2698  提供RECORD_HOST_FUNCTION宏,用于只记录host侧耗时
    Merge pull request !2698 from wangyu/master
--
    !2684 [dump utils] ThnnConvDepthwise2DBackward 在特定情况下仍然走cudnn
    Merge pull request !2684 from lijing/master
同步1.8.1 c3ca90462e9c6d7cdefec410ce71b6d01ac76142
    !2661 【1.8算子适配】softmax、true_divide
    Merge pull request !2661 from 姚斌/pytorch1.8.1
2021-11-08 23:00:44 +08:00
AtlasAccount 49aac16852 同步1.5.0 5dbbdd469a94c9e120360555c61fc66011478e26
同步1.8.1 87c1ee679055f052ab9a2bcdfc7bbfd065dd0ade
    !2642 【pytorch 1.8 算子适配】提交算子addmv、addr
    Merge pull request !2642 from TD_lihan/py18_addmv
--
    !2640 【pytorch 1.8 算子适配】提交算子adaptive_avg_pool1d
    Merge pull request !2640 from TD_lihan/py18_AdaptiveAvgPool1d
--
    !2604 【1.8算子迁移】卷积类修改等
    Merge pull request !2604 from 吴贤坤/conv_1.8
--
    !2654 增加profiler UT
    Merge pull request !2654 from shibo/profiler_ut
--
    !2668 【1.8算子适配】celu、selu
    Merge pull request !2668 from 姚斌/pytorch1.8.1_1
2021-11-08 12:00:45 +08:00
AtlasAccount 25b61ee2ee 同步1.5.0 5dbbdd469a94c9e120360555c61fc66011478e26
同步1.8.1 ddeb6df954cd6db748138cdd7d27e6d61de80b14
    !2683 1.8版本增加HCCL环境变量
    Merge pull request !2683 from shibo/add_env
--
    !2681 ddp在fp32场景下训练失败修复
    Merge pull request !2681 from shibo/dd_bugfix
--
    !2682 修复npu tensor类型转换丢失梯度属性问题
    Merge pull request !2682 from shibo/cast_bugfix
2021-11-06 16:37:10 +08:00
AtlasAccount 2ece9b72f6 同步1.5.0 5dbbdd469a94c9e120360555c61fc66011478e26
!2649 使用Identity代替Transdata
    Merge pull request !2649 from 詹隽/Identity_dev
--
    !2667 【性能优化】add record event to queue
    Merge pull request !2667 from 蒋荣强/RecordEvent
--
    !2660 1.5版本profiler功能优化
    Merge pull request !2660 from shibo/profiler_15
--
    !2658 【Bugfix】修改oom问题当调Conv3d时
    Merge pull request !2658 from 吴贤坤/fixbug
同步1.8.1 9702fe1349fd09e99d12a9d6799da5783da84663
    !2601 PyTorch1.8算子适配:uniform_
    Merge pull request !2601 from 牛作东/uniform_
2021-11-04 23:00:44 +08:00
AtlasAccount 2572775832 同步1.5.0 98d45fbd807b8bff03f51a05aedc3ac5efca29e3
!2666 Task: clean codecheck warnings
    Merge pull request !2666 from 赵光灿/master
同步1.8.1 80e9f656f8a2e05d80cd616847d7b7cb2586efc0
    !2645 Task: clean codecheck warnings
    Merge pull request !2645 from 赵光灿/pytorch1.8.1
2021-11-04 12:01:01 +08:00
AtlasAccount 500b51dd61 同步1.5.0 0a6f40ccd42088c4e0266ca62f22c3a1e1812ac7
同步1.8.1 b505d498eb6541469d8c8fdc07ed96c1a80f63c8
2021-11-03 12:01:11 +08:00
AtlasAccount bda7456cd9 同步1.5.0 0a6f40ccd42088c4e0266ca62f22c3a1e1812ac7
!2634 【1.5适配】“BatchNormBackwardElemt”
    Merge pull request !2634 from 李攀/bugfix
--
    !2629 东北大学TensorEqual算子适配测试文件交付
    Merge pull request !2629 from k188/TensorEqual
--
    !2650 Task: clean codecheck warnings
    Merge pull request !2650 from 赵光灿/master
同步1.8.1 b505d498eb6541469d8c8fdc07ed96c1a80f63c8
    !2655 【1.8算子适配】randperm、stack
    Merge pull request !2655 from 姚斌/pytorch1.8.1_1
--
    !2652 【1.8算子适配】std、std_mean、trunc
    Merge pull request !2652 from 姚斌/pytorch1.8.1
--
    !2646 【1.8.1】适配“maxunpool3d”
    Merge pull request !2646 from 李攀/do_1.8.1_2
--
    !2638 【pytorch 1.8 算子适配】提交算子abs
    Merge pull request !2638 from TD_lihan/py18_abs
--
    !2648 【1.8适配】“优化test_floatstatus.py”
    Merge pull request !2648 from 李攀/do_1.8.1
2021-11-03 09:39:32 +08:00
AtlasAccount 040029c1a1 同步1.5.0 58a86f5a7d8cfbb02dba057f04537b9e004f4593
同步1.8.1 cfa8827d1fb5c28878e856d6c5d1ec5f261ab206
2021-11-02 12:01:04 +08:00
AtlasAccount ec371989b4 同步1.5.0 58a86f5a7d8cfbb02dba057f04537b9e004f4593
!2641 Task: clean codecheck warnings
    Merge pull request !2641 from 赵光灿/master
--
    !2621 【算子适配】grid_sampler_2d算子正反向
    Merge pull request !2621 from 姚斌/master
--
    !2632 【Bugfix】算子不支持batch_first为True,适配层需将输出的Batch轴作为第0轴
    Merge pull request !2632 from 陈庆/master
同步1.8.1 cfa8827d1fb5c28878e856d6c5d1ec5f261ab206
    !2639 【pytorch 1.8 算子适配】提交算子acos
    Merge pull request !2639 from TD_lihan/py18_acos
--
    !2626 【1.8升级】L1Loss
2021-11-01 23:00:57 +08:00
liuquan ca59aaf3c6 修改格式 2021-11-01 18:42:41 +08:00
liuquan 78f946c17d 新增:IR映射TBE 2021-11-01 18:37:42 +08:00
AtlasAccount ef4e7240b6 同步1.5.0 790429b1a174b47714d38e7dd2b18a36bef01f83
同步1.8.1 1901c67035192c760ebdd32f422ea86fa40bf922
2021-10-31 23:00:50 +08:00
AtlasAccount 6ac16dfab0 同步1.5.0 790429b1a174b47714d38e7dd2b18a36bef01f83
同步1.8.1 1901c67035192c760ebdd32f422ea86fa40bf922
2021-10-31 12:00:49 +08:00
AtlasAccount 283e923317 同步1.5.0 790429b1a174b47714d38e7dd2b18a36bef01f83
!2637 异步拷贝入队列
    Merge pull request !2637 from 蒋荣强/async
--
    !2635 Task: clean codecheck warnings
    Merge pull request !2635 from 赵光灿/master
同步1.8.1 1901c67035192c760ebdd32f422ea86fa40bf922
    !2624 【适配】To/Rsub算子适配
    Merge pull request !2624 from 陈庆/pytorch1.8.1
--
    !2603 1.8算子迁移】ps_roi_pooling,npu_roi_align, npu_iou等
    Merge pull request !2603 from 吴贤坤/npu_fd_bd_1.8_bnms
--
    !2636 1.8版本优化profiler
    Merge pull request !2636 from shibo/profiler_simple
2021-10-30 23:02:03 +08:00
AtlasAccount e6e7203cce 同步1.5.0 caf3ceb04e4a115ce8d1498952c110fb4b9bc317
!2625 修改OpCommandBase中input和output接口参数
    Merge pull request !2625 from 薛磊/dev_opcommand_parameter
同步1.8.1 2bfd20f98a90ed25faa3a019ec42379e6e153b3e
2021-10-30 12:00:39 +08:00
AtlasAccount 6bb0e87a77 同步1.5.0 639610b805d6bc4abfe4ee632e6291aa48835d3c
!2630 Task: clean codecheck warnings
    Merge pull request !2630 from 赵光灿/master
同步1.8.1 2bfd20f98a90ed25faa3a019ec42379e6e153b3e
2021-10-29 23:00:56 +08:00
AtlasAccount 2497544a76 同步1.5.0 b1f4e771b0b6f736386bba9838e28edb0556e743
同步1.8.1 2bfd20f98a90ed25faa3a019ec42379e6e153b3e
    !2631 Task: clean codecheck warnings
    Merge pull request !2631 from 赵光灿/pytorch1.8.1
2021-10-29 12:00:48 +08:00
AtlasAccount ae597b5e21 同步1.5.0 b1f4e771b0b6f736386bba9838e28edb0556e743
同步1.8.1 c1fa09ac6f19542adfd7a1dded1561b1a0fb3fd9
    !2616 1.8.1算子tril、ne、eq适配迁移
    Merge pull request !2616 from 王晓/tril
--
    !2613 1.8.1算子triu适配迁移
    Merge pull request !2613 from 王晓/1.8.1_triu
2021-10-28 23:00:49 +08:00
AtlasAccount c0723277c4 同步1.5.0 b1f4e771b0b6f736386bba9838e28edb0556e743
同步1.8.1 ebba68383c462ce8351d6fc4c1f19b3039568925
2021-10-28 12:00:53 +08:00
AtlasAccount 64daba9637 同步1.5.0 b1f4e771b0b6f736386bba9838e28edb0556e743
同步1.8.1 ebba68383c462ce8351d6fc4c1f19b3039568925
2021-10-27 23:15:47 +08:00
AtlasAccount d9e50e3a9f 同步1.5.0 b1f4e771b0b6f736386bba9838e28edb0556e743
同步1.8.1 ebba68383c462ce8351d6fc4c1f19b3039568925
2021-10-27 12:00:50 +08:00
AtlasAccount 4dec0c82a1 同步1.5.0 b1f4e771b0b6f736386bba9838e28edb0556e743
!2622 solve input type mismatch problem of mul
    Merge pull request !2622 from 蒋荣强/scalar
同步1.8.1 ebba68383c462ce8351d6fc4c1f19b3039568925
    !2600 add:  exp op for 1.8.1
    Merge pull request !2600 from 郭夏/exp
--
    !2565 1.8.1适配“maxpool3d, smoothL1Loss, SoftMarginLoss”
    Merge pull request !2565 from 李攀/do_1.8.1_2
2021-10-26 23:00:52 +08:00
AtlasAccount e6b84a7986 同步1.5.0 bf7628c383f445fbdb4c95fb3aa002bff260a9f3
!2620 op proto for graph mode
    Merge pull request !2620 from 薛磊/dev_op_proto
--
    !2619 [dump utils]修复op map返回为空的问题
    Merge pull request !2619 from lijing/master
同步1.8.1 62372aba9b1c73f87ef30f87027886e93d960382
    !2617  【function】add python3.8 compiling to pytorch1.8
    Merge pull request !2617 from 李超/pytorch1.8.1
--
    !2612 【1.8算子迁移】tanh,sigmoidgrad等
    Merge pull request !2612 from 吴贤坤/backward_1.8
--
    !2610 【1.8适配】nllloss2dbackward
    Merge pull request !2610 from 李攀/do_1.8.1_5
--
    !2618 1.8版本profiling支持屏蔽适配层内算子
    Merge pull request !2618 from shibo/profiler_simple
--
    !2611 【1.8算子适配】min、mv、ones
    Merge pull request !2611 from 姚斌/pytorch1.8.1
2021-10-26 12:00:48 +08:00
i-robot f2e2a4168d !78 update the catalog of en docs
Merge pull request !78 from yinzijun/master
2021-10-26 01:32:56 +00:00
AtlasAccount 92f9e54783 同步1.5.0 081357bddfac9aafadf4c37cfbccffbe21e392fe
!2595 [dump utils]新增view类黑名单算子
    Merge pull request !2595 from lijing/master
--
    !2615 [contrib/npu/optimized_lib/] add giou
    Merge pull request !2615 from 王姜奔/giou
--
    !2614 dynamicShape: forbiden roialign and roialigngrad
    Merge pull request !2614 from 周司南/master
同步1.8.1 87920ba2ff21bb968a8e371f11dc4ba47b94a768
2021-10-25 23:00:45 +08:00
AtlasAccount 5d23983945 同步1.5.0 88bb20489508d6783c1d2816eb911dae21757f7a
同步1.8.1 87920ba2ff21bb968a8e371f11dc4ba47b94a768
2021-10-24 23:00:55 +08:00
AtlasAccount 0850d4e22a 同步1.5.0 88bb20489508d6783c1d2816eb911dae21757f7a
同步1.8.1 87920ba2ff21bb968a8e371f11dc4ba47b94a768
2021-10-24 12:01:05 +08:00
AtlasAccount c788e1a85c 同步1.5.0 88bb20489508d6783c1d2816eb911dae21757f7a
!2594 使用 OpCommand 接口适配relu和gelu backward算子
    Merge pull request !2594 from 薛磊/dev_relu_gelu
同步1.8.1 87920ba2ff21bb968a8e371f11dc4ba47b94a768
2021-10-23 23:00:46 +08:00
AtlasAccount f414fe6e4c 同步1.5.0 7508158b533e4974558a4e72653917aa45d694c3
同步1.8.1 87920ba2ff21bb968a8e371f11dc4ba47b94a768
    !2607 【1.8算子适配】round、rsqrt、sqrt
    Merge pull request !2607 from 姚斌/pytorch1.8.1
2021-10-22 23:00:57 +08:00
ZijunYin af726a697e update en docs. 2021-10-22 17:30:59 +08:00
AtlasAccount afa8699efc 同步1.5.0 7508158b533e4974558a4e72653917aa45d694c3
同步1.8.1 c3e7e61c49a22e7564a914ec70ea3e37d99adef0
2021-10-22 00:58:31 +08:00
AtlasAccount 89f71305c3 同步1.5.0 7508158b533e4974558a4e72653917aa45d694c3
!2598 add Enqueue profiling
    Merge pull request !2598 from 蒋荣强/queue
同步1.8.1 c3e7e61c49a22e7564a914ec70ea3e37d99adef0
2021-10-21 12:00:46 +08:00
AtlasAccount 2bd42a661f 同步1.5.0 46cd8d05f7f053fd22ccf4d1d35ff0ae881b071f
同步1.8.1 c3e7e61c49a22e7564a914ec70ea3e37d99adef0
2021-10-20 23:05:13 +08:00
AtlasAccount 88cbcb90dd 同步1.5.0 46cd8d05f7f053fd22ccf4d1d35ff0ae881b071f
!2590 Add Version + 1
    Merge pull request !2590 from 周司南/master
--
    !2570 ifdef 和 if defined 不能混用
    Merge pull request !2570 from shibo/bug_fix
--
    Merge pull request !2593 from weili10/revert-merge-2554-master
--
    Merge pull request !2592 from weili10/revert-merge-2584-master
--
    !2587 [dump utils]fix compile error
    Merge pull request !2587 from lijing/master
同步1.8.1 c3e7e61c49a22e7564a914ec70ea3e37d99adef0
    !2582 【1.8算子迁移】thnn_conv2d_forward重构
    Merge pull request !2582 from 吴贤坤/thnn_conv_1.8
--
    !2581 【1.8算子迁移】Upsample部分
    Merge pull request !2581 from 吴贤坤/up3d_1.8
--
    !2579 1.8.1算子适配 cross
    Merge pull request !2579 from 王晓/1.8_cross
2021-10-20 16:04:06 +08:00
AtlasAccount 706b56bf41 同步1.5.0 0178176bcf5feb64a463ee5eea17e15e30acd60f
!2586 【dump utils】修复当tensor某些维度为0时load报错问题
    Merge pull request !2586 from lijing/master
同步1.8.1 1e37554a67274f6244ece6522a8ba7a5888c426e
    !2495 【pytorch1.8适配】Where、Resize、Norm、Pow适配
    Merge pull request !2495 from 陈庆/pytorch1.8.1
--
    !2577 【1.8算子迁移】col2im等
    Merge pull request !2577 from 吴贤坤/colim_1.8
--
    !2574 pytorch1.8 pprofiling功能
    Merge pull request !2574 from shibo/profiler_update
2021-10-19 12:02:15 +08:00
AtlasAccount 5f1e9f8cc8 同步1.5.0 9305e2ee100c65f034ef8d0128d3c4b2faa40c29
同步1.8.1 71641840df36c327d5400f22bbdc02d825bee026
2021-10-18 12:00:49 +08:00
AtlasAccount 4317ec1bca 同步1.5.0 9305e2ee100c65f034ef8d0128d3c4b2faa40c29
同步1.8.1 71641840df36c327d5400f22bbdc02d825bee026
2021-10-17 12:00:56 +08:00
i-robot ace7ba9a8b !76 update image in Installation Guide
Merge pull request !76 from yinzijun/master
2021-10-15 10:30:49 +00:00
weili10 8dc400cd8a update README.zh.md. 2021-10-15 10:06:20 +00:00
ZijunYin f2c1df9134 update image in docs/en/PyTorch Installation Guide 2021-10-15 17:52:30 +08:00
i-robot 728b16d171 !74 update English docs
Merge pull request !74 from yinzijun/master
2021-10-15 09:36:48 +00:00
ZijunYin 6285b3b60f Merge branch 'master' of https://gitee.com/yinzijun/pytorch 2021-10-15 17:22:45 +08:00
ZijunYin 1017d89d57 update English docs. 2021-10-15 17:22:34 +08:00
AtlasAccount 424de74a3a 同步1.5.0 7682920856d82fcc09bd1806585cf042a5a99b3b
!2584 solve accuracy problem due to adding async copy to queue
    Merge pull request !2584 from 蒋荣强/master
同步1.8.1 82054017ffd27967cfd4224f6142fdaf23000b5b
    !2566 1.8.1适配“mseloss, avgpool2d, avgpool3d”
2021-10-15 12:01:11 +08:00
AtlasAccount 7e05a39e42 同步1.5.0 da42cdf6867c2e854c21278dbf0ca135e036beb4
!2573 modify scalar input to host memory input
    Merge pull request !2573 from 蒋荣强/scalar
同步1.8.1 290416bb037a6ca8168f266e5f0ad547f2b5afc5
    !2575 1.8.1“float_status”
    Merge pull request !2575 from 李攀/do_1.8.1
2021-10-14 12:00:53 +08:00
i-robot 24bfeaa78c !72 更新readme
Merge pull request !72 from shibo/update_readme
2021-10-13 09:30:49 +00:00
AtlasAccount 47e8fac4ae 同步1.5.0 86ce2266c01b28e46d42f1c34c81f73a70e238cf
同步1.8.1 7afd57f35ebc3b81dd4c3f642e3f8ba81c1f07f0
2021-10-13 12:01:01 +08:00
AtlasAccount c916024ec7 同步1.5.0 86ce2266c01b28e46d42f1c34c81f73a70e238cf
!2563 适配silu正反向算子
    Merge pull request !2563 from 王夏夏/master
--
    !2569 solve codex problem
    Merge pull request !2569 from 蒋荣强/master
--
    !2567 fix codexbug
    Merge pull request !2567 from 周司南/master
--
    !2568 修复codedex告警
    Merge pull request !2568 from 詹隽/mm_nd_dev
同步1.8.1 7afd57f35ebc3b81dd4c3f642e3f8ba81c1f07f0
2021-10-12 12:00:58 +08:00
AtlasAccount 710ce99fa7 同步1.5.0 2d8899df9adbfe0234c5d913dff8a8fddee61ada
同步1.8.1 7afd57f35ebc3b81dd4c3f642e3f8ba81c1f07f0
2021-10-11 12:00:48 +08:00
shibo19 14f78e1593 update 2021-10-11 11:32:48 +08:00
shibo19 ad48d8f66b update 2021-10-11 11:30:40 +08:00
shibo19 5dee0e68b4 update 2021-10-11 11:29:04 +08:00
AtlasAccount 20034c4f3b 同步1.5.0 2d8899df9adbfe0234c5d913dff8a8fddee61ada
同步1.8.1 7afd57f35ebc3b81dd4c3f642e3f8ba81c1f07f0
2021-10-10 12:01:13 +08:00
i-robot ecd705896a !70 update RELEASENOTE with 2.0.2
Merge pull request !70 from yinzijun/master
2021-10-09 10:11:51 +00:00
ZijunYin a1297c462f update RELEASENOTE.md 2021-10-09 17:53:59 +08:00
yinzijun 04e467e6c2 !69 update README
Merge pull request !69 from liuquan/master
2021-10-09 08:43:04 +00:00
刘全 33a911c624 update docs/zh/RELEASENOTE/RELEASENOTE.md. 2021-10-09 07:20:02 +00:00
yinzijun 14bd359387 !65 add releasenote
Merge pull request !65 from yinzijun/master
2021-10-09 07:03:12 +00:00
AtlasAccount 52701635fa 同步1.5.0 2d8899df9adbfe0234c5d913dff8a8fddee61ada
同步1.8.1 7afd57f35ebc3b81dd4c3f642e3f8ba81c1f07f0
2021-10-09 12:01:54 +08:00
ZijunYin f8028e788f add RELEASENOTE.md 2021-10-09 09:54:11 +08:00
weili10 2e5af37b40 update README.zh.md. 2021-10-09 01:12:54 +00:00
AtlasAccount 472a02ee7b 同步1.5.0 2d8899df9adbfe0234c5d913dff8a8fddee61ada
同步1.8.1 7afd57f35ebc3b81dd4c3f642e3f8ba81c1f07f0
2021-10-08 12:01:05 +08:00
AtlasAccount 03077bc002 同步1.5.0 2d8899df9adbfe0234c5d913dff8a8fddee61ada
同步1.8.1 7afd57f35ebc3b81dd4c3f642e3f8ba81c1f07f0
2021-10-07 12:00:48 +08:00
AtlasAccount 8027eddae2 同步1.5.0 2d8899df9adbfe0234c5d913dff8a8fddee61ada
同步1.8.1 7afd57f35ebc3b81dd4c3f642e3f8ba81c1f07f0
2021-10-06 12:01:02 +08:00
AtlasAccount 4e12aed2c4 同步1.5.0 2d8899df9adbfe0234c5d913dff8a8fddee61ada
同步1.8.1 7afd57f35ebc3b81dd4c3f642e3f8ba81c1f07f0
2021-10-05 12:01:05 +08:00
AtlasAccount d60a312292 同步1.5.0 2d8899df9adbfe0234c5d913dff8a8fddee61ada
同步1.8.1 7afd57f35ebc3b81dd4c3f642e3f8ba81c1f07f0
2021-10-04 12:01:10 +08:00
AtlasAccount ed5baac37f 同步1.5.0 2d8899df9adbfe0234c5d913dff8a8fddee61ada
!2554 add AsyncMemcpy to queue
    Merge pull request !2554 from 蒋荣强/fuzzy
同步1.8.1 7afd57f35ebc3b81dd4c3f642e3f8ba81c1f07f0
2021-10-03 12:00:54 +08:00
yinzijun d3fca1bddd !63 update docs 2.0.3.B090
Merge pull request !63 from yinzijun/master
2021-09-30 07:15:55 +00:00
ZijunYin 4082c74535 update docs/zh/PyTorch API支持清单/PyTorch API支持清单.md & docs/zh/PyTorch网络模型移植&训练指南/PyTorch网络模型移植&训练指南.md 2021-09-30 15:02:46 +08:00
ZijunYin 7b0b8cc5b9 update docs 2.0.3.B090 2021-09-30 14:41:32 +08:00
AtlasAccount bd49e63f36 同步1.5.0 a4dfab7869d894d1f2a3629463f1aed4b63bec1b
同步1.8.1 7afd57f35ebc3b81dd4c3f642e3f8ba81c1f07f0
2021-09-30 12:31:03 +08:00
AtlasAccount c47ca17bee 同步1.5.0 a4dfab7869d894d1f2a3629463f1aed4b63bec1b
!2560 【BugFix】修复输入shape不一致,算子侧未broadcast,导致不支持
    Merge pull request !2560 from 姚斌/master
--
    !2557 modify: 去除UT中1维NZ格式的用例
    Merge pull request !2557 from 郭夏/ut_modify
--
    !2555 修复IOU输出数据类型转换
    Merge pull request !2555 from 李攀/bugfix
同步1.8.1 7afd57f35ebc3b81dd4c3f642e3f8ba81c1f07f0
2021-09-29 12:01:07 +08:00
AtlasAccount 6e78d9b798 同步1.5.0 f9ff07a2aef09f4901025c8375dfcb4157fe38e0
!2551 add fuzzy flag to queue
    Merge pull request !2551 from 蒋荣强/fuzzy
同步1.8.1 7afd57f35ebc3b81dd4c3f642e3f8ba81c1f07f0
2021-09-28 12:00:45 +08:00
AtlasAccount 325e0c9686 同步1.5.0 6ee40447c11dc17c5f58d7fcad9ae9f1a078057e
!2552 修复load模式时conv2d反向dump结果ir_name被覆盖的问题
    Merge pull request !2552 from gaokai21/master
同步1.8.1 7afd57f35ebc3b81dd4c3f642e3f8ba81c1f07f0
2021-09-27 20:58:36 +08:00
AtlasAccount 8b46a4fa68 同步1.5.0 68aca6bc147877979b06059240f3f246f0625a07
!2477 [contrib/npu/optimized_lib/] 修复iou和bbox_coder在输入经过归一化时精度下降的问题
    Merge pull request !2477 from 王姜奔/20210903
--
    !2456 [contrib/npu/optimized_lib/] fix import bug in __init__
    Merge pull request !2456 from 王姜奔/master
--
    !2543 修复maxunpool2dbackward执行报错
    Merge pull request !2543 from 李攀/bugfix
同步1.8.1 7afd57f35ebc3b81dd4c3f642e3f8ba81c1f07f0
2021-09-27 12:00:48 +08:00
1687 changed files with 54276 additions and 211571 deletions
+24
View File
@@ -0,0 +1,24 @@
<!-- Thanks for sending a pull request!
-->
**What type of PR is this?**
> Uncomment only one ` /kind <>` line, hit enter to put that in a new line, and remove leading whitespaces from that line:
>
> /kind bug
> /kind task
> /kind feature
**What does this PR do / why do we need it**:
**Which issue(s) this PR fixes**:
<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Fixes #
**Special notes for your reviewers**:
+6 -6
View File
@@ -18,6 +18,7 @@
- 在[Gitee](https://gitee.com/ascend/pytorch)上Fork存储库。
- 阅读[README.md](#https://gitee.com/ascend/pytorch/blob/master/README.zh.md)以获取项目信息和构建说明。
- 行为准则 [coc](https://gitee.com/ascend/community/blob/master/code-of-conduct_zh_cn.md)。
<h2 id="开发指导.md">开发指导</h2>
@@ -98,7 +99,7 @@
2. 设置环境变量。
进入“pytorh/src“路径,并执行env.sh脚本。
进入"pytorch/src"路径,并执行env.sh脚本。
```
bash env.sh
@@ -119,11 +120,11 @@
- 编码指南
请在PyTorch社区使用规统一的编码分格,_Python__中_建议的编码风格是[PEP 8编码样式](https://pep8.org/),_C++_编码所建议的风格是 [Google C++编码指南](http://google.github.io/styleguide/cppguide.html) 。可以使用[CppLint](https://github.com/cpplint/cpplint),[CppCheck](http://cppcheck.sourceforge.net/),[CMakeLint](https://github.com/cmake-lint/cmake-lint),[CodeSpell](https://github.com/codespell-project/codespell), [Lizard](http://www.lizard.ws/),[ShellCheck](https://github.com/koalaman/shellcheck)和[pylint](https://pylint.org/)检查代码的格式,建议在您的IDE中安装这些插件。
请在PyTorch社区使用规统一的编码分格,python建议的编码风格是[PEP 8编码样式](https://pep8.org/),C++编码所建议的风格是 [Google C++编码指南](http://google.github.io/styleguide/cppguide.html) 。可以使用[CppLint](https://github.com/cpplint/cpplint),[CppCheck](http://cppcheck.sourceforge.net/),[CMakeLint](https://github.com/cmake-lint/cmake-lint),[CodeSpell](https://github.com/codespell-project/codespell), [Lizard](http://www.lizard.ws/),[ShellCheck](https://github.com/koalaman/shellcheck)和[pylint](https://pylint.org/)检查代码的格式,建议在您的IDE中安装这些插件。
- 单元测试指南
请在PyTorch社区使用统一的单元测试风格, _Python_中建议的单元测试风格是[pytest](http://www.pytest.org/en/latest/),_C++_单元测试所建议的风格是 [Googletest Primer](#https://github.com/google/googletest/blob/master/docs/primer.md) 。测试用例的设计意图应该通过它的注释名称来反映。
请在PyTorch社区使用统一的单元测试风格, Python中建议的单元测试风格是[pytest](http://www.pytest.org/en/latest/),C++单元测试所建议的风格是 [Googletest Primer](#https://github.com/google/googletest/blob/master/docs/primer.md) 。测试用例的设计意图应该通过它的注释名称来反映。
- 重构指南
@@ -165,7 +166,7 @@
3. 本地开发代码。
为了避免多个分支之间的不一致,建议签出到一个新的分支:
为了避免多个分支之间的不一致,建议创建新的分支进行开发:
```
git checkout -b {new_branch_name} origin/master
@@ -185,7 +186,7 @@
git push origin {new_branch_name}
```
5. 向 PyTorh存储库拉取请求。
5. 向 PyTorch存储库拉取请求。
在最后一步中,您需要在新分支和“PyTorch master“分支之间拉取比较请求。完成拉取请求后,“Jenkins CI“将自动设置为构建测试。您的pull request应该尽快合并到上游 master 分支,以降低合并的风险。
@@ -224,4 +225,3 @@
- 确保你的提交历史被排序。
- 始终将您的分支与主分支保持一致。
- 对于错误修复 PR,请确保链接所有相关问题。
+18 -6
View File
@@ -1,8 +1,9 @@
approvers:
- blian
- nalinaly
- weili10
- you-ansheng
reviewers:
- zhou_sinan
- shibo19
- Ronnie_zheng
- xiaxia3
@@ -10,10 +11,21 @@ reviewers:
- petissue
- td__lihan
- ascendzyj
- wangyu0516
- wudingyuan
- yskhhh
- lvpeiyuan
- xchu42
- weili10
- matrixplayer
- li_jing_hw
- wangjiangben_hw
- qingfenxiaochong
- goodjobwubai
- fairwarning
- fairwarning
- you-ansheng
- yinzijun
- weili10
- shaoyf
- yanpengquan07
- xiong05
- liu-jiaweikf
- xiepeng20
- brightlyking
- chenhao_1209
+500
View File
@@ -0,0 +1,500 @@
# AscendPyTorch
<h1 id="introductionmd">Introduction</h1>
This project develops the PyTorch Adapter plugin to adapt Ascend to the PyTorch framework so that developers who use the PyTorch framework can obtain powerful compute capabilities of Ascend AI Processors. When setting up the environment for model development and running under PyTorch, you can manually build and install modules adapted to the PyTorch framework on a server.
<h3 id="prerequisitesmd">Prerequisites</h3>
- The development or operating environment of CANN has been installed. For details, see the *CANN Software Installation Guide*.
- Python version: 3.7.5 or 3.8
# System Dependencies
## CentOS & EulerOS
yum install -y patch zlib-devel libffi-devel openssl-devel libjpeg-turbo-devel gcc-c++ sqlite-devel dos2unix openblas git dos2unix
yum install -y gcc==7.3.0 cmake==3.12.0
## Ubuntu
apt-get install -y patch g++ make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev m4 dos2unix libopenblas-dev git dos2unix
apt-get install -y gcc==7.3.0 cmake==3.12.0
>![](figures/icon-note.gif) **NOTE:**
>If an error occurs during the installation of the GCC and CMake dependency commands, use the source code for installation. For details, see the FAQ.
# Ascend Auxiliary Software
| AscendPyTorch Version| CANN Version| Supported PyTorch Version| Gitee Branch|
| :------------ | :----------- | :----------- | ------------ |
| 2.0.2 | CANN 5.0.2 | 1.5.0.post2 | 2.0.2.tr5 |
| 2.0.3 | CANN 5.0.3 | 1.5.0.post3 | 2.0.3.tr5 |
| 2.0.4 | CANN 5.0.4 | 1.5.0.post4 | 2.0.4.tr5 |
| 3.0.rc1 | CANN 5.1.RC1 | 1.5.0.post5 | v1.5.0-3.0.rc1 |
| 3.0.rc1 | CANN 5.1.RC1 | 1.8.1.rc1 | v1.8.1-3.0.rc1 |
| 3.0.rc2 | CANN 5.1.RC2 | 1.5.0.post6 | v1.5.0-3.0.rc2 |
| 3.0.rc2 | CANN 5.1.RC2 | 1.8.1.rc2 | v1.8.1-3.0.rc2 |
# Installation Methods
## Installing the PyTorch Environment Dependencies
Obtain the PyTorch source code (from the current repository) that adapts to Ascend AI Processors.
```
git clone -b v1.5.0-3.0.rc2 https://gitee.com/ascend/pytorch.git
```
## Obtaining the Native PyTorch Source Code and Third-Party Code
Obtain the native PyTorch 1.5.0 source code from the root directory **/pytorch** of the current repository. Check whether there are fixed security-related issues in the Security and Issues categories in the PyTorch native repository. Update the native PyTorch code if there are any fixes.
```sh
cd pytorch
git clone -b v1.5.0 --depth=1 https://github.com/pytorch/pytorch.git
```
Go to the **pytorch/pytorch/** directory and obtain the passive dependency code of PyTorch. It takes a long time to obtain the code.
```sh
cd pytorch
git submodule sync
git submodule update --init --recursive
```
If no error is reported, the PyTorch and third-party code on which PyTorch depends is generated.
## Generating Full PyTorch Code That Adapts to Ascend AI Processors
Go to the **pytorch/scripts** directory and run the script of the selected version. (Note: The downloaded native PyTorch source code must match the following version. Otherwise, an error may occur.)
```sh
cd ../scripts/
bash gen.sh
```
The full code adapted to the NPU is generated in the **pytorch/pytorch/** directory.
## Installing the Python Dependency Library
Go to the **pytorch/pytorch/** directory and install the Python dependency library.
```python3
cd ../pytorch
pip3 install -r requirements.txt
```
## Compiling Torch Binary Package
In the **pytorch/pytorch/** directory, run the following command:
```sh
# Python 3.7
bash build.sh
or
bash build.sh --python=3.7 (recommended)
# Python 3.8
bash build.sh --python=3.8
```
The generated binary package is in the **pytorch/pytorch/dist/** directory.
## Installing PyTorch
**x86_64:**
**torch-1.5.0+ascend-cp37-cp37m-linux_x86_64.whl** (The actual name may contain the minor version number, for example, **torch-1.5.0.post2+ascend-cp37-cp37m-linux_x86_64.whl**.)
```shell
cd dist
pip3 uninstall torch
pip3 install --upgrade torch-1.5.0+ascend-cp37-cp37m-linux_x86_64.whl
```
**arm:**
**torch-1.5.0+ascend-cp37-cp37m-linux_aarch64.whl** (The actual name may contain the minor version number, for example, **torch-1.5.0.post2+ascend-cp37-cp37m-linux_aarch64.whl**.)
```shell
cd dist
pip3 uninstall torch
pip3 install --upgrade torch-1.5.0+ascend-cp37-cp37m-linux_aarch64.whl
```
# Running
## Executing Environment Variables
Run the script for setting environment variables in the **pytorch/pytorch/** directory.
```
cd ../
source env.sh
```
The following are optional environment variables that may affect running models:
```
export COMBINED_ENABLE=1 # (Optional) Discontinuous-to-continuous level-2 derivation optimization. To enable this function, set the value to **1**. When a large number of time-consuming AsStrided operators are called in the model, you can enable this function to improve the device execution efficiency.
export ACL_DUMP_DATA=1 # (Optional) Operator data dump function, which is used for debugging. To enable this function, set the value to **1**.
export TASK_QUEUE_ENABLE=1 # Delivered by an asynchronous task to asynchronously call the ACL interface. You are advised to enable this environment variable and set its value to **1**.
```
If the system is openEuler or its inherited OS, such as UOS, run the following command to cancel CPU core binding.
```
# unset GOMP_CPU_AFFINITY
```
**Table 1** Description of environment variables
<a name="zh-cn_topic_0000001152616261_table42017516135"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001152616261_row16198951191317"><th class="cellrowborder" valign="top" width="55.48%" id="mcps1.2.3.1.1"><p id="zh-cn_topic_0000001152616261_p51981251161315"><a name="zh-cn_topic_0000001152616261_p51981251161315"></a><a name="zh-cn_topic_0000001152616261_p51981251161315"></a>Environment Variable</p>
</th>
<th class="cellrowborder" valign="top" width="44.519999999999996%" id="mcps1.2.3.1.2"><p id="zh-cn_topic_0000001152616261_p9198135114133"><a name="zh-cn_topic_0000001152616261_p9198135114133"></a><a name="zh-cn_topic_0000001152616261_p9198135114133"></a>Description</p>
</td>
</tr>
<tr id="row78312162301"><td class="cellrowborder" valign="top" width="55.48%" headers="mcps1.2.3.1.1 "><p id="p1832171673019"><a name="p1832171673019"></a><a name="p1832171673019"></a>COMBINED_ENABLE</p>
</td>
<td class="cellrowborder" valign="top" width="44.519999999999996%" headers="mcps1.2.3.1.2 "><p id="p583261643014"><a name="p583261643014"></a><a name="p583261643014"></a>(Optional) Discontinuous-to-continuous level-2 derivation optimization. To enable this function, set the value to **1**. When a large number of time-consuming AsStrided operators are called in the model, you can enable this function to improve the device execution efficiency.</p>
</td>
</tr>
<tr id="row183041355123411"><td class="cellrowborder" valign="top" width="55.48%" headers="mcps1.2.3.1.1 "><p id="p730435533415"><a name="p730435533415"></a><a name="p730435533415"></a>ACL_DUMP_DATA</p>
</td>
<td class="cellrowborder" valign="top" width="44.519999999999996%" headers="mcps1.2.3.1.2 "><p id="p16304105533412"><a name="p16304105533412"></a><a name="p16304105533412"></a>(Optional) Operator data dump function, which is used for debugging. To enable this function, set the value to **1**.</p>
</td>
</tr>
<tr id="row19173161510309"><td class="cellrowborder" valign="top" width="55.48%" headers="mcps1.2.3.1.1 "><p id="zh-cn_topic_0000001152616261_p16711563237"><a name="zh-cn_topic_0000001152616261_p16711563237"></a><a name="zh-cn_topic_0000001152616261_p16711563237"></a>TASK_QUEUE_ENABLE</p>
</td>
<td class="cellrowborder" valign="top" width="44.519999999999996%" headers="mcps1.2.3.1.2 "><p id="zh-cn_topic_0000001152616261_p0711356152317"><a name="zh-cn_topic_0000001152616261_p0711356152317"></a><a name="zh-cn_topic_0000001152616261_p0711356152317"></a>(Optional) Use asynchronous task delivery to asynchronously invoke the ACL interface. To enable this function, set it to **1** (recommended default setting).</p>
</td>
</tbody>
</table>
## Running the Unit Test Script
Verify the running. The output is **OK**.
```shell
// Select a test script that matches the preceding version. The following uses the 1.5.0 version as an example.
cd ../
python3 pytorch1.5.0/test/test_npu/test_network_ops/test_div.py
```
# (Optional) Installing the Mixed Precision Module
Select the APEX module based on the following functions. For details about how to build and install the APEX module, see the [README.en](https://gitee.com/ascend/apex/tree/v1.5.0-3.0.rc2).
- APEX
- O1 configuration mode: Conv and Matmul use the float16 precision for computing, and Softmax and BN use float32.
- O2 configuration mode: BN uses the float32 precision for computing, and others use float16.
- Static loss scale: Parameters are statically set to ensure the convergence of training with mixed precision.
- Dynamic loss scale: The loss scale value is dynamically calculated to determine whether overflow occurs.
# Documents
For more details about the installation guide, model porting and training/inference tutorials, and API list, see [User Documents](https://gitee.com/ascend/pytorch/tree/master/docs/en).
# Suggestions and Communication
We sincerely welcome you to join discussions in the community and contribute your suggestions. We will reply to you as soon as possible.
# Branch Maintenance Policies
The version branches of AscendPyTorch have the following maintenance phases:
| **Status** | **Duration** | **Description** |
|-------------|---------------|--------------------------------------------------|
| Planning | 1 - 3 months | Plan features. |
| Development | 3 months | Develop features. |
| Maintained | 6 - 12 months | Allow the incorporation of all resolved issues and release the version.|
| Unmaintained| 0 - 3 months | Allow the incorporation of all resolved issues. No dedicated maintenance personnel are available. No version will be released. |
| End Of Life (EOL) | N/A | Do not accept any modification to a branch. |
# Maintenance Status of Existing Branches
| **Branch Name**| **Status** | **Launch Date** | **Subsequent Status** | **EOL Date**|
|------------|--------------|----------------------|----------------------------------------|------------|
| **v2.0.2** | Maintained | 2021-07-29 | Unmaintained <br> 2022-07-29 estimated | |
| **v2.0.3** | Maintained | 2021-10-15 | Unmaintained <br> 2022-10-15 estimated | |
| **v2.0.4** | Maintained | 2022-01-15 | Unmaintained <br> 2023-01-15 estimated | |
| **v3.0.rc1** | Maintained | 2022-04-10 | Unmaintained <br> 2023-04-10 estimated | |
| **v3.0.rc2** | Maintained | 2022-07-15 | Unmaintained <br> 2023-07-15 estimated | |
# FAQ
## When PIP is set to the Huawei source, a Python environment error occurs after the typing dependency in the **requirements.txt** file is installed.
When PIP is set to the Huawei source, open the **requirements.txt** file, delete the typing dependency, and then run the following command:
```
pip3 install -r requirments.txt
```
## The **libhccl.so** cannot be found by **import torch**.
Environment variables are not configured. You need to configure them using the **env.sh** script.
```
source pytorch/pytorch1.5.0/src/env.sh
```
## The error message "no module named yaml/typing_extensions." is displayed when **bash build.sh** is run during compilation.
PyTorch compilation depends on the YAML and typing_extensions libraries, which need to be manually installed.
```
pip3 install pyyaml
pip3 install typing_extensions
```
After the installation is successful, run **make clean** and then **bash build.sh** to perform compilation. Otherwise, an unknown compilation error may occur due to the cache.
## TE cannot be found during running.
Development state:
```
cd /urs/local/Ascend/ascend-toolkit/latest/{arch}-linux/lib64 # {arch} indicates the architecture name.
pip3 install --upgrade topi-0.4.0-py3-none-any.whl
pip3 install --upgrade te-0.4.0-py3-none-any.whl
```
User state:
```
cd /urs/local/Ascend/nnae/latest/{arch}-linux/lib64 # {arch} indicates the architecture name.
pip3 install --upgrade topi-0.4.0-py3-none-any.whl
pip3 install --upgrade te-0.4.0-py3-none-any.whl
```
## During CMake installation through the CLI, an error is reported indicating that the package cannot be found. During CMake compilation, another error is reported indicating that the version is too early. In this cause, you can use the installation script or source code to compile and install CMake.
Method 1: Download the installation script and install CMake. (For details, see the CMake official website.)
​ x86_64 environment: cmake-3.12.0-Linux-x86_64.sh
​ AArch64 environment: cmake-3.12.0-Linux-aarch64.sh
1. Run the following commands:
```
./cmake-3.12.0-Linux-{arch}.sh #{arch} indicates the architecture name.
```
2. Set the soft link.
```
ln -s /usr/local/cmake/bin/cmake /usr/bin/cmake
```
3. Run the following command to check whether CMake has been installed:
```
cmake --version
```
If the message "cmake version 3.12.0" is displayed, the installation is successful.
Method 2: Use the source code to compile and install.
1. Obtain the CMake software package.
```
wget https://cmake.org/files/v3.12/cmake-3.12.0.tar.gz --no-check-certificate
```
2. Decompress the package and go to the software package directory.
```
tar -xf cmake-3.12.0.tar.gz
cd cmake-3.12.0/
```
3. Run the configuration, compilation, and installation commands.
```
./configure --prefix=/usr/local/cmake
make && make install
```
4. Set the soft link.
```
ln -s /usr/local/cmake/bin/cmake /usr/bin/cmake
```
5. Run the following command to check whether CMake has been installed:
```
cmake --version
```
If the message "cmake version 3.12.0" is displayed, the installation is successful.
## During GCC installation through the CLI, an error is reported indicating that the package cannot be found. During GCC compilation, another error is reported.
When downloading GCC from some sources, you may be prompted by an error message indicating that the package cannot be found. In this case, use the source code to compile and install GCC.
Perform the following steps as the **root** user.
1. Download **gcc-7.3.0.tar.gz** from [https://mirrors.tuna.tsinghua.edu.cn/gnu/gcc/gcc-7.3.0/gcc-7.3.0.tar.gz](https://mirrors.tuna.tsinghua.edu.cn/gnu/gcc/gcc-7.3.0/gcc-7.3.0.tar.gz).
2. GCC installation requires adequate temporary space. Run the following command to clear the **/tmp** directory in advance:
```
sudo rm -rf /tmp/*
```
3. Install the dependency package. (CentOS and Ubuntu are used as examples.)
- For CentOS, run the following command:
```
yum install bzip2
```
- For Ubuntu, run the following command:
```
apt-get install bzip2
```
4. Compile and install GCC.
1. Go to the directory where the source package **gcc-7.3.0.tar.gz** is located and run the following command to decompress it:
```
tar -zxvf gcc-7.3.0.tar.gz
```
2. Go to the extracted directory and download the GCC dependency packages:
```
cd gcc-7.3.0
./contrib/download_prerequisites
```
If an error is reported during the command execution, run the following commands in the **gcc-7.3.0/** directory to download the dependency packages:
```
wget http://gcc.gnu.org/pub/gcc/infrastructure/gmp-6.1.0.tar.bz2
wget http://gcc.gnu.org/pub/gcc/infrastructure/mpfr-3.1.4.tar.bz2
wget http://gcc.gnu.org/pub/gcc/infrastructure/mpc-1.0.3.tar.gz
wget http://gcc.gnu.org/pub/gcc/infrastructure/isl-0.16.1.tar.bz2
```
After the preceding dependencies are downloaded, run the following command again:
```
./contrib/download_prerequisites
```
If the verification fails, check whether there are duplicate dependency packages in the folder. If yes, delete duplicate ones.
3. <a name="zh-cn_topic_0000001135347812_zh-cn_topic_0000001173199577_zh-cn_topic_0000001172534867_zh-cn_topic_0276688294_li1649343041310"></a>Run the configuration, compilation, and installation commands.
```
./configure --enable-languages=c,c++ --disable-multilib --with-system-zlib --prefix=/usr/local/linux_gcc7.3.0
make -j15 # Check the number of CPUs by running **grep -w processor /proc/cpuinfo|wc -l**. In this example, the number is 15. You can set the parameters as required.
make install
```
> ![img](figures/icon-notice.gif) **NOTE:**
>The **--prefix** option is used to specify the **linux_gcc7.3.0** installation path, which is configurable. Do not set it to **/usr/local** or **/usr,** which is the default installation path for the GCC installed by using the software source. Otherwise, a conflict occurs and the original GCC compilation environment of the system is damaged. In this example, the installation path is set to **/usr/local/linux_gcc7.3.0**.
4. Change the soft links.
```
ln -s ${install_path}/bin/gcc /usr/bin/gcc
ln -s ${install_path}/bin/g++ /usr/bin/g++
ln -s ${install_path}/bin/c++ /usr/bin/c++
```
5. Configure environment variables.
Training must be performed in the compilation environment with GCC upgraded. If you want to run training, configure the following environment variable in your training script:
```
export LD_LIBRARY_PATH=${install_path}/lib64:${LD_LIBRARY_PATH}
```
**${install_path}** indicates the GCC 7.3.0 installation path configured in [3.](#zh-cn_topic_0000001135347812_zh-cn_topic_0000001173199577_zh-cn_topic_0000001172534867_zh-cn_topic_0276688294_li1649343041310). In this example, the GCC 7.3.0 installation path is **/usr/local/linux_gcc7.3.0/**.
>![](figures/icon-note.gif) **NOTE:**
>Skip this step if you do not need to use the compilation environment with GCC upgraded.
If the PyTorch compilation fails, check whether the soft link library is correct.
libstdc++->libstdc++.so.6.0.24(7.3.0)
## libblas.so cannot be found.
The OpenBLAS library is missing in the environment. You need to install it.
CentOS and EulerOS
```sh
yum -y install openblas
```
Ubuntu
```sh
apt install libopenblas-dev
```
## torchvision fails to be installed using pip in the Arm environment.
The source code can be used for installation. (You need to install the AscendPyTorch first and configure environment variables using **env.sh**.)
```
git clone -b v0.6.0 https://github.com/pytorch/vision.git
cd vision
python setup.py install
```
Verify that the torchvision is successfully installed.
```
python -c "import torchvision"
```
If no error is reported, the installation is successful.
# Release Notes
For details, see [Release Notes](docs/en/RELEASENOTE).
+360 -83
View File
@@ -1,67 +1,90 @@
# AscendPyTorch
# 项目简介
本项目开发了PyTorch Adapter插件,用于昇腾适配PyTorch框架,为使用PyTorch框架的开发者提供昇腾AI处理器的超强算力。
<h1 id="简介md">简介</h1>
本项目开发了PyTorch Adapter插件,用于昇腾适配PyTorch框架,为使用PyTorch框架的开发者提供昇腾AI处理器的超强算力。用户在准备相关环境进行基于PyTorch框架模型的开发、运行时,可以选择在服务器中手动编译安装PyTorch框架相关模块。
# 编译/执行约束
gcc版本: 7.3.0(只在编译场景要求)
cmake版本:3.12.0以上版本(只在编译场景要求)
python版本:3.7.5 和 3.8.x(编译方法有差别,详见脚本编译章节)
<h3 id="前提条件md">前提条件</h3>
- 需完成CANN开发或运行环境的安装,具体操作请参考《CANN 软件安装指南》。
- Python支持版本:3.7.5、3.8。
# 系统依赖库
## CentOS & EulerOS
yum install -y cmake zlib-devel libffi-devel openssl-devel libjpeg-turbo-devel gcc-c++ sqlite-devel dos2unix openblas
yum install -y patch zlib-devel libffi-devel openssl-devel libjpeg-turbo-devel gcc-c++ sqlite-devel dos2unix openblas git dos2unix
yum install -y gcc==7.3.0 cmake==3.12.0
## Ubuntu
apt-get install -y gcc g++ make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev m4 cmake dos2unix libopenblas-dev
apt-get install -y patch g++ make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev m4 dos2unix libopenblas-dev git dos2unix
apt-get install -y gcc==7.3.0 cmake==3.12.0
>![](figures/icon-note.gif) **说明:**
>若安装gcc与cmake依赖命令报错,请参考FAQ使用源码安装。
# Ascend配套软件
| AscendPyTorch版本 | CANN版本 |
| :------------ | :----------- |
| 2.0.2 | CANN 5.0.2 |
| AscendPyTorch版本 | CANN版本 | 支持PyTorch版本 | Gitee分支名称 |
| :------------ | :----------- | :----------- | ------------ |
| 2.0.2 | CANN 5.0.2 | 1.5.0.post2 | 2.0.2.tr5 |
| 2.0.3 | CANN 5.0.3 | 1.5.0.post3 | 2.0.3.tr5 |
| 2.0.4 | CANN 5.0.4 | 1.5.0.post4 | 2.0.4.tr5 |
| 3.0.rc1 | CANN 5.1.RC1 | 1.5.0.post5 | v1.5.0-3.0.rc1 |
| 3.0.rc1 | CANN 5.1.RC1 | 1.8.1.rc1 | v1.8.1-3.0.rc1 |
| 3.0.rc2 | CANN 5.1.RC2 | 1.5.0.post6 | v1.5.0-3.0.rc2 |
| 3.0.rc2 | CANN 5.1.RC2 | 1.8.1.rc2 | v1.8.1-3.0.rc2 |
| 3.0.rc3 | CANN 6.0.RC1 | 1.5.0.post7 | v1.5.0-3.0.rc3 |
| 3.0.rc3 | CANN 6.0.RC1 | 1.8.1.rc3 | v1.8.1-3.0.rc3 |
| 3.0.rc3 | CANN 6.0.RC1 | 1.11.0.rc1(beta) | v1.11.0-3.0.rc3 | \ |
| 3.0.0 | CANN 6.0.1 | 1.5.0.post8 | v1.5.0-3.0.0 | \ |
| 3.0.0 | CANN 6.0.1 | 1.8.1 | v1.8.1-3.0.0 | \ |
| 3.0.0 | CANN 6.0.1 | 1.11.0.rc2(beta) | v1.11.0-3.0.0 | \ |
# 安装方式
## 安装PyTorch依赖环境
# 使用方式 --生成全量代码并编译
获取适配昇腾AI处理器的PyTorch源代码(即当前仓库代码)。
```
git clone -b v1.5.0 https://gitee.com/ascend/pytorch.git
```
## 获取原生PyTorch源代码和third_party代码
当前支持pytorch 1.5.0和1.8.1的版本。根据需求,在当前仓库根目录pytorch/下获取原生PyTorch的源代码
在当前仓库根目录pytorch/下获取原生PyTorch1.5.0的源代码。请关注PyTorch原生社区的安全板块与Issue板块是否有安全相关问题修复,并根据社区修复及时更新原生PyTorch代码。
```sh
// 1.5.0 版本
cd pytorch
git clone -b v1.5.0 --depth=1 https://github.com/pytorch/pytorch.git
// 1.8.1 版本
git clone -b v1.8.1 --depth=1 https://github.com/pytorch/pytorch.git
```
进入到pytorch/pytorch/目录下, 获取PyTorch被动依赖代码(获取时间较长,请耐心等待)。
```sh
cd pytorch
git submodule sync
git submodule update --init --recursive
```
完成且没有报错之后就生成了PyTorch及其依赖的三方代码
## 生成适配昇腾AI处理器的PyTorch代码。
## 生成适配昇腾AI处理器的PyTorch全量代码。
进入到pytorch/scripts目录,根据选择的版本执行,执行脚本(注意:下载原生Pytorch源代码和下面版本要对应,否则可能出错)
进入到pytorch/scripts目录,根据选择的版本执行,执行脚本(注意:下载原生PyTorch源代码和下面版本要对应,否则可能出错)
```sh
// 默认为1.5.0版本
cd ../scripts/
bash gen.sh
// 对于1.8.1版本,则通过-v 参数指定
bash gen.sh -v 1.8.1
```
会在pytorch/pytorch/目录中生成npu适配全量代码
@@ -72,13 +95,14 @@ bash gen.sh -v 1.8.1
进入到pytorch/pytorch/目录,依赖库安装:
```python3
cd ../pytorch
pip3 install -r requirements.txt
```
## 编译torch的二进制包
进入到pytorch/pytorch/目录,执行
在pytorch/pytorch/目录,执行
```sh
# python3.7版本
@@ -92,15 +116,14 @@ bash build.sh --python=3.8
生成的二进制包在pytorch/pytorch/dist/目录下
# 安装
### (以1.5.0版本为例,1.8.1版本同理)
## 安装pytorch
**x86_64:**
torch-1.5.0+ascend-cp37-cp37m-linux_x86_64.whl (实际可能附带小版本号例如torch-1.5.0.post2+ascend-cp37-cp37m-linux_x86_64.whl)
```python
```shell
cd dist
pip3 uninstall torch
pip3 install --upgrade torch-1.5.0+ascend-cp37-cp37m-linux_x86_64.whl
```
@@ -110,7 +133,8 @@ pip3 install --upgrade torch-1.5.0+ascend-cp37-cp37m-linux_x86_64.whl
torch-1.5.0+ascend-cp37-cp37m-linux_aarch64.whl (实际可能附带小版本号例如torch-1.5.0.post2+ascend-cp37-cp37m-linux_aarch64.whl)
```python
```shell
cd dist
pip3 uninstall torch
pip3 install --upgrade torch-1.5.0+ascend-cp37-cp37m-linux_aarch64.whl
```
@@ -120,67 +144,83 @@ pip3 install --upgrade torch-1.5.0+ascend-cp37-cp37m-linux_aarch64.whl
## 运行环境变量
在当前仓库根目录中执行设置环境变量脚本
在pytorch/pytorch/中执行设置环境变量脚本
```
source pytorch/env.sh
cd ../
source env.sh
```
## 自定义环境变量
以下环境变量为NPU场景下使用的功能类或可以提升性能的环境变量:
```
export TASK_QUEUE_ENABLE=1 # 使用异步任务下发,异步调用acl接口,建议默认开启,开启设置为1
export PTCOPY_ENABLE=1 # 使用PTCopy算子模式,加速转连续及copy等过程,建议默认开启,开启设置为1
```
可选的环境变量可能会对运行的模型产生影响:
```
export DYNAMIC_COMPILE_ENABLE=1 # 动态shape特性功能,针对shape变化场景,可选,开启设置为1
export COMBINED_ENABLE=1 # 非连续两个算子组合类场景优化,可选,开启设置为1
export TRI_COMBINED_ENABLE=1 # 非连续三个算子组合类场景优化,可选,开启设置为1
export COMBINED_ENABLE=1 # 非连续转连续二级推导优化,可选,开启设置为1。当模型中有大量AsStrided高耗时算子被调用时,可以尝试开启此优化以获得潜在的device执行效率的提升
export ACL_DUMP_DATA=1 # 算子数据dump功能,调试时使用,可选,开启设置为1
export DYNAMIC_OP="ADD#MUL" # 算子实现,ADD和MUL算子在不同场景下有不同的性能表现。可选
export TASK_QUEUE_ENABLE=1 # 使用异步任务下发,异步调用acl接口,建议默认开启,开启设置为1
```
当系统为openEuler及其继承操作系统时,如UOS,需设置此命令,取消CPU绑核。
```
# unset GOMP_CPU_AFFINITY
```
**表 1** 环境变量说明
<a name="zh-cn_topic_0000001152616261_table42017516135"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001152616261_row16198951191317"><th class="cellrowborder" valign="top" width="55.48%" id="mcps1.2.3.1.1"><p id="zh-cn_topic_0000001152616261_p51981251161315"><a name="zh-cn_topic_0000001152616261_p51981251161315"></a><a name="zh-cn_topic_0000001152616261_p51981251161315"></a>配置项</p>
</th>
<th class="cellrowborder" valign="top" width="44.519999999999996%" id="mcps1.2.3.1.2"><p id="zh-cn_topic_0000001152616261_p9198135114133"><a name="zh-cn_topic_0000001152616261_p9198135114133"></a><a name="zh-cn_topic_0000001152616261_p9198135114133"></a>说明</p>
</td>
</tr>
<tr id="row78312162301"><td class="cellrowborder" valign="top" width="55.48%" headers="mcps1.2.3.1.1 "><p id="p1832171673019"><a name="p1832171673019"></a><a name="p1832171673019"></a>COMBINED_ENABLE</p>
</td>
<td class="cellrowborder" valign="top" width="44.519999999999996%" headers="mcps1.2.3.1.2 "><p id="p583261643014"><a name="p583261643014"></a><a name="p583261643014"></a>(可选)非连续转连续二级推导优化,可选,开启设置为1。当模型中有大量AsStrided高耗时算子被调用时,可以尝试开启此优化以获得潜在的device执行效率的提升。</p>
</td>
</tr>
<tr id="row183041355123411"><td class="cellrowborder" valign="top" width="55.48%" headers="mcps1.2.3.1.1 "><p id="p730435533415"><a name="p730435533415"></a><a name="p730435533415"></a>ACL_DUMP_DATA</p>
</td>
<td class="cellrowborder" valign="top" width="44.519999999999996%" headers="mcps1.2.3.1.2 "><p id="p16304105533412"><a name="p16304105533412"></a><a name="p16304105533412"></a>(可选)算子数据dump功能,调试时使用,开启设置为1。</p>
</td>
</tr>
<tr id="row19173161510309"><td class="cellrowborder" valign="top" width="55.48%" headers="mcps1.2.3.1.1 "><p id="zh-cn_topic_0000001152616261_p16711563237"><a name="zh-cn_topic_0000001152616261_p16711563237"></a><a name="zh-cn_topic_0000001152616261_p16711563237"></a>TASK_QUEUE_ENABLE</p>
</td>
<td class="cellrowborder" valign="top" width="44.519999999999996%" headers="mcps1.2.3.1.2 "><p id="zh-cn_topic_0000001152616261_p0711356152317"><a name="zh-cn_topic_0000001152616261_p0711356152317"></a><a name="zh-cn_topic_0000001152616261_p0711356152317"></a>(可选)使用异步任务下发,异步调用acl接口,建议默认开启,开启设置为1。 </p>
</td>
</tbody>
</table>
## 执行单元测试脚本
验证运行, 输出结果OK
```python
```shell
// 根据前述版本,选择对应的测试脚本,以下为1.5.0版本
python3 pytorch1.5.0/test/test_npu/test_div.py
// 以下为1.8.1版本
python3 pytorch1.8.1/test/test_npu/test_div.py
cd ../
python3 pytorch1.5.0/test/test_npu/test_network_ops/test_div.py
```
# 安装混合精度模块(可选)
# 路标
请用户根据以下功能需要选择使用,若需要安装Apex模块请参考相关[README文档](https://gitee.com/ascend/apex/tree/v1.5.0)进行编译安装Apex模块。
以下将展示AscendPyTorch近期的计划,我们会根据用户的反馈诉求,持续调整计划的优先级。
- APEX
- O1配置模式:Conv,Matmul等使用float16精度计算,其他如softmax、BN使用float32精度。
- O2配置模式:除BN使用float32精度外,其他部分使用float16精度。
- 静态loss scale:静态设置参数确保混合精度训练收敛。
- 动态loss scale:动态计算loss scale的值并判断是否溢出。
总体而言,我们会努力在以下几个方面不断改进。
# 文档
1、pytorch AICPU多核能力补齐
2、pytorch单算子模式const节点输入
3、pytorch场景支持算子非连续输入
4、pytorch单算子模式支持动态shape
5、NLP网络格式转化方案完善
6、pytorch的基线格式调整
7、reshapeType总体方案梳理优化
8、AICPU针对pytorch方案梳理优化
有关安装指南、模型迁移和训练/推理教程和API列表等更多详细信息,请参考[用户文档](docs/zh)。
热忱希望各位在用户社区加入讨论,并贡献您的建议。
# 建议与交流
热忱希望各位在用户社区加入讨论,并贡献您的建议,我们会尽快给您回复。
# 分支维护策略
@@ -198,49 +238,261 @@ Ascend PyTorch的版本分支有以下几种维护阶段:
| **分支名** | **当前状态** | **上线时间** | **后续状态** | **EOL 日期**|
|------------|--------------|----------------------|----------------------------------------|------------|
| **v2.0.2** | Maintained | 2021-07-29 | Unmaintained <br> 2022-07-29 estimated | |
| **v2.0.2** | EOL | 2021-07-29 | N/A | |
| **v2.0.3** | EOL | 2021-10-15 | N/A | |
| **v2.0.4** | Unmaintained | 2022-01-15 | EOL <br> 2023-04-15 estimated | |
| **v3.0.rc1** | Maintained | 2022-04-10 | Unmaintained <br> 2023-04-10 estimated | |
| **v3.0.rc2** | Maintained | 2022-07-15 | Unmaintained <br> 2023-07-15 estimated | |
| **v3.0.rc3** | Maintained | 2022-10-20 | Unmaintained <br> 2023-10-20 estimated | |
| **v3.0.0** | Maintained | 2023-1-20 | Unmaintained <br> 2024-1-20 estimated | |
# FAQ
## 在PIP设置为华为源时,安装requirments.txt中的typing依赖后,会导致python环境错误。
在PIP设置为华为源时,需打开requirments.txt文件,删除typing依赖,再执行命令。
```
pip3 install -r requirments.txt
```
## import torch 报找不到libhccl.so错误
未配置环境变量,需通过env.sh脚本配置
```
source pytorch/pytorch1.5.0/src/env.sh
```
## 编译过程执行bash build.sh报错FAILED:confu-deps/XNNPACK/CMakefiles/XNNPACK.dir/src/f32-gemm/gen-inc/4x8inc-minmax-{arch}-neonfma-cortex-a{xx}.S.o
编译前,环境变量默认USE_XNNPACK=1,编译时会报错,需设置重设该环境变量,再次编译。
1. 重设环境变量
```
export USE_XNNPACK=0
```
2. 清除编译缓存
```
make clean
```
3. 重新编译
```
bash build.sh --python={python_version}
```
## 编译过程执行bash build.sh报错no module named yaml/typing_extensions.
pytorch编译依赖 yaml库和typing_extensions库,需要手动安装。
```
pip3 install pyyaml
pip3 install typing_extensions
```
安装成功后,注意需要执行make clean在执行bash build.sh进行编译,否则可能因缓存出现未知编译错误。
## 运行遇到找不到te问题
开发态:
cd /urs/local/ascend-toolkit/latest/fwkacllib/lib64
用户态:
cd /urs/local/nnae/latest/fwkacllib/lib64
```
cd /urs/local/Ascend/ascend-toolkit/latest/{arch}-linux/lib64 #{arch}为架构名称。
pip3 install --upgrade topi-0.4.0-py3-none-any.whl
pip3 install --upgrade te-0.4.0-py3-none-any.whl
```
用户态:
```
cd /urs/local/Ascend/nnae/latest/{arch}-linux/lib64 #{arch}为架构名称
pip3 install --upgrade topi-0.4.0-py3-none-any.whl
pip3 install --upgrade te-0.4.0-py3-none-any.whl
```
## 编译cmake报错版本过低
## 命令行安装cmake依赖时提示找不到包、编译cmake报错版本过低,可使用安装脚本或源码编译安装。
cmake官网下载linux版本安装(当前3.18.0)
方法一:下载安装脚本安装cmake。(参考cmake官网)
1. 使用yum命令安装: yum install -y cmake==3.18.0
​ X86_64环境脚本安装:cmake-3.12.0-Linux-x86_64.sh
2. 下载cmake sh脚本安装:(参考cmake官网)
​ aarch64环境脚本安装:cmake-3.12.0-Linux-aarch64.sh
X86_64环境推荐脚本安装: cmake-3.18.2-Linux-x86_64.sh
1. 执行命令。
```
./cmake-3.12.0-Linux-{arch}.sh #{arch}为架构名称
```
## GCC版本问题切换问题
2. 设置软连接。
目前存在测试环境从GCC4.8.5 切换到 GCC7.3.0。这个过程容易出现错误导致pytorch编译不过,以下是需要软连接的库
```
ln -s /usr/local/cmake/bin/cmake /usr/bin/cmake
```
gcc, g++,c++(--version 必须是7.3.0)
3. 执行如下命令验证是否安装成功。
```
cmake --version
```
如显示“cmake version 3.12.0”则表示安装成功。
方法二:使用源码编译安装。
1. 获取Cmake软件包。
```
wget https://cmake.org/files/v3.12/cmake-3.12.0.tar.gz --no-check-certificate
```
2. 解压并进入软件包目录。
```
tar -xf cmake-3.12.0.tar.gz
cd cmake-3.12.0/
```
3. 执行配置、编译和安装命令。
```
./configure --prefix=/usr/local/cmake
make && make install
```
4. 设置软连接。
```
ln -s /usr/local/cmake/bin/cmake /usr/bin/cmake
```
5. 执行如下命令验证是否安装成功。
```
cmake --version
```
如显示“cmake version 3.12.0”则表示安装成功。
## 命令行安装gcc依赖时提示找不到包、编译时gcc报错问题
部分源下载gcc时会提示无法找到包,需要使用源码编译安装。
以下步骤请在root用户下执行。
1. 下载gcc-7.3.0.tar.gz,下载地址为[https://mirrors.tuna.tsinghua.edu.cn/gnu/gcc/gcc-7.3.0/gcc-7.3.0.tar.gz](https://mirrors.tuna.tsinghua.edu.cn/gnu/gcc/gcc-7.3.0/gcc-7.3.0.tar.gz)。
2. 安装gcc时候会占用大量临时空间,所以先执行下面的命令清空/tmp目录:
```
sudo rm -rf /tmp/*
```
3. 安装依赖(以CentOS和Ubuntu系统为例)。
- CentOS执行如下命令安装。
```
yum install bzip2
```
- Ubuntu执行如下命令安装。
```
apt-get install bzip2
```
4. 编译安装gcc。
1. 进入gcc-7.3.0.tar.gz源码包所在目录,解压源码包,命令为:
```
tar -zxvf gcc-7.3.0.tar.gz
```
2. 进入解压后的文件夹,执行如下命令下载gcc依赖包:
```
cd gcc-7.3.0
./contrib/download_prerequisites
```
如果执行上述命令报错,需要执行如下命令在“gcc-7.3.0/“文件夹下下载依赖包:
```
wget http://gcc.gnu.org/pub/gcc/infrastructure/gmp-6.1.0.tar.bz2
wget http://gcc.gnu.org/pub/gcc/infrastructure/mpfr-3.1.4.tar.bz2
wget http://gcc.gnu.org/pub/gcc/infrastructure/mpc-1.0.3.tar.gz
wget http://gcc.gnu.org/pub/gcc/infrastructure/isl-0.16.1.tar.bz2
```
下载好上述依赖包后,重新执行以下命令:
```
./contrib/download_prerequisites
```
如果命令校验失败,需要确认上述依赖包在文件夹中的唯一性,无重复下载,若存在重复的依赖包,需删除。
3. <a name="zh-cn_topic_0000001135347812_zh-cn_topic_0000001173199577_zh-cn_topic_0000001172534867_zh-cn_topic_0276688294_li1649343041310"></a>执行配置、编译和安装命令:
```
./configure --enable-languages=c,c++ --disable-multilib --with-system-zlib --prefix=/usr/local/linux_gcc7.3.0
make -j15 # 通过grep -w processor /proc/cpuinfo|wc -l查看cpu数,示例为15,用户可自行设置相应参数。
make install
```
> ![img](figures/icon-notice.gif) **须知:**
>其中“--prefix“参数用于指定linux_gcc7.3.0安装路径,用户可自行配置,但注意不要配置为“/usr/local“及“/usr“,因为会与系统使用软件源默认安装的gcc相冲突,导致系统原始gcc编译环境被破坏。示例指定为“/usr/local/linux_gcc7.3.0“。
4. 修改软连接。
```
ln -s ${install_path}/gcc-7.3.0/bin/gcc /usr/bin/gcc
ln -s ${install_path}/gcc-7.3.0/bin/g++ /usr/bin/g++
ln -s ${install_path}/gcc-7.3.0/bin/c++ /usr/bin/c++
```
5.配置环境变量。
当用户执行训练时,需要用到gcc升级后的编译环境,因此要在训练脚本中配置环境变量,通过如下命令配置。
```
export LD_LIBRARY_PATH=${install_path}/lib64:${LD_LIBRARY_PATH}
```
其中$\{install\_path\}为[3.](#zh-cn_topic_0000001135347812_zh-cn_topic_0000001173199577_zh-cn_topic_0000001172534867_zh-cn_topic_0276688294_li1649343041310)中配置的gcc7.3.0安装路径,本示例为“/usr/local/gcc7.3.0/“。
>![](figures/icon-note.gif) **说明:**
>本步骤为用户在需要用到gcc升级后的编译环境时才配置环境变量。
若存在pytorch编译不过,请检查软连接的库是否正确。
libstdc++->libstdc++.so.6.0.24(7.3.0)
## 找不到libblas.so问题
环境缺少openblas库,需要安装openblas库
@@ -257,3 +509,28 @@ Ubuntu环境
apt install libopenblas-dev
```
## ARM环境pip安装torchvision失败
可采用源码安装(需先安装昇腾pytorch并通过env.sh配置环境变量)
```
git clone -b v0.6.0 https://github.com/pytorch/vision.git
cd vision
python setup.py install
```
验证torchvision是否安装成功
```
python -c "import torchvision"
```
若不报错,则说明安装成功
# 版本说明
版本说明请参阅[ReleseNote](docs/zh/RELEASENOTE)
@@ -0,0 +1,900 @@
# Overview
Users can obtain PyTorch training models from Ascend ModelZoo, but the models do not support multi-server multi-device training. You need to modify the models based on the actual model code. This document describes how to quickly train a PyTorch model in Distributed Data Parallel (DDP) mode in multi-server multi-device scenario.
# Training Workflow
The process of training a PyTorch model in multi-server multi-device scenario includes environment preparation, model preparation, model modification, and training startup.
1. Environment Preparation
Prepare the software, hardware, and network environment for multi-server multi-device training, including setting up the development and operating environment, connecting the cluster network, setting the processor IP address, and setting the firewall.
2. Model Preparation
Prepare a PyTorch model, data loader, and optimizer for training. You can download them from the open source community (https://gitee.com/ascend/modelzoo/tree/master/built-in/PyTorch) or prepare them by yourself.
3. Model Modification
Modify the basic model and add the code and environment variables required by DDP to enable the multi-server multi-device training.
4. Training Startup
Start model training in the multi-server multi-device scenario and view training logs.
# Quick Start
## Overview
The example presented in this document helps you quickly understand how a PyTorch model is trained in multi-server multi-device scenario. The example uses a custom model for training in two-computer eight-device scenario. The two computers are named AI Server0 and AI Server1. The eight Ascend 910 Processors on each computer are named device0 to device7.
## Preparing the Environment
At least two computers with Ascend 910 Processors installed are required, and the NPU firmware and driver are correctly installed on each computer.
1. Prepare the development and operating environment on each computer.
- Install the CANN development and operating environment. For details, see the *CANN Software Installation Guide*. Use CANN later than 5.0.3.
- Install the PyTorch that adapts to NPU. For details, see the *PyTorch Installation Guide*.
2. Prepare the network.
Set up the network by directly connecting switches or optical ports. For details, see the *Ascend Data Center Solution Networking Guide* at https://support.huawei.com/enterprise/en/doc/EDOC1100221995/229cc0e4.
In this example, two computers with eight devices are used for training, so optical ports are used for network connection.
3. Configure the device IP address.
Configure the device IP address on AI Server0.
```shell
hccn_tool -i 0 -ip -s address 192.168.100.101 netmask 255.255.255.0
hccn_tool -i 1 -ip -s address 192.168.101.101 netmask 255.255.255.0
hccn_tool -i 2 -ip -s address 192.168.102.101 netmask 255.255.255.0
hccn_tool -i 3 -ip -s address 192.168.103.101 netmask 255.255.255.0
hccn_tool -i 4 -ip -s address 192.168.100.100 netmask 255.255.255.0
hccn_tool -i 5 -ip -s address 192.168.101.100 netmask 255.255.255.0
hccn_tool -i 6 -ip -s address 192.168.102.100 netmask 255.255.255.0
hccn_tool -i 7 -ip -s address 192.168.103.100 netmask 255.255.255.0
```
Configure the device IP address on AI Server1.
```shell
hccn_tool -i 0 -ip -s address 192.168.100.111 netmask 255.255.255.0
hccn_tool -i 1 -ip -s address 192.168.101.111 netmask 255.255.255.0
hccn_tool -i 2 -ip -s address 192.168.102.111 netmask 255.255.255.0
hccn_tool -i 3 -ip -s address 192.168.103.111 netmask 255.255.255.0
hccn_tool -i 4 -ip -s address 192.168.100.110 netmask 255.255.255.0
hccn_tool -i 5 -ip -s address 192.168.101.110 netmask 255.255.255.0
hccn_tool -i 6 -ip -s address 192.168.102.110 netmask 255.255.255.0
hccn_tool -i 7 -ip -s address 192.168.103.110 netmask 255.255.255.0
```
4. Configure the firewall.
- Command for disabling the firewall on Ubuntu:
```shell
ufw disable
```
```
- Command for disabling the firewall on Red Hat or CentOS 7:
```shell
systemctl stop firewalld
```
## Preparing a Model
This example creates a simple model for you to quickly understand multi-server multi-device training. You can also obtain the Ascend NPU-based PyTorch training model from the open source community (https://gitee.com/ascend/modelzoo/tree/master/built-in/PyTorch).
1. Prepare a DDP model.
The following is an example of main.py for multi-server multi-device training.
```python
import argparse
import os
import torch
import torchvision
import torch.nn as nn
import torch.nn.functional as F
import torch.distributed as dist
from torch.nn.parallel import DistributedDataParallel as DDP
### 1. Perform basic operations. ###
# Build a model.
class ToyModel(nn.Module):
def __init__(self):
super(ToyModel, self).__init__()
self.conv1 = nn.Conv2d(3, 6, 5)
self.pool = nn.MaxPool2d(2, 2)
self.conv2 = nn.Conv2d(6, 16, 5)
self.fc1 = nn.Linear(16 * 5 * 5, 120)
self.fc2 = nn.Linear(120, 84)
self.fc3 = nn.Linear(84, 10)
def forward(self, x):
x = self.pool(F.relu(self.conv1(x)))
x = self.pool(F.relu(self.conv2(x)))
x = x.view(-1, 16 * 5 * 5)
x = F.relu(self.fc1(x))
x = F.relu(self.fc2(x))
x = self.fc3(x)
return x
# Obtain a dataset.
def get_dataset():
transform = torchvision.transforms.Compose([
torchvision.transforms.ToTensor(),
torchvision.transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))
])
my_trainset = torchvision.datasets.CIFAR10(root='./data', train=True,
download=True, transform=transform)
train_sampler = torch.utils.data.distributed.DistributedSampler(my_trainset)
trainloader = torch.utils.data.DataLoader(my_trainset,
batch_size=16, num_workers=2, sampler=train_sampler)
return trainloader
### 2. Initialize the parameters, data, model, loss function, and optimizer. ####
# Obtain local_rank and addr.
parser = argparse.ArgumentParser()
parser.add_argument("--local_rank", default=-1, type=int)
parser.add_argument("--addr", default='127.0.0.1', type=str, help='master addr')
FLAGS = parser.parse_args()
local_rank = FLAGS.local_rank
addr = FLAGS.addr
# Set the IP address and port of the master node.
os.environ['MASTER_ADDR'] = addr
os.environ['MASTER_PORT'] = '29501'
# Initialize the DDP backend.
loc = 'npu:{}'.format(local_rank)
torch.npu.set_device(loc)
dist.init_process_group(backend='hccl') # HCCL is the backend of the NPU device.
# Prepare data after DDP initialization.
trainloader = get_dataset()
# Instantiate the model.
model = ToyModel().to(loc)
# Load the model weight. The weight needs to be loaded only on the master node before the DDP model is built.
ckpt_path = None
if dist.get_rank() == 0 and ckpt_path is not None:
model.load_state_dict(torch.load(ckpt_path))
# Build the DDP model.
model = DDP(model, device_ids=[local_rank], output_device=local_rank)
# Initialize the optimizer. After the DDP model is built, use the model to initialize the optimizer.
optimizer = torch.optim.SGD(model.parameters(), lr=0.001)
# Initialize the loss function.
loss_func = nn.CrossEntropyLoss().to(loc)
### 3. Train the network.
model.train()
iterator = range(100)
for epoch in iterator:
trainloader.sampler.set_epoch(epoch)
for data, label in trainloader:
data, label = data.to(local_rank), label.to(local_rank)
optimizer.zero_grad()
prediction = model(data)
loss = loss_func(prediction, label)
loss.backward()
print("loss = %0.3f \n" % loss)
optimizer.step()
# 1. Similar to the DP mode, when you save a model, note that model.module instead of model is saved.
# That is because the model actually refers to a DDP model, and the parameters are packaged by `model=DDP(model)`.
# 2. You only need to save the model on process 0 once to avoid repeated saving.
if dist.get_rank() == 0:
torch.save(model.module.state_dict(), "%d.ckpt" % epoch)
```
2. Ensure that the model is correct for training in the single-server multi-device scenario.
1. The Python third-party library is required if you install the model script yourself.
2. Configure NPU environment variables. For information about the **env_npu.sh** script, see the appendix.
```shell
source env_npu.sh
```
3. Execute **torch.distributed.launch** to run the following main.py command to train a model in single-server multi-device scenario.
```shell
python -m torch.distributed.launch --nproc_per_node 8 main.py
```
`--nproc_per_node` indicates the number of training cards.
After the command is run successfully, the model is trained on the eight NPUs of the device.
## Modifying the Model
The example provided in "Quick Start" is adapted to the multi-server multi-device training. You do not need to modify the script. For details about how to modify other models, see section "Multi-server Multi-device Training".
## Starting the Training
1. Upload main.py model script to any directory on AI Server0 and AI Server1.
2. Query the host IP addresses of the servers.
```shell
hostname -I
```
All IP addresses are displayed, and the first IP address is the host IP address of the current server.
For example, the host IP address of AI Server0 is **192.168.*xx*.22**, and that of AI Server1 is **192.168.*xx*.23**.
3. Use AI Server0 as the master node, and start the 2 x 8 cluster.
Startup commands for AI Server0:
```shell
# Set environment variables. Obtain the env_npu.sh script content from the appendix.
source env_npu.sh
# Disable the trustlist of HCCL channel.
export HCCL_WHITELIST_DISABLE=1
# Initialize the IP address of the HCCL communication NIC, and set the IP address to the host IP address of the current server.
export HCCL_IF_IP=192.168.xx.22
#
python3.7 -m torch.distributed.launch --nnodes=2 --node_rank=0 --nproc_per_node 8 --master_addr 192.168.xx.22 --master_port 29501 main.py --addr 192.168.xx.22
```
Startup commands for AI Server1:
```shell
# Set environment variables. Obtain the env_npu.sh script content from the appendix.
source env_npu.sh
# Disable the trustlist of HCCL channel.
export HCCL_WHITELIST_DISABLE=1
# Initialize the IP address of the HCCL communication NIC, and set the IP address to the host IP address of the current server.
export HCCL_IF_IP=192.168.xx.23
python3.7 -m torch.distributed.launch --nnodes=2 --node_rank=1 --nproc_per_node 8 --master_addr 192.168.xx.22 --master_port 29501 main.py --addr 192.168.xx.22
```
Parameter description:
--nnode: specifies the number of nodes used for distributed training scripts.
--node_rank: specifies the rank of the current node during multi-node distributed training.
--nproc_per_node: specifies the number of GPU-based training processes on the current node.
--master_addr: address of the master node (rank is 0). The value can be the IP address or the host name of node 0.
--master_port: specifies the port number used by the master node during distributed training.
--addr: input parameter of the main.py script, specifying the host IP address of the master node.
3. View the host logs.
Host logs are stored in the `~/ascend/log` directory. You can go to this directory to view the device logs of each host.
# Multi-server Multi-device Training
## Common Concepts and Parameters
Basic concepts for PyTorch distributed training
| Basic Concept | Description |
| :-----------: | ------------------------------------------------------------ |
| AI Server | Computer with an Ascend 910 Processors. Multiple computers are identified as AI Server +serial number, for example, AI Server0 and AI Server1. |
| device | Ascend 910 Processors on the AI server. Multiple processors are represented as device 0, device 1, ..., and device 7. |
| host | AI server host. |
| master | Select one of multiple AI servers as the master node for data communication. |
| group | Process group. By default, there is only one group. Use the default value. |
| world size | Number of global parallel processes, which can be obtained by running **torch.distributed.get_world_size()**. The value is the same for different processes. |
| rank | Sequence number of the current process, which is used for communication between processes. For example, for a 2 x 8 cluster, the **world size** is 16, and the rank in each process is [0, 1, 2, ..., 15]. |
| local_rank | Sequence number of processes on each host, for example, there are processes 0-7 on each host. Generally, **local_rank** is used to set the GPU/NPU on which the current model runs. |
Parameters for executing **torch.distributed.launch** to start multi-device training
| Parameter | Description |
| ------------------ | ------------------------------------------------------------ |
| **nnodes** | Specifies the number of nodes used for distributed training scripts. |
| **node_rank** | Specifies the rank of the current node during multi-node distributed training. |
| **nproc_per_node** | Specifies the number of GPU-based training processes on the current node. You are advised to set this parameter to the number of GPUs on the current node. In this way, each process can independently control a GPU to achieve the highest efficiency. |
| **master_addr** | Address of the master node (rank is 0). The value can be the IP address or the host name of node 0. For single-node multi-process training, set this parameter to **127.0.0.1**. |
| **master_port**: | Specifies the port number used by the master node during distributed training. The port number must be different from the port numbers of other applications. |
## Multi-server Multi-device Training Process
### Preparing the Environment
At least two computers with Ascend 910 Processors installed are required, and the NPU firmware and driver are correctly installed on each server.
1. Prepare the development and operating environment on each computer.
- Install the CANN development and operating environment. For details, see the *CANN Software Installation Guide*. Use CANN later than 5.0.3.
- Install the PyTorch that adapts to NPU. For details, see the *PyTorch Installation Guide.*
2. Prepare the network.
Cluster training is completed by multiple computers (a maximum of 128) with Ascend 910 Processors installed. The computers need to work with switches to form a fully-connected active/standby network on the data plane. The 8 x *n*-device training is supported. Two computers can be directly connected through optical ports. For details, see the *Ascend Data Center Solution Networking Guide * at https://support.huawei.com/enterprise/en/doc/EDOC1100221995/229cc0e4.
3. Configure the device IP address.
Use hccn_tool to configure the device IP address. hccn_tool is provided by CANN.
```shell
hccn_tool -i 0 -ip -s address 192.168.100.111 netmask 255.255.255.0
```
Observe the following rules when configuring the device IP address:
1. On the AI servers, devices 0/4, 1/5, 2/6, and 3/7 must be in the same network segment. But devices 0, 1, 2, and 3 must be in different network segments, and devices 4, 5, 6, and 7 must be in different network segments.
2. In the cluster scenario, the devices corresponding to each AI server must be in the same network segment. NICs 0 and 1 of AI Server0 and AI Server1 must be in the same network segment.
3. Each IP address must be unique. IP addresses in the same network segment must be distinguished by the last eight bits.
Use hccn_tool to check whether the device IP address is correct.
- Query the IP address of each device.
```shell
hccn_tool -i 0 -ip –g
```
The IP addresses are displayed:
> ipaddr:192.168.100.101
>
> netmask:255.255.255.0
- Use hccn_tool to ensure that the devices of the two hosts are correctly connected by performing the test for eight times from device0 to devcie7.
```shell
hccn_tool -i 0 -netdetect -s address xx.xx.xx.xx
hccn_tool -i 0 -net_health –g
```
**-i**: device ID.
**-s address**: ***xx.xx.xx.xx*** is the IP address of device *i* on the other host.
If `success` is returned, the connection is successful.
4. Configure the firewall.
During HCCL communication, the firewall may intercept the communication port, causing communication timeout. Therefore, you need to disable the firewall on the server for PyTorch cluster training.
- Command for disabling the firewall on Ubuntu:
```shell
ufw disable
```
- Command for disabling the firewall on Red Hat or CentOS 7:
```shell
systemctl stop firewalld
```
### Preparing a Model
There are two methods for preparing a model.
- Download a PyTorch training model from the open source community (https://gitee.com/ascend/modelzoo/tree/master/built-in/PyTorch).
The model obtained from the open source community supports single-server multi-device training. Modify the model based on the related parameters described in section "Modifying the Model".
- Manually build a PyTorch training model.
1. Prepare a PyTorch training model and data loader.
Prepare a PyTorch model:
```python
class ToyModel(nn.Module):
def __init__(self):
...
def forward(self,x):
...
```
Prepare data:
```python
def get_dataset():
transform = torchvision.transforms.Compose([
torchvision.transforms.ToTensor(),
torchvision.transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))
])
my_trainset = torchvision.datasets.CIFAR10(root='./data', train=True,
download=True, transform=transform)
trainloader = torch.utils.data.DataLoader(my_trainset,batch_size=16,)
return trainloader
trainloader=get_dataset()
```
2. Instantiate the model.
```python
# Instantiate the model.
model = ToyModel().to(loc)
# Load the model weight
if ckpt_path is not None:
model.load_state_dict(torch.load(ckpt_path))
```
3. Prepare the loss function and optimizer.
```python
# Initialize the optimizer. After the DDP model is built, use the model to initialize the optimizer.
optimizer = torch.optim.SGD(model.parameters(), lr=0.001)
# Initialize the loss function.
loss_func = nn.CrossEntropyLoss().to(loc)
```
4. Train the model.
```python
### 3. Train the network.
model.train()
iterator = range(100)
for epoch in iterator:
for data, label in trainloader:
data, label = data.to(local_rank), label.to(local_rank)
optimizer.zero_grad()
prediction = model(data)
loss = loss_func(prediction, label)
loss.backward()
print("loss = %0.3f \n" % loss)
optimizer.step()
torch.save(model.state_dict(), "%d.ckpt" % epoch)
```
### Modifying the Model
Modify the IP address and port of the master node, initialize the **distributed ** function, model DDP, data DDP, and optimizer, and modify the DDP model training method based on the initial model code.
1. Set the IP address and port for the master node. In the NPU distributed training, HCCL is used for communication, while in PyTorch, the HCCL communication mechanism that is detected by automatic topology is used. That is, **RANK_TABLE_FLIE** is not required, but the communication depends on the NIC on the host side. Therefore, you need to set environment variables in the code to set the communication NIC.
```python
os.environ['MASTER_ADDR'] = xxx.xxx.xxx.xxx
os.environ['MASTER_PORT'] = 'xxx'
```
**MASTER_ADDR**: Set this parameter to the IP address of the master node in the cluster. (Select any host as the master node.)
**MASTER_PORT**: Set this parameter to the idle port of the master node.
In the model code, the IP address and port number of the master node are generally presented as transferred parameters. In some open-source code, the IP address and port number may be presented as **127.0.0.1**. In this case, you need to modify them.
The preceding variables must be declared before **torch.distributed.init_process_group()** is invoked.
2. Initialize **distributed**.
In PyTorch, `dist.init_process_group(backend='hccl', world_size=world_size, rank=rank)` is used to initialize thread groups. The parameters are described as follows:
`backend`: communication protocol used for distributed training. Only hccl can be used on the NPU.
`world_size`: total number of devices used for training.
`rank`: rank ID of the currently initialized device, that is, the global logical ID.
There are two methods to start multi-device training:
- **torch.distributed.launch**:
```python
import torch.distributed as dist
dist.init_process_group(backend='hccl') # HCCL is the backend of the NPU device.
```
- **mp.spawn**:
```python
import torch.distributed as dist
def main_worker(pid_idx, device_nums_per_node, args):
args.distributed_rank = args.rank * device_nums_per_node + pid_idx
dist.init_process_group(backend=args.dist_backend, world_size=args.distributed_world_size, rank=args.distributed_rank)
```
In the preceding commands:
`pid_idx`: device ID.
`device_nums_per_node`: number of devices on each AI server.
3. Initialize the model DDP.
```python
# Instantiate the model.
model = ToyModel().to(loc)
# Load the model weight. It needs to be loaded only on the master node before the DDP model is built.
if dist.get_rank() == 0 and ckpt_path is not None:
model.load_state_dict(torch.load(ckpt_path))
# Build the DDP model.
model = DDP(model, device_ids=[local_rank], output_device=local_rank)
```
4. Initialize the data DDP.
```python
def get_dataset():
transform = torchvision.transforms.Compose([
torchvision.transforms.ToTensor(),
torchvision.transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))
])
my_trainset = torchvision.datasets.CIFAR10(root='./data', train=True,
download=True, transform=transform)
train_sampler = torch.utils.data.distributed.DistributedSampler(my_trainset)
trainloader = torch.utils.data.DataLoader(my_trainset,
batch_size=16, num_workers=2, sampler=train_sampler)
return trainloader
trainloader = get_dataset()
```
5. Initialize the loss function and optimizer.
```python
# Initialize the optimizer. After the DDP model is built, use the model to initialize the optimizer.
optimizer = torch.optim.SGD(model.parameters(), lr=0.001)
# Initialize the loss function.
loss_func = nn.CrossEntropyLoss().to(loc)
```
6. Train the DDP model.
```python
model.train()
iterator = range(100)
for epoch in iterator:
# Set epoch.
trainloader.sampler.set_epoch(epoch)
for data, label in trainloader:
data, label = data.to(local_rank), label.to(local_rank)
optimizer.zero_grad()
prediction = model(data)
loss = loss_func(prediction, label)
loss.backward()
print("loss = %0.3f \n" % loss)
optimizer.step()
# 1. Similar to the DP mode, when you save a model, note that model.module instead of model is saved.
# That is because the model actually refers to a DDP model, and the parameters are packaged by `model=DDP(model)`.
# 2. You only need to save the model on process 0 once to avoid repeated saving.
if dist.get_rank() == 0:
torch.save(model.module.state_dict(), "%d.ckpt" % epoch)
```
### Start the Training
The training can be started manually or using the shell script.
- Start the training manually using **torch.distributed.launch**.
1. Configure NPU environment variables. For details, see the **env_npu.sh** script in the appendix.
2. Add environment variables. For multi-server training, add the `HCCL_WHITELIST_DISABLE` and `HCCL_IF_IP` environment variables.
- **HCCL_WHITELIST_DISABLE**: HCCL channel trustlist. The value **1** indicates that the trustlist is disabled.
- **HCCL_IF_IP**: initialized IP address of the HCCL communication NIC. Set it to the IP address of the host NIC IP of the current server.
3. Upload the modified model script to each AI server.
4. Install the required Python library on each AI server.
5. Select an AI server as the master node and query the IP address of each AI server.
6. Run the following commands on each AI server:
```
python3 -m torch.distributed.launch --nnodes=${nnodes} --node_rank=i --nproc_per_node 8 --master_addr 192.168.xx.22 --master_port 29501 main.py --addr 192.168.xx.22
```
In the preceding commands:
**--nnodes**: number of AI servers used for distributed training scripts.
**--node_rank**: AI server ID.
**--nproc_per_node**: number of devices of each AI server.
**--master_addr**: IP address of the AI server that functions as the master node.
**--master_port**: port number of the AI server that functions as the master node.
**main.py**: Change it to the name of the startup script.
**--addr**: indicates the IP address of the master node, which is a parameter transferred to the startup script.
- Start the training using Open MPI.
1. Install the PI open-source library.
In the multi-server multi-device scenario, distributed training deployment depends on the Open MPI open-source library, which must be installed on each server that participates in model training. Currently, Open MPI 4.0.1, 4.0.2, or 4.0.3 is required.
Run the **mpirun --version** command to check whether Open MPI has been installed. If `mpirun (Open MPI) 4.0.2 Report bugs to http://www.open-mpi.org/community/help/` is returned, Open MPI has been installed. If it has been installed and its version is 4.0.1, 4.0.2, or 4.0.3, you do not need to install it again.
Otherwise, perform the following steps to install it
1. Visit the following link to download the Open MPI software package, for example, openmpi-4.0.2.tar.bz2.
https://www.open-mpi.org/software/ompi/v4.0/
2. Log in to the installation environment as the root user.
3. Upload the downloaded Open MPI software package to a directory in the installation environment.
4. Go to the directory and run the following command to decompress the software package:
```shell
tar -jxvf openmpi-4.0.2.tar.bz2
```
5. Go to the directory generated after the decompression, and run the following commands to configure, compile, and install Open MPI:
```shell
./configure --prefix=/usr/local/mpirun4.0.2
make
make install
```
The **--prefix** parameter specifies the Open MPI installation path. Change it based on the site requirements.
6. Run the **vi ~/.bashrc** command to open the **.bashrc** file, and add the following environment variables to the end of the file:
```shell
export OPENMPI=/usr/local/mpirun4.0.2
export LD_LIBRARY_PATH=$OPENMPI/lib
export PATH=$OPENMPI/bin:$PATH
```
In the environment variables, **/usr/local/mpirun4.0.2** indicates the Open MPI installation path. Change it based on the site requirements.
Run the **:wq!** command to save the file and exit.
7. Make the configuration take effect.
```
source ~/.bashrc
```
8. After the installation is complete, run the following command to check the installation version. If the required version information is displayed, the installation is successful.
```
mpirun --version
```
2. Configure SSH password-free login for the AI servers.
If Open MPI is used for distributed training deployment in the multi-server multi-device scenario, you need to configure SSH password-free login between every two servers to ensure that the servers can communicate with each other. The procedure is as follows:
1. Log in to each server as the root user.
2. Configure the reliability among hosts in the cluster.
Open the **/etc/ssh/ssh_config** file and add the following fields to the end of the file:
```
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
```
3. Open the **/etc/hosts** file on each server and add the corresponding IP address and host name of the server to the first line of the file. If the file already contains the IP address and host name, skip this step. The following is an example of the content to be added:
```
xxx.xxx.xxx.111 ubuntu
```
In the preceding content, **xxx.xxx.xxx.111** is the IP address of the server, and **ubuntu** is the host name.
4. Run the following commands on the first server to generate a public key (Assume that the IP address of the first server is **xxx.xxx.xxx.111**.):
```
cd ~/.ssh/ # If the directory does not exist, run the ssh localhost command first.
ssh-keygen -t rsa # After the key is generated, a message is displayed. Press Enter for three consecutive times.
mv id_rsa.pub authorized_keys # Renames the generated key id_rsa.pub to authorized_keys.
```
5. Generate a key on each of the other servers, and copy the keys to the **authorized_keys** file on the first server.
1. Run the following commands on each of the other servers to generate a key:
cd ~/.ssh/
ssh-keygen -t rsa
2. Download the key file **id_rsa.pub** generated on each server to the local host and copy the key in the file.
3. On the first server, run the following command to open the authorized_keys file and copy the keys of each of other servers to the end of the public key of the first server.
```
vi ~/.ssh/authorized_keys
```
Run the **:wq!** command to save the file.
6. Run the following commands on each of the other servers to copy the public key of the first server to each of the other servers:
cd ~/.ssh/
scp root@xxx.xxx.xxx.111:~/.ssh/authorized_keys ./
7. Run the following command on each server to test password-free login:
```
ssh User name@IP address
```
For example, run the **ssh root@xxx.xxx.xxx.222** command to log in to the server whose IP address is xxx.xxx.xxx.222 from the first server whose IP address is xxx.xxx.xxx.111 without a password.
If information similar to the following is displayed, the login without a password is successful.
```
Linux ubuntu 4.19.28 #1 SMP Tue Jun 23 19:05:23 EDT 2020 x86_64
The programs included with the ubuntu GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
ubuntu GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Sep 15 14:37:21 2020 from 10.254.88.75
```
You can run the **exit** command to log out of the server. If information similar to the following is displayed, the logout is successful.
```
logout
Connection to xxx.xxx.xxx.222 closed.
```
3. Use Open MPI to start model training.
1. Compile a startup script for each AI server, for example, train.sh, and move the startup script to the same path of the corresponding AI server.
```
# Configure NPU environment variables. For information about the env_npu.sh script, see the appendix.
source env_npu.sh
#Disable the trustlist of HCCL channel.
export HCCL_WHITELIST_DISABLE=1
# Initialize the IP address of the HCCL communication NIC , and set the IP address to the host IP address of the current server.
export HCCL_IF_IP=xxx.xxx.xx.xxx
python3 -m torch.distributed.launch --nnodes=${nnodes} --node_rank=i --nproc_per_node 8 --master_addr xxx.xxx.xx.xxx --master_port 29501 main.py --addr xxx.xxx.xx.xxx
```
For details about the script parameters, see section "Start the training manually using **torch.distributed.launch**".
2. Compile the startup script.
```
# Configuring the mpirun environment variables.
export PATH=$PATH:/usr/local/mpirun4.0.2/bin
# Run the mpirun tool.
mpirun -H xxx.xxx.xxx.xxx:1,xxx.xxx.xxx.xxx:1 \
--bind-to none -map-by slot \
--mca btl_tcp_if_exclude lo,docker0,endvnic\
--allow-run-as-root \
--prefix /usr/local/mpirun4.0.2/ \
./train.sh
```
In the preceding command:
**-H**: IP address of each AI server and the number of started processes.
**--bind-to**: process-binding policy.
**--mca**: MCA parameter in a specific context. **arg0** is the parameter name, and **arg1** is the parameter value.
**--allow-run-as-root**: The root user is allowed to run this script.
**--prefix**: path of mpirun4.0.2.
**./train.sh**: path of the startup script of each AI server.
4. View the log information after the training succeeds.
Host logs are stored in the `~/ascend/log` directory. You can go to this directory to view the device logs of each host.
# Appendix
The following shows the NPU environment variable configuration script **env_npu.sh**, which can be used to configure the operating and development environment variables.
```shell
#!/bin/bash
export install_path=/usr/local/Ascend
if [ -d ${install_path}/toolkit ]; then
export LD_LIBRARY_PATH=/usr/include/hdf5/lib/:/usr/local/:/usr/local/lib/:/usr/lib/:${install_path}/fwkacllib/lib64/:${install_path}/driver/lib64/common/:${install_path}/driver/lib64/driver/:${install_path}/add-ons:${path_lib}:${LD_LIBRARY_PATH}
export PATH=${install_path}/fwkacllib/ccec_compiler/bin:${install_path}/fwkacllib/bin:$PATH
export PYTHONPATH=${install_path}/fwkacllib/python/site-packages:${install_path}/tfplugin/python/site-packages:${install_path}/toolkit/python/site-packages:$PYTHONPATH
export PYTHONPATH=/usr/local/python3.7.5/lib/python3.7/site-packages:$PYTHONPATH
export ASCEND_OPP_PATH=${install_path}/opp
else
if [ -d ${install_path}/nnae/latest ];then
export LD_LIBRARY_PATH=/usr/local/:/usr/local/python3.7.5/lib/:/usr/local/openblas/lib:/usr/local/lib/:/usr/lib64/:/usr/lib/:${install_path}/nnae/latest/fwkacllib/lib64/:${install_path}/driver/lib64/common/:${install_path}/driver/lib64/driver/:${install_path}/add-ons/:/usr/lib/aarch64_64-linux-gnu:$LD_LIBRARY_PATH
export PATH=$PATH:${install_path}/nnae/latest/fwkacllib/ccec_compiler/bin/:${install_path}/nnae/latest/toolkit/tools/ide_daemon/bin/
export ASCEND_OPP_PATH=${install_path}/nnae/latest/opp/
export OPTION_EXEC_EXTERN_PLUGIN_PATH=${install_path}/nnae/latest/fwkacllib/lib64/plugin/opskernel/libfe.so:${install_path}/nnae/latest/fwkacllib/lib64/plugin/opskernel/libaicpu_engine.so:${install_path}/nnae/latest/fwkacllib/lib64/plugin/opskernel/libge_local_engine.so
export PYTHONPATH=${install_path}/nnae/latest/fwkacllib/python/site-packages/:${install_path}/nnae/latest/fwkacllib/python/site-packages/auto_tune.egg/auto_tune:${install_path}/nnae/latest/fwkacllib/python/site-packages/schedule_search.egg:$PYTHONPATH
export ASCEND_AICPU_PATH=${install_path}/nnae/latest
else
export LD_LIBRARY_PATH=/usr/local/:/usr/local/lib/:/usr/lib64/:/usr/lib/:/usr/local/python3.7.5/lib/:/usr/local/openblas/lib:${install_path}/ascend-toolkit/latest/fwkacllib/lib64/:${install_path}/driver/lib64/common/:${install_path}/driver/lib64/driver/:${install_path}/add-ons/:/usr/lib/aarch64-linux-gnu:$LD_LIBRARY_PATH
export PATH=$PATH:${install_path}/ascend-toolkit/latest/fwkacllib/ccec_compiler/bin/:${install_path}/ascend-toolkit/latest/toolkit/tools/ide_daemon/bin/
export ASCEND_OPP_PATH=${install_path}/ascend-toolkit/latest/opp/
export OPTION_EXEC_EXTERN_PLUGIN_PATH=${install_path}/ascend-toolkit/latest/fwkacllib/lib64/plugin/opskernel/libfe.so:${install_path}/ascend-toolkit/latest/fwkacllib/lib64/plugin/opskernel/libaicpu_engine.so:${install_path}/ascend-toolkit/latest/fwkacllib/lib64/plugin/opskernel/libge_local_engine.so
export PYTHONPATH=${install_path}/ascend-toolkit/latest/fwkacllib/python/site-packages/:${install_path}/ascend-toolkit/latest/fwkacllib/python/site-packages/auto_tune.egg/auto_tune:${install_path}/ascend-toolkit/latest/fwkacllib/python/site-packages/schedule_search.egg:$PYTHONPATH
export ASCEND_AICPU_PATH=${install_path}/ascend-toolkit/latest
fi
fi
#Output host logs to the serial port. 0: disable; 1: enable.
export ASCEND_SLOG_PRINT_TO_STDOUT=0
#Set the default log level. 0: debug; 1: info; 2: warning; 3: error.
export ASCEND_GLOBAL_LOG_LEVEL=3
#Enable or disable the event log. 0: disable; 1: enable.
export ASCEND_GLOBAL_EVENT_ENABLE=0
#Enable or disable taskque. 0: disable; 1: enable.
export TASK_QUEUE_ENABLE=1
#Enable or disable the HCCL trustlist. 1: disable; 0: enable.
export HCCL_WHITELIST_DISABLE=1
#Set the device-side log to error.
${install_path}/driver/tools/msnpureport -g error -d 0
${install_path}/driver/tools/msnpureport -g error -d 1
${install_path}/driver/tools/msnpureport -g error -d 2
${install_path}/driver/tools/msnpureport -g error -d 3
${install_path}/driver/tools/msnpureport -g error -d 4
${install_path}/driver/tools/msnpureport -g error -d 5
${install_path}/driver/tools/msnpureport -g error -d 6
${install_path}/driver/tools/msnpureport -g error -d 7
#Disable the event log on the device side.
${install_path}/driver/tools/msnpureport -e disable
path_lib=$(python3.7 -c """
import sys
import re
result=''
for index in range(len(sys.path)):
match_sit = re.search('-packages', sys.path[index])
if match_sit is not None:
match_lib = re.search('lib', sys.path[index])
if match_lib is not None:
end=match_lib.span()[1]
result += sys.path[index][0:end] + ':'
result+=sys.path[index] + '/torch/lib:'
print(result)"""
)
echo ${path_lib}
export LD_LIBRARY_PATH=/usr/local/python3.7.5/lib/:${path_lib}:$LD_LIBRARY_PATH
```
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,486 @@
# PyTorch Installation Guide
- [Overview](#overview)
- [System Dependencies](#system-dependencies)
- [Ascend Auxiliary Software](#ascend-auxiliary-software)
- [Installation Methods](#installation-methods)
- [Running] (#running)
- [(Optional) Installing the Mixed Precision Module](#optional-installing-the-mixed-precision-module)
- [FAQ](#faq)
- [Release Notes](#release-notes)
# Overview<a name="Overview"></a>
This project develops the PyTorch Adapter plugin to adapt Ascend to the PyTorch framework so that developers who use the PyTorch framework can obtain powerful compute capabilities of Ascend AI Processors. When setting up the environment for model development and running under PyTorch, you can manually build and install modules adapted to the PyTorch framework on a server.
## Prerequisites
- The development or operating environment of CANN has been installed. For details, see the *CANN Software Installation Guide*.
- Python version: 3.7.5 or 3.8
# System Dependencies<a name="System Dependencies"></a>
## CentOS & EulerOS
yum install -y patch zlib-devel libffi-devel openssl-devel libjpeg-turbo-devel gcc-c++ sqlite-devel dos2unix openblas git dos2unix
yum install -y gcc==7.3.0 cmake==3.12.0
## Ubuntu
apt-get install -y patch g++ make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev m4 dos2unix libopenblas-dev git dos2unix
apt-get install -y gcc==7.3.0 cmake==3.12.0
>![](public_sys-resources/icon-note.gif) **NOTE:**
>If an error occurs during the installation of the GCC and CMake dependency commands, use the source code for installation. For details, see the FAQ.
# Ascend Auxiliary Software<a name="Ascend Auxiliary Software"></a>
| AscendPyTorch Version| CANN Version| Supported PyTorch Version| Gitee Branch|
| :------------ | :----------- | :----------- | ------------ |
| 2.0.2 | CANN 5.0.2 | 1.5.0.post2 | 2.0.2.tr5 |
| 2.0.3 | CANN 5.0.3 | 1.5.0.post3 | 2.0.3.tr5 |
| 2.0.4 | CANN 5.0.4 | 1.5.0.post4 | 2.0.4.tr5 |
| 3.0.rc1 | CANN 5.1.RC1 | 1.5.0.post5 | v1.5.0-3.0.rc1 |
| 3.0.rc1 | CANN 5.1.RC1 | 1.8.1.rc1 | v1.8.1-3.0.rc1 |
| 3.0.rc2 | CANN 5.1.RC2 | 1.5.0.post6 | v1.5.0-3.0.rc2 |
| 3.0.rc2 | CANN 5.1.RC2 | 1.8.1.rc2 | v1.8.1-3.0.rc2 |
# Installation Methods<a name="Installation Methods"></a>
## Installing the PyTorch Environment Dependencies
Obtain the PyTorch source code (from the current repository) that adapts to Ascend AI Processors.
```
git clone -b v1.5.0-3.0.rc2 https://gitee.com/ascend/pytorch.git
```
## Obtaining the Native PyTorch Source Code and Third-Party Code
Obtain the native PyTorch 1.5.0 source code from the root directory **/pytorch** of the current repository. Check whether there are fixed security-related issues in the Security and Issues categories in the PyTorch native repository. Update the native PyTorch code if there are any fixes.
```sh
cd pytorch
git clone -b v1.5.0 --depth=1 https://github.com/pytorch/pytorch.git
```
Go to the **pytorch/pytorch/** directory and obtain the passive dependency code of PyTorch. It takes a long time to obtain the code.
```sh
cd pytorch
git submodule sync
git submodule update --init --recursive
```
If no error is reported, the PyTorch and third-party code on which PyTorch depends is generated.
## Generating Full PyTorch Code That Adapts to Ascend AI Processors
Go to the **pytorch/scripts** directory and run the script of the selected version. (Note: The downloaded native PyTorch source code must match the following version. Otherwise, an error may occur.)
```sh
cd ../scripts/
bash gen.sh
```
The full code adapted to the NPU is generated in the **pytorch/pytorch/** directory.
## Installing the Python Dependency Library
Go to the **pytorch/pytorch/** directory and install the Python dependency library.
```python3
cd ../pytorch
pip3 install -r requirements.txt
```
## Compiling Torch Binary Package
In the **pytorch/pytorch/** directory, run the following command:
```sh
# Python 3.7
bash build.sh
or
bash build.sh --python=3.7 (recommended)
# Python 3.8
bash build.sh --python=3.8
```
The generated binary package is in the **pytorch/pytorch/dist/** directory.
## Installing PyTorch
**x86_64:**
**torch-1.5.0+ascend-cp37-cp37m-linux_x86_64.whl** (The actual name may contain the minor version number, for example, **torch-1.5.0.post2+ascend-cp37-cp37m-linux_x86_64.whl**.)
```shell
cd dist
pip3 uninstall torch
pip3 install --upgrade torch-1.5.0+ascend-cp37-cp37m-linux_x86_64.whl
```
**arm:**
**torch-1.5.0+ascend-cp37-cp37m-linux_aarch64.whl** (The actual name may contain the minor version number, for example, **torch-1.5.0.post2+ascend-cp37-cp37m-linux_aarch64.whl**.)
```shell
cd dist
pip3 uninstall torch
pip3 install --upgrade torch-1.5.0+ascend-cp37-cp37m-linux_aarch64.whl
```
# Running<a name="Running"></a>
## Executing Environment Variables
Run the script for setting environment variables in the **pytorch/pytorch/** directory.
```
cd ../
source env.sh
```
The following are optional environment variables that may affect running models:
```
export COMBINED_ENABLE=1 # (Optional) Discontinuous-to-continuous level-2 derivation optimization. To enable this function, set the value to **1**. When a large number of time-consuming AsStrided operators are called in the model, you can enable this function to improve the device execution efficiency.
export ACL_DUMP_DATA=1 # (Optional) Operator data dump function, which is used for debugging. To enable this function, set the value to **1**.
export TASK_QUEUE_ENABLE=1 # Delivered by an asynchronous task to asynchronously call the ACL interface. You are advised to enable this environment variable and set its value to **1**.
```
If the system is openEuler or its inherited OS, such as UOS, run the following command to cancel CPU core binding.
```
# unset GOMP_CPU_AFFINITY
```
**Table 1** Description of environment variables
<a name="zh-cn_topic_0000001152616261_table42017516135"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001152616261_row16198951191317"><th class="cellrowborder" valign="top" width="55.48%" id="mcps1.2.3.1.1"><p id="zh-cn_topic_0000001152616261_p51981251161315"><a name="zh-cn_topic_0000001152616261_p51981251161315"></a><a name="zh-cn_topic_0000001152616261_p51981251161315"></a>Environment Variable</p>
</th>
<th class="cellrowborder" valign="top" width="44.519999999999996%" id="mcps1.2.3.1.2"><p id="zh-cn_topic_0000001152616261_p9198135114133"><a name="zh-cn_topic_0000001152616261_p9198135114133"></a><a name="zh-cn_topic_0000001152616261_p9198135114133"></a>Description</p>
</td>
</tr>
<tr id="row78312162301"><td class="cellrowborder" valign="top" width="55.48%" headers="mcps1.2.3.1.1 "><p id="p1832171673019"><a name="p1832171673019"></a><a name="p1832171673019"></a>COMBINED_ENABLE</p>
</td>
<td class="cellrowborder" valign="top" width="44.519999999999996%" headers="mcps1.2.3.1.2 "><p id="p583261643014"><a name="p583261643014"></a><a name="p583261643014"></a>(Optional) Discontinuous-to-continuous level-2 derivation optimization. To enable this function, set the value to **1**. When a large number of time-consuming AsStrided operators are called in the model, you can enable this function to improve the device execution efficiency.</p>
</td>
</tr>
<tr id="row183041355123411"><td class="cellrowborder" valign="top" width="55.48%" headers="mcps1.2.3.1.1 "><p id="p730435533415"><a name="p730435533415"></a><a name="p730435533415"></a>ACL_DUMP_DATA</p>
</td>
<td class="cellrowborder" valign="top" width="44.519999999999996%" headers="mcps1.2.3.1.2 "><p id="p16304105533412"><a name="p16304105533412"></a><a name="p16304105533412"></a>(Optional) Operator data dump function, which is used for debugging. To enable this function, set the value to **1**.</p>
</td>
</tr>
<tr id="row19173161510309"><td class="cellrowborder" valign="top" width="55.48%" headers="mcps1.2.3.1.1 "><p id="zh-cn_topic_0000001152616261_p16711563237"><a name="zh-cn_topic_0000001152616261_p16711563237"></a><a name="zh-cn_topic_0000001152616261_p16711563237"></a>TASK_QUEUE_ENABLE</p>
</td>
<td class="cellrowborder" valign="top" width="44.519999999999996%" headers="mcps1.2.3.1.2 "><p id="zh-cn_topic_0000001152616261_p0711356152317"><a name="zh-cn_topic_0000001152616261_p0711356152317"></a><a name="zh-cn_topic_0000001152616261_p0711356152317"></a>(Optional) Use asynchronous task delivery to asynchronously invoke the ACL interface. To enable this function, set it to **1** (recommended default setting). </p>
</td>
</tbody>
</table>
## Running the Unit Test Script
Verify the running. The output is **OK**.
```shell
// Select a test script that matches the preceding version. The following uses the 1.5.0 version as an example.
cd ../
python3 pytorch1.5.0/test/test_npu/test_network_ops/test_div.py
```
# (Optional) Installing the Mixed Precision Module<a name="(Optional) Installing the Mixed Precision Module"></a>
Select the APEX module based on the following functions. For details about how to build and install the APEX module, see the [README.en](https://gitee.com/ascend/apex/tree/v1.5.0-3.0.rc2/).
- APEX
- O1 configuration mode: Conv and Matmul use the float16 precision for computing, and Softmax and BN use float32.
- O2 configuration mode: BN uses the float32 precision for computing, and others use float16.
- Static loss scale: Parameters are statically set to ensure the convergence of training with mixed precision.
- Dynamic loss scale: The loss scale value is dynamically calculated to determine whether overflow occurs.
# FAQ
## When PIP is set to the Huawei source, a Python environment error occurs after the typing dependency in the **requirements.txt** file is installed.
When PIP is set to the Huawei source, open the **requirements.txt** file, delete the typing dependency, and then run the following command:
```
pip3 install -r requirments.txt
```
## The **libhccl.so** cannot be found by **import torch**.
Environment variables are not configured. You need to configure them using the **env.sh** script.
```
source pytorch/pytorch1.5.0/src/env.sh
```
## The error message "no module named yaml/typing_extensions." is displayed when **bash build.sh** is run during compilation.
PyTorch compilation depends on the YAML and typing_extensions libraries, which need to be manually installed.
```
pip3 install pyyaml
pip3 install typing_extensions
```
After the installation is successful, run **make clean** and then **bash build.sh** to perform compilation. Otherwise, an unknown compilation error may occur due to the cache.
## TE cannot be found during running.
Development state:
```
cd /urs/local/Ascend/ascend-toolkit/latest/{arch}-linux/lib64 # {arch} is the architecture name.
pip3 install --upgrade topi-0.4.0-py3-none-any.whl
pip3 install --upgrade te-0.4.0-py3-none-any.whl
```
User state:
```
cd /urs/local/Ascend/nnae/latest/{arch}-linux/lib64 # {arch} is the architecture name.
pip3 install --upgrade topi-0.4.0-py3-none-any.whl
pip3 install --upgrade te-0.4.0-py3-none-any.whl
```
## During CMake installation through the CLI, an error is reported indicating that the package cannot be found. During CMake compilation, another error is reported indicating that the version is too early. In this cause, you can use the installation script or source code to compile and install CMake.
Method 1: Download the installation script and install CMake. (For details, see the CMake official website.)
​ x86_64 environment: cmake-3.12.0-Linux-x86_64.sh
​ AArch64 environment: cmake-3.12.0-Linux-aarch64.sh
1. Run the following command:
```
./cmake-3.12.0-Linux-{arch}.sh #{arch} indicates the architecture name.
```
2. Set the soft link.
```
ln -s /usr/local/cmake/bin/cmake /usr/bin/cmake
```
3. Run the following command to check whether CMake has been installed:
```
cmake --version
```
If the message "cmake version 3.12.0" is displayed, the installation is successful.
Method 2: Use the source code to compile and install.
1. Obtain the CMake software package.
```
wget https://cmake.org/files/v3.12/cmake-3.12.0.tar.gz --no-check-certificate
```
2. Decompress the package and go to the software package directory.
```
tar -xf cmake-3.12.0.tar.gz
cd cmake-3.12.0/
```
3. Run the configuration, compilation, and installation commands.
```
./configure --prefix=/usr/local/cmake
make && make install
```
4. Set the soft link.
```
ln -s /usr/local/cmake/bin/cmake /usr/bin/cmake
```
5. Run the following command to check whether CMake has been installed:
```
cmake --version
```
If the message "cmake version 3.12.0" is displayed, the installation is successful.
## During GCC installation through the CLI, an error is reported indicating that the package cannot be found. During GCC compilation, another error is reported.
When downloading GCC from some sources, you may be prompted by an error message indicating that the package cannot be found. In this case, use the source code to compile and install GCC.
Perform the following steps as the **root** user.
1. Download **gcc-7.3.0.tar.gz** from [https://mirrors.tuna.tsinghua.edu.cn/gnu/gcc/gcc-7.3.0/gcc-7.3.0.tar.gz](https://mirrors.tuna.tsinghua.edu.cn/gnu/gcc/gcc-7.3.0/gcc-7.3.0.tar.gz).
2. GCC installation requires adequate temporary space. Run the following command to clear the **/tmp** directory in advance:
```
sudo rm -rf /tmp/*
```
3. Install the dependency package. (CentOS and Ubuntu are used as examples.)
- For CentOS, run the following command:
```
yum install bzip2
```
- For Ubuntu, run the following command:
```
apt-get install bzip2
```
4. Compile and install GCC.
1. Go to the directory where the source package **gcc-7.3.0.tar.gz** is located and run the following command to decompress it:
```
tar -zxvf gcc-7.3.0.tar.gz
```
2. Go to the extracted directory and download the GCC dependency packages:
```
cd gcc-7.3.0
./contrib/download_prerequisites
```
If an error is reported during the command execution, run the following commands in the **gcc-7.3.0/** directory to download the dependency packages:
```
wget http://gcc.gnu.org/pub/gcc/infrastructure/gmp-6.1.0.tar.bz2
wget http://gcc.gnu.org/pub/gcc/infrastructure/mpfr-3.1.4.tar.bz2
wget http://gcc.gnu.org/pub/gcc/infrastructure/mpc-1.0.3.tar.gz
wget http://gcc.gnu.org/pub/gcc/infrastructure/isl-0.16.1.tar.bz2
```
After the preceding dependencies are downloaded, run the following command again:
```
./contrib/download_prerequisites
```
If the verification fails, check whether there are duplicate dependency packages in the folder. If yes, delete duplicate ones.
3. <a name="zh-cn_topic_0000001135347812_zh-cn_topic_0000001173199577_zh-cn_topic_0000001172534867_zh-cn_topic_0276688294_li1649343041310"></a>Run the configuration, compilation, and installation commands.
```
./configure --enable-languages=c,c++ --disable-multilib --with-system-zlib --prefix=/usr/local/linux_gcc7.3.0
make -j15 # Check the number of CPUs by running **grep -w processor /proc/cpuinfo|wc -l**. In this example, the number is 15. You can set the parameters as required.
make install
```
> ![img](public_sys-resources/icon-notice.gif) **NOTE: **
>The **--prefix** option is used to specify the **linux_gcc7.3.0** installation path, which is configurable. Do not set it to **/usr/local** or **/usr,** which is the default installation path for the GCC installed by using the software source. Otherwise, a conflict occurs and the original GCC compilation environment of the system is damaged. In this example, the installation path is set to **/usr/local/linux_gcc7.3.0**.
4. Change the soft links.
```
ln -s ${install_path}/bin/gcc /usr/bin/gcc
ln -s ${install_path}/bin/g++ /usr/bin/g++
ln -s ${install_path}/bin/c++ /usr/bin/c++
```
5. Configure environment variables.
Training must be performed in the compilation environment with GCC upgraded. If you want to run training, configure the following environment variable in your training script:
```
export LD_LIBRARY_PATH=${install_path}/lib64:${LD_LIBRARY_PATH}
```
**${install_path}** indicates the GCC 7.3.0 installation path configured in [3.](#zh-cn_topic_0000001135347812_zh-cn_topic_0000001173199577_zh-cn_topic_0000001172534867_zh-cn_topic_0276688294_li1649343041310). In this example, the GCC 7.3.0 installation path is **/usr/local/linux_gcc7.3.0/**.
>![](public_sys-resources/icon-note.gif) **NOTE:**
>Skip this step if you do not need to use the compilation environment with GCC upgraded.
If the PyTorch compilation fails, check whether the soft link library is correct.
libstdc++->libstdc++.so.6.0.24(7.3.0)
## libblas.so cannot be found.
The OpenBLAS library is missing in the environment. You need to install it.
CentOS and EulerOS
```sh
yum -y install openblas
```
Ubuntu
```sh
apt install libopenblas-dev
```
## torchvision fails to be installed using pip in the Arm environment.
The source code can be used for installation. (You need to install the AscendPyTorch first and configure environment variables using **env.sh**.)
```
git clone -b v0.6.0 https://github.com/pytorch/vision.git
cd vision
python setup.py install
```
Verify that the torchvision is successfully installed.
```
python -c "import torchvision"
```
If no error is reported, the installation is successful.
For details about releases, see [Release Notes](https://gitee.com/ascend/pytorch/blob/v1.5.0-3.0.rc2/docs/zh/RELEASENOTE/RELEASENOTE.md).
Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Before

Width:  |  Height:  |  Size: 580 B

After

Width:  |  Height:  |  Size: 580 B

Before

Width:  |  Height:  |  Size: 580 B

After

Width:  |  Height:  |  Size: 580 B

Before

Width:  |  Height:  |  Size: 394 B

After

Width:  |  Height:  |  Size: 394 B

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 406 B

Before

Width:  |  Height:  |  Size: 253 B

After

Width:  |  Height:  |  Size: 253 B

Before

Width:  |  Height:  |  Size: 580 B

After

Width:  |  Height:  |  Size: 580 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 946 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 946 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 607 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

@@ -0,0 +1,598 @@
# PyTorch Online Inference Guide
- [Application Scenario](#application-scenariomd)
- [Basic Workflow](#basic-workflowmd)
- [Prerequisites](#prerequisitesmd)
- [Online Inference Process](#online-inference-processmd)
- [Environment Variable Configuration](#environment-variable-configurationmd)
- [Sample Reference](#sample-referencemd)
- [Special Topics](#special-topicsmd)
- [Mixed Precision](#mixed-precisionmd)
- [How Do I Install GCC 7.3.0?](#how-do-i-install-gcc-7-3-0md)
<h2 id="application-scenariomd">Application Scenario</h2>
Online inference, unlike offline inference, allows developers to perform inference directly with PyTorch models using the **model.eval\(\)** method.
In this way, PyTorch-based inference apps can be directly ported to the Ascend AI Processor, which is especially useful in the data center inference scenarios.
### Supported Processors<a name="section15598658104219"></a>
Ascend 910 AI Processor
Ascend 310P AI Processor
<h2 id="basic-workflowmd">Basic Workflow</h2>
- **[Prerequisites](#prerequisitesmd)**
- **[Online Inference Process](#online-inference-processmd)**
- **[Environment Variable Configuration](#environment-variable-configurationmd)**
- **[Sample Reference](#sample-referencemd)**
<h3 id="prerequisitesmd">Prerequisites</h3>
The PyTorch framework and mixed precision module have been installed. For details, see the _PyTorch Installation Guide_.
<h3 id="online-inference-processmd">Online Inference Process</h3>
[Figure 1](#fig13802941161818) shows the online inference process.
**Figure 1** Online inference process<a name="fig13802941161818"></a>
![](figures/online-inference-process.png "online-inference-process")
<h3 id="environment-variable-configurationmd">Environment Variable Configuration</h3>
The following are the environment variables required for starting the inference process on PyTorch:
```
# Set the environment variable for the installation path of the infrastructure software on which online inference depends. The following assumes that the installation user is HwHiAiUser, and the default installation path is used.
# Method 1: Install Ascend-CANN-Toolkit for inference on an Ascend AI device, which serves as the development environment.
. /home/HwHiAiUser/Ascend/ascend-toolkit/set_env.sh
# Method 2: Install Ascend-CANN-NNAE on an Ascend AI device.
. /home/HwHiAiUser/Ascend/nnae/set_env.sh
# If multiple Python 3 versions exist in the operating environment, configure the installation path of Python 3.7.5 in environment variables.
export PATH=/usr/local/python3.7.5/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/python3.7.5/lib:$LD_LIBRARY_PATH
# Set the logical ID of a processor.
export ASCEND_DEVICE_ID=0
# Output log information. Replace it as required.
export ASCEND_SLOG_PRINT_TO_STDOUT=1
export ASCEND_GLOBAL_LOG_LEVEL=0
# Task issued with multiple threads
export TASK_QUEUE_ENABLE=0
```
**Table 1** Description of environment variables
<a name="table2072027194819"></a>
<table><thead align="left"><tr id="row1173527114812"><th class="cellrowborder" valign="top" width="46.75467546754676%" id="mcps1.2.4.1.1"><p id="p073027114816"><a name="p073027114816"></a><a name="p073027114816"></a>Environment Variable</p>
</th>
<th class="cellrowborder" valign="top" width="43.18431843184319%" id="mcps1.2.4.1.2"><p id="p157362712480"><a name="p157362712480"></a><a name="p157362712480"></a>Description</p>
</th>
<th class="cellrowborder" valign="top" width="10.061006100610062%" id="mcps1.2.4.1.3"><p id="p187392714485"><a name="p187392714485"></a><a name="p187392714485"></a>Required/Optional</p>
</th>
</tr>
</thead>
<tbody><tr id="row2732273481"><td class="cellrowborder" valign="top" width="46.75467546754676%" headers="mcps1.2.4.1.1 "><p id="p57382719481"><a name="p57382719481"></a><a name="p57382719481"></a>LD_LIBRARY_PATH</p>
</td>
<td class="cellrowborder" valign="top" width="43.18431843184319%" headers="mcps1.2.4.1.2 "><p id="p07319271480"><a name="p07319271480"></a><a name="p07319271480"></a>Dynamic library search path. Set this variable based on the preceding example.</p>
<div class="note" id="note119943144912"><a name="note119943144912"></a><a name="note119943144912"></a><span class="notetitle"> NOTE: </span><div class="notebody"><p id="p49933104915"><a name="p49933104915"></a><a name="p49933104915"></a>If GCC 7.3.0 is installed in OSs such as CentOS 7.6, Debian, and BC-Linux, configure the related environment variables. For details, see <a href="#how-do-i-install-gcc-7-3-0md#en-us_topic_0000001146754749_en-us_topic_0000001072593337_l5e5c9395407d46439788b12f0e6342bc">5</a>.</p>
</div></div>
</td>
<td class="cellrowborder" valign="top" width="10.061006100610062%" headers="mcps1.2.4.1.3 "><p id="p187352744817"><a name="p187352744817"></a><a name="p187352744817"></a>Required</p>
</td>
</tr>
<tr id="row17342744812"><td class="cellrowborder" valign="top" width="46.75467546754676%" headers="mcps1.2.4.1.1 "><p id="p4731227184818"><a name="p4731227184818"></a><a name="p4731227184818"></a>PATH</p>
</td>
<td class="cellrowborder" valign="top" width="43.18431843184319%" headers="mcps1.2.4.1.2 "><p id="p97310276484"><a name="p97310276484"></a><a name="p97310276484"></a>Executable program search path. Set this variable based on the preceding example.</p>
</td>
<td class="cellrowborder" valign="top" width="10.061006100610062%" headers="mcps1.2.4.1.3 "><p id="p1573142711483"><a name="p1573142711483"></a><a name="p1573142711483"></a>Required</p>
</td>
</tr>
<tr id="row95241840165613"><td class="cellrowborder" valign="top" width="46.75467546754676%" headers="mcps1.2.4.1.1 "><p id="p15242404566"><a name="p15242404566"></a><a name="p15242404566"></a>ASCEND_DEVICE_ID</p>
</td>
<td class="cellrowborder" valign="top" width="43.18431843184319%" headers="mcps1.2.4.1.2 "><p id="p688447526"><a name="p688447526"></a><a name="p688447526"></a>Sets the logical ID of a processor.</p>
<p id="p178824712212"><a name="p178824712212"></a><a name="p178824712212"></a>The value range is [0, <em id="i18812110304"><a name="i18812110304"></a><a name="i18812110304"></a>N</em> – 1] and the default value is<strong id="b1381717104019"><a name="b1381717104019"></a><a name="b1381717104019"></a> 0</strong>. <em id="i1156411211703"><a name="i1156411211703"></a><a name="i1156411211703"></a>N</em> indicates the device count in the physical machine, VM, or container.</p>
</td>
<td class="cellrowborder" valign="top" width="10.061006100610062%" headers="mcps1.2.4.1.3 "><p id="p105245400562"><a name="p105245400562"></a><a name="p105245400562"></a>Optional</p>
</td>
</tr>
<tr id="row203705529819"><td class="cellrowborder" valign="top" width="46.75467546754676%" headers="mcps1.2.4.1.1 "><p id="p53705522810"><a name="p53705522810"></a><a name="p53705522810"></a>ASCEND_SLOG_PRINT_TO_STDOUT</p>
</td>
<td class="cellrowborder" valign="top" width="43.18431843184319%" headers="mcps1.2.4.1.2 "><p id="en-us_topic_0000001073203258_p763102116322"><a name="en-us_topic_0000001073203258_p763102116322"></a><a name="en-us_topic_0000001073203258_p763102116322"></a>Enables or disables log printing. Values:</p>
<a name="en-us_topic_0000001073203258_ul95291245104113"></a><a name="en-us_topic_0000001073203258_ul95291245104113"></a><ul id="en-us_topic_0000001073203258_ul95291245104113"><li><strong id="b1877191971104041"><a name="b1877191971104041"></a><a name="b1877191971104041"></a>0</strong> or not configured: disabled</li><li><strong id="b737654378104041"><a name="b737654378104041"></a><a name="b737654378104041"></a>1</strong>: enabled</li></ul>
</td>
<td class="cellrowborder" valign="top" width="10.061006100610062%" headers="mcps1.2.4.1.3 "><p id="p6370125217818"><a name="p6370125217818"></a><a name="p6370125217818"></a>Optional</p>
</td>
</tr>
<tr id="row188405280914"><td class="cellrowborder" valign="top" width="46.75467546754676%" headers="mcps1.2.4.1.1 "><p id="p5840928594"><a name="p5840928594"></a><a name="p5840928594"></a>ASCEND_GLOBAL_LOG_LEVEL</p>
</td>
<td class="cellrowborder" valign="top" width="43.18431843184319%" headers="mcps1.2.4.1.2 "><p id="en-us_topic_0000001073521184_p763102116322"><a name="en-us_topic_0000001073521184_p763102116322"></a><a name="en-us_topic_0000001073521184_p763102116322"></a>Sets the global log level. Values:</p>
<a name="en-us_topic_0000001073521184_u4d735da6e0494e55abbf5eb6aefe988d"></a><a name="en-us_topic_0000001073521184_u4d735da6e0494e55abbf5eb6aefe988d"></a><ul id="en-us_topic_0000001073521184_u4d735da6e0494e55abbf5eb6aefe988d"><li><strong id="b1731786453104041"><a name="b1731786453104041"></a><a name="b1731786453104041"></a>0</strong>: DEBUG</li><li><strong id="b758139838104041"><a name="b758139838104041"></a><a name="b758139838104041"></a>1</strong>: INFO</li><li><strong id="b539270545104041"><a name="b539270545104041"></a><a name="b539270545104041"></a>2</strong>: WARNING</li><li><strong id="b444623067104041"><a name="b444623067104041"></a><a name="b444623067104041"></a>3</strong>: ERROR</li><li><strong id="b1157662181104041"><a name="b1157662181104041"></a><a name="b1157662181104041"></a>4</strong>: NULL (no log output)</li><li>Other values: invalid</li></ul>
</td>
<td class="cellrowborder" valign="top" width="10.061006100610062%" headers="mcps1.2.4.1.3 "><p id="p6841928598"><a name="p6841928598"></a><a name="p6841928598"></a>Optional</p>
</td>
</tr>
<tr id="row17638114219104"><td class="cellrowborder" valign="top" width="46.75467546754676%" headers="mcps1.2.4.1.1 "><p id="p20638342191018"><a name="p20638342191018"></a><a name="p20638342191018"></a>TASK_QUEUE_ENABLE</p>
</td>
<td class="cellrowborder" valign="top" width="43.18431843184319%" headers="mcps1.2.4.1.2 "><p id="p126381842151019"><a name="p126381842151019"></a><a name="p126381842151019"></a>Enables or disables the task delivery in multi-thread mode. When this function is enabled, the training performance of the entire network is improved in most cases. Values:</p>
<a name="ul6194152711118"></a><a name="ul6194152711118"></a><ul id="ul6194152711118"><li><strong id="b166811333191713"><a name="b166811333191713"></a><a name="b166811333191713"></a>0</strong> or not configured: disabled</li><li><strong id="b3865153321914"><a name="b3865153321914"></a><a name="b3865153321914"></a>1</strong>: enabled</li></ul>
</td>
<td class="cellrowborder" valign="top" width="10.061006100610062%" headers="mcps1.2.4.1.3 "><p id="p86386423103"><a name="p86386423103"></a><a name="p86386423103"></a>Optional</p>
</td>
</tr>
</tbody>
</table>
>![](public_sys-resources/icon-note.gif) **NOTE:**
>For more log information, see the _CANN Log Reference_.
<h3 id="sample-referencemd">Sample Reference</h3>
#### Sample Code<a name="section2017032418274"></a>
Try to minimize the initialization frequency across the app lifetime during inference. The inference mode is set using the **model.eval\(\)** method, and the inference process must run under the code branch **with torch.no\_grad\(\):**.
The following uses Python code of the ResNet-50 network as an example for description.
**resnet50\_infer\_for\_pytorch.py** sample code:
```
import argparse
import os
import time
import torch
import torch.nn.parallel
import torch.optim
import torch.utils.data
import torch.utils.data.distributed
import torchvision.transforms as transforms
import torchvision.datasets as datasets
import torchvision.models as models
import torch.npu
from apex import amp
model_names = sorted(name for name in models.__dict__
if name.islower() and not name.startswith("__")
and callable(models.__dict__[name]))
def parse_args():
""" User-defined dataset path and model path """
parser = argparse.ArgumentParser(description='PyTorch ImageNet Training')
parser.add_argument('--data', metavar='DIR', default="/data/imagenet",
help='path to dataset')
parser.add_argument('-a', '--arch', metavar='ARCH', default='resnet50',
choices=model_names,
help='model architecture: ' +
' | '.join(model_names) +
' (default: resnet18)')
parser.add_argument('--epochs', default=100, type=int, metavar='N',
help='number of total epochs to run')
parser.add_argument('-b', '--batch_size', default=512, type=int,
metavar='N',
help='mini-batch size (default: 256), this is the total '
'batch size of all GPUs on the current node when '
'using Data Parallel or Distributed Data Parallel')
parser.add_argument('--resume', default='', type=str, metavar='PATH',
help='path to latest checkpoint (default: none)')
parser.add_argument('--pretrained', dest='pretrained', action='store_true',
help='use pre-trained model')
parser.add_argument('--npu', default=None, type=int,
help='NPU id to use.')
parser.add_argument('-j', '--workers', default=32, type=int, metavar='N',
help='number of data loading workers (default: 8)')
parser.add_argument('--lr', '--learning_rate', default=0.1, type=float,
metavar='LR', help='initial learning rate', dest='lr')
parser.add_argument('--wd', '--weight_decay', default=1e-4, type=float,
metavar='W', help='weight decay (default: 1e-4)',
dest='weight_decay')
args, unknown_args = parser.parse_known_args()
if len(unknown_args) > 0:
for bad_arg in unknown_args:
print("ERROR: Unknown command line arg: %s" % bad_arg)
raise ValueError("Invalid command line arg(s)")
return args
# =========================================================================
# Main function entry
# =========================================================================
def main():
args = parse_args()
if args.npu is None:
args.npu = 0
global CALCULATE_DEVICE
CALCULATE_DEVICE = "npu:{}".format(args.npu)
torch.npu.set_device(CALCULATE_DEVICE)
print("use ", CALCULATE_DEVICE)
main_worker(args.npu, args)
def main_worker(npu, args):
global best_acc1
args.npu = npu
# =========================================================================
# Create a model.
# =========================================================================
print("=> creating model '{}'".format(args.arch))
model = models.__dict__[args.arch](zero_init_residual=True)
# Copy the model data to the Ascend AI Processor.
model = model.to(CALCULATE_DEVICE)
optimizer = torch.optim.SGD([
{'params': [param for name, param in model.named_parameters() if name[-4:] == 'bias'], 'weight_decay': 0.0},
{'params': [param for name, param in model.named_parameters() if name[-4:] != 'bias'],
'weight_decay': args.weight_decay}],
args.lr)
# =========================================================================
# Initialize the mixed precision model. After the model is used, the calculation can be accelerated, but the accuracy may slightly decrease. Determine whether to use the model based on the actual scenario.
# =========================================================================
model, optimizer = amp.initialize(model, optimizer, opt_level="O2", loss_scale=1024, verbosity=1)
# =========================================================================
# Load the trained model parameters.
# =========================================================================
# Restore model parameters from the model file.
if os.path.isfile(args.resume):
print("=> loading checkpoint '{}'".format(args.resume))
checkpoint = torch.load(args.resume)
best_acc1 = checkpoint['best_acc1']
best_acc1 = best_acc1.to("npu:{}".format(args.npu))
model.load_state_dict(checkpoint['state_dict'])
print("=> loaded checkpoint '{}' (epoch {})".format(args.resume, checkpoint['epoch']))
else:
print("=> no checkpoint found at '{}'".format(args.resume))
# =========================================================================
# Initialize the database.
# =========================================================================
# Load and preprocess image data.
valdir = os.path.join(args.data, 'val')
normalize = transforms.Normalize(mean=[0.485, 0.456, 0.406],
std=[0.229, 0.224, 0.225])
val_loader = torch.utils.data.DataLoader(
datasets.ImageFolder(valdir, transforms.Compose([
transforms.Resize(256),
transforms.CenterCrop(224),
transforms.ToTensor(),
normalize,
])),
batch_size=args.batch_size, shuffle=True,
num_workers=args.workers, pin_memory=True)
# =========================================================================
# Run the validate command.
# =========================================================================
validate(val_loader, model, args)
# =========================================================================
# Implement the sample API for online inference.
# =========================================================================
def validate(val_loader, model, args):
batch_time = AverageMeter('Time', ':6.3f')
top1 = AverageMeter('Acc@1', ':6.2f')
top5 = AverageMeter('Acc@5', ':6.2f')
progress = ProgressMeter(
len(val_loader),
[batch_time, top1, top5],
prefix='Test: ')
# =========================================================================
# Switch to the inference mode.
# =========================================================================
model.eval()
# =========================================================================
# Execute the model forward propagation under the torch.no_grad(): branch.
# =========================================================================
with torch.no_grad():
end = time.time()
for i, (images, target) in enumerate(val_loader):
# Place the image data on the NPU.
images = images.to(CALCULATE_DEVICE, non_blocking=True)
target = target.to(torch.int32).to(CALCULATE_DEVICE, non_blocking=True)
# Calculate the output.
output = model(images)
# Collect statistics on result precisions.
acc1, acc5 = accuracy(output, target, topk=(1, 5))
top1.update(acc1[0], images.size(0))
top5.update(acc5[0], images.size(0))
# Measure the running time.
batch_time.update(time.time() - end)
end = time.time()
# Print inference logs.
progress.display(i)
print(' * Acc@1 {top1.avg:.3f} Acc@5 {top5.avg:.3f}'.format(top1=top1, top5=top5))
return top1.avg
class AverageMeter(object):
"""Calculate and store the average value and current value."""
def __init__(self, name, fmt=':f'):
self.name = name
self.fmt = fmt
self.reset()
self.start_count_index = 10
def reset(self):
self.val = 0
self.avg = 0
self.sum = 0
self.count = 0
def update(self, val, n=1):
if self.count == 0:
self.batchsize = n
self.val = val
self.count += n
if self.count > (self.start_count_index * self.batchsize):
self.sum += val * n
self.avg = self.sum / (self.count - self.start_count_index * self.batchsize)
def __str__(self):
fmtstr = '{name} {val' + self.fmt + '} ({avg' + self.fmt + '})'
return fmtstr.format(**self.__dict__)
class ProgressMeter(object):
"""Record model computing information."""
def __init__(self, num_batches, meters, prefix=""):
self.batch_fmtstr = self._get_batch_fmtstr(num_batches)
self.meters = meters
self.prefix = prefix
def display(self, batch):
entries = [self.prefix + self.batch_fmtstr.format(batch)]
entries += [str(meter) for meter in self.meters]
print('\t'.join(entries))
def _get_batch_fmtstr(self, num_batches):
num_digits = len(str(num_batches // 1))
fmt = '{:' + str(num_digits) + 'd}'
return '[' + fmt + '/' + fmt.format(num_batches) + ']'
def accuracy(output, target, topk=(1,)):
"""Calculate the precision of k top predictions based on the specified value k."""
with torch.no_grad():
maxk = max(topk)
batch_size = target.size(0)
_, pred = output.topk(maxk, 1, True, True)
pred = pred.t()
correct = pred.eq(target.view(1, -1).expand_as(pred))
res = []
for k in topk:
correct_k = correct[:k].view(-1).float().sum(0, keepdim=True)
res.append(correct_k.mul_(100.0 / batch_size))
return res
if __name__ == '__main__':
main()
```
#### Sample Running<a name="section340764716270"></a>
The following uses the ResNet-50 model as an example to describe how to perform online inference.
1. Download a pre-trained model.
Visit [Ascend ModelZoo](https://www.hiascend.com/en/software/modelzoo) and click **Download Model** to download a pre-trained ResNet-50 model.
2. Edit the inference script.
Create a model script file **resnet50\_infer\_for\_pytorch.py** and write code. For how to write the code, see [Sample Code]().
3. Run inference.
Set environment variables (for how to set them, see [Environment Variable Configuration](#environment-variable-configurationmd)) and then run the following command:
```
python3 pytorch-resnet50-apex.py --data /data/imagenet \
--npu 7 \
--epochs 90 \
--resume ./checkpoint.pth.tar # ./checkpoint.pth.tar is the path of the sample pre-trained model file.
```
>![](public_sys-resources/icon-note.gif) **NOTE:**
>The preceding command is an example only. Modify the arguments as needed.
<h2 id="special-topicsmd">Special Topics</h2>
- **[Mixed Precision](#mixed-precisionmd)**
<h3 id="mixed-precisionmd">Mixed Precision</h3>
#### Overview<a name="section14734122962615"></a>
Based on the architecture features of the NPU, mixed precision is involved in the model computing, that is, the scenario where the float16 and float32 data types are used together. Replacing float32 with float16 has the following advantages:
- The memory usage of intermediate variables is reduced.
- The data transfer time decreases because the memory usage is reduced.
- The compute units of float16 provide better computing performance.
However, the mixed precision training is limited by the precision range expressed by float16. If float32 is converted into float16, the training convergence is affected. To use float16 for acceleration in some computations and ensure training convergence, the mixed precision module Apex is used. The mixed precision module Apex is a comprehensive optimization library that features high optimization performance and precision.
#### Supported Features<a name="section175201458521"></a>
[Table 1](#en-us_topic_0278765773_table10717173813332) describes the functions and optimization of the mixed precision module.
**Table 1** Functions of the mixed precision module
<a name="en-us_topic_0278765773_table10717173813332"></a>
<table><thead align="left"><tr id="en-us_topic_0278765773_row371716385333"><th class="cellrowborder" valign="top" width="32.269999999999996%" id="mcps1.2.3.1.1"><p id="en-us_topic_0278765773_p13717163815333"><a name="en-us_topic_0278765773_p13717163815333"></a><a name="en-us_topic_0278765773_p13717163815333"></a>Function</p>
</th>
<th class="cellrowborder" valign="top" width="67.73%" id="mcps1.2.3.1.2"><p id="en-us_topic_0278765773_p14400173910345"><a name="en-us_topic_0278765773_p14400173910345"></a><a name="en-us_topic_0278765773_p14400173910345"></a>Description</p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0278765773_row1571763813334"><td class="cellrowborder" valign="top" width="32.269999999999996%" headers="mcps1.2.3.1.1 "><p id="en-us_topic_0278765773_p4502732153412"><a name="en-us_topic_0278765773_p4502732153412"></a><a name="en-us_topic_0278765773_p4502732153412"></a>O1 configuration</p>
</td>
<td class="cellrowborder" valign="top" width="67.73%" headers="mcps1.2.3.1.2 "><p id="en-us_topic_0278765773_p640053920348"><a name="en-us_topic_0278765773_p640053920348"></a><a name="en-us_topic_0278765773_p640053920348"></a>Conv and Matmul use float16 for computing, and Softmax and BN use float32.</p>
</td>
</tr>
<tr id="en-us_topic_0278765773_row3717173817336"><td class="cellrowborder" valign="top" width="32.269999999999996%" headers="mcps1.2.3.1.1 "><p id="en-us_topic_0278765773_p11503103210344"><a name="en-us_topic_0278765773_p11503103210344"></a><a name="en-us_topic_0278765773_p11503103210344"></a>O2 configuration</p>
</td>
<td class="cellrowborder" valign="top" width="67.73%" headers="mcps1.2.3.1.2 "><p id="en-us_topic_0278765773_p164001639143419"><a name="en-us_topic_0278765773_p164001639143419"></a><a name="en-us_topic_0278765773_p164001639143419"></a>BN uses float32, and others use float16.</p>
</td>
</tr>
<tr id="en-us_topic_0278765773_row14717193815334"><td class="cellrowborder" valign="top" width="32.269999999999996%" headers="mcps1.2.3.1.1 "><p id="en-us_topic_0278765773_p1950318328349"><a name="en-us_topic_0278765773_p1950318328349"></a><a name="en-us_topic_0278765773_p1950318328349"></a>Static loss scale</p>
</td>
<td class="cellrowborder" valign="top" width="67.73%" headers="mcps1.2.3.1.2 "><p id="en-us_topic_0278765773_p1440033983418"><a name="en-us_topic_0278765773_p1440033983418"></a><a name="en-us_topic_0278765773_p1440033983418"></a>Parameters are statically set to ensure the convergence of mixed precision training.</p>
</td>
</tr>
<tr id="en-us_topic_0278765773_row871733813317"><td class="cellrowborder" valign="top" width="32.269999999999996%" headers="mcps1.2.3.1.1 "><p id="en-us_topic_0278765773_p1550303243417"><a name="en-us_topic_0278765773_p1550303243417"></a><a name="en-us_topic_0278765773_p1550303243417"></a>Dynamic loss scale</p>
</td>
<td class="cellrowborder" valign="top" width="67.73%" headers="mcps1.2.3.1.2 "><p id="en-us_topic_0278765773_p15400143963412"><a name="en-us_topic_0278765773_p15400143963412"></a><a name="en-us_topic_0278765773_p15400143963412"></a>The loss scale value is dynamically calculated to determine whether overflow occurs.</p>
</td>
</tr>
</tbody>
</table>
>![](public_sys-resources/icon-note.gif) **NOTE:**
>In the current version, Apex is implemented using Python and does not support AscendCL or CUDA optimization.
#### Initializing the Mixed Precision Model<a name="section18178125518268"></a>
1. To use the mixed precision module Apex, import the amp module from the Apex library.
```
from apex import amp
```
2. Initialize the amp module so that it can modify the model, optimizer, and PyTorch internal functions.
```
model, optimizer = amp.initialize(model, optimizer)
```
For details, see "Initialize the mixed precision model."# in [Sample Code](#sample-referencemd).
```
model, optimizer = amp.initialize(model, optimizer, opt_level="O2", loss_scale=1024, verbosity=1)
```
#### Mixed Precision Inference<a name="section818071513288"></a>
After the mixed precision model is initialized, perform model forward propagation.
Sample code: For details, see the implementation of **validate\(val\_loader, model, args\)** in [Sample Code](#sample-referencemd).
<h2 id="how-do-i-install-gcc-7-3-0md">How Do I Install GCC 7.3.0?</h2>
Perform the following steps as the **root** user.
1. Download **gcc-7.3.0.tar.gz** from [https://mirrors.tuna.tsinghua.edu.cn/gnu/gcc/gcc-7.3.0/gcc-7.3.0.tar.gz](https://mirrors.tuna.tsinghua.edu.cn/gnu/gcc/gcc-7.3.0/gcc-7.3.0.tar.gz).
2. To install GCC, you need to reserve adequate temporary space. Run the following command to clear the **/tmp** directory before the installation:
```
sudo rm -rf /tmp/*
```
3. Install the dependency package. \(CentOS and Ubuntu are used as examples.\)
- For CentOS, run the following command:
```
yum install bzip2
```
- For Ubuntu, run the following command:
```
apt-get install bzip2
```
4. Build and install GCC.
1. Go to the directory where the source code package **gcc-7.3.0.tar.gz** is located and run the following command to extract it:
```
tar -zxvf gcc-7.3.0.tar.gz
```
2. Go to the extracted directory and run the following command to download the GCC dependency packages:
```
cd gcc-7.3.0
./contrib/download_prerequisites
```
If an error is reported during the command execution, run the following commands in the **gcc-7.3.0/** directory to download the dependency packages:
```
wget http://gcc.gnu.org/pub/gcc/infrastructure/gmp-6.1.0.tar.bz2
wget http://gcc.gnu.org/pub/gcc/infrastructure/mpfr-3.1.4.tar.bz2
wget http://gcc.gnu.org/pub/gcc/infrastructure/mpc-1.0.3.tar.gz
wget http://gcc.gnu.org/pub/gcc/infrastructure/isl-0.16.1.tar.bz2
```
After downloading the preceding dependency packages, run the following command:
```
./contrib/download_prerequisites
```
If the verification fails, check whether the dependency package is repeatedly downloaded. The package should be downloaded at a time.
3. <a name="en-us_topic_0000001146754749_en-us_topic_0000001072593337_l75d31a2874534a2092e80a5f865b46f0"></a>Run the following commands for configuration, build, and installation.
```
./configure --enable-languages=c,c++ --disable-multilib --with-system-zlib --prefix=/usr/local/linux_gcc7.3.0
make -j15 # The value 15 indicates the number of CPUs, which is configurable and can be queried by running grep -w processor /proc/cpuinfo|wc -l.
make install
```
>![](public_sys-resources/icon-notice.gif) **NOTICE:**
>The **--prefix** parameter is used to specify the linux\_gcc7.3.0 installation path, which is configurable. Do not set it to **/usr/local** or **/usr**, which is the default installation path for the GCC installed by using the software source. Otherwise, a conflict occurs and the original GCC compilation environment of the system is damaged. In this example, the installation path is set to **/usr/local/linux\_gcc7.3.0**.
5. Set the environment variable.
Training must be performed in the compilation environment with GCC upgraded. Therefore, configure the following environment variable in the training script:
```
export LD_LIBRARY_PATH=${install_path}/lib64:${LD_LIBRARY_PATH}
```
**$\{install\_path\}** indicates the GCC 7.3.0 installation path configured in [3.](#en-us_topic_0000001146754749_en-us_topic_0000001072593337_l75d31a2874534a2092e80a5f865b46f0). In this example, the GCC 7.3.0 installation path is **/usr/local/linux\_gcc7.3.0/**.
>![](public_sys-resources/icon-note.gif) **NOTE:**
>Skip this step if you do not the compilation environment with GCC upgraded.
Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Before

Width:  |  Height:  |  Size: 580 B

After

Width:  |  Height:  |  Size: 580 B

Before

Width:  |  Height:  |  Size: 580 B

After

Width:  |  Height:  |  Size: 580 B

Before

Width:  |  Height:  |  Size: 394 B

After

Width:  |  Height:  |  Size: 394 B

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 406 B

Before

Width:  |  Height:  |  Size: 253 B

After

Width:  |  Height:  |  Size: 253 B

Before

Width:  |  Height:  |  Size: 580 B

After

Width:  |  Height:  |  Size: 580 B

File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 B

+762
View File
@@ -0,0 +1,762 @@
# FrameworkPTAdapter 3.0.RC2 Release Notes
- [FrameworkPTAdapter 3.0.RC2](#frameworkptadapter-30rc2)
- [Before You Start](#before-you-start)
- [New Features] (#new-features)
- [Modified Features](#modified-features)
- [Resolved Issues] (#resolved-issues)
- [Known Issues] (#known-issues)
- [Compatibility] (#compatibility)
- [FrameworkPTAdapter 3.0.RC1](#frameworkptadapter-30rc1)
- [Before You Start](#before-you-start-1)
- [New Features] (#new-features-1)
- [Modified Features](#modified-features-1)
- [Resolved Issues] (#resolved-issues-1)
- [Known Issues] (#known-issues-1)
- [Compatibility] (#compatibility-1)
- [FrameworkPTAdapter 2.0.4](#frameworkptadapter-204)
- [Before You Start](#before-you-start-2)
- [New Features] (#new-features-2)
- [Modified Features](#modified-features-2)
- [Resolved Issues] (#resolved-issues-2)
- [Known Issues] (#known-issues-2)
- [Compatibility] (#compatibility-2)
- [FrameworkPTAdapter 2.0.3](#frameworkptadapter-203)
- [Before You Start](#before-you-start-3)
- [New Features] (#new-features-3)
- [Modified Features](#modified-features-3)
- [Resolved Issues] (#resolved-issues-3)
- [Known Issues] (#known-issues-3)
- [Compatibility] (#compatibility-3)
- [FrameworkPTAdapter 2.0.2](#frameworkptadapter-202)
- [Before You Start](#before-you-start-4)
- [New Features] (#new-features-4)
- [Modified Features](#modified-features-4)
- [Resolved Issues] (#resolved-issues-4)
- [Known Issues] (#known-issues-4)
- [Compatibility] (#compatibility-4)
<h2 id="frameworkptadapter-30rc2">FrameworkPTAdapter 3.0.RC2</h2>
<h3 id="Before You Start">Before You Start</h3>
This framework is modified based on the open-source PyTorch 1.5.0 and 1.8.1 developed by Facebook, inherits native PyTorch features, and uses NPUs for dynamic image training. Models are adapted by operator granularity, code can be reused, and current networks can be ported and used on NPUs with only device types or data types modified.
PyTorch 1.8.1 uses plug-in adaptation and is completely decoupled from the native PyTorch framework. The current functions and performance of PyTorch 1.8.1 are basically the same as those of PyTorch 1.5.0, providing good development experience for backend operator adaptation.
AOE-based tuning is supported.
<h3 id="New Features">New Features</h3>
**Table 1** Features supported by PyTorch
<a name="t76c34275cbb74753970f7c5a9eb594fa"></a>
<table><thead align="left"><tr id="r0c10e7163bf54fe8816ab5ca2d77ccc4"><th class="cellrowborder" valign="top" width="10.459999999999999%" id="mcps1.2.4.1.1"><p id="a7888762cf8294977b7d114b1c898d1bd"><a name="a7888762cf8294977b7d114b1c898d1bd"></a><a name="a7888762cf8294977b7d114b1c898d1bd"></a>Level-1 Feature</p>
</th>
<th class="cellrowborder" valign="top" width="26.27%" id="mcps1.2.4.1.2"><p id="a4581ffde4a5f455faadfba144243a9d4"><a name="a4581ffde4a5f455faadfba144243a9d4"></a><a name="a4581ffde4a5f455faadfba144243a9d4"></a>Level-2 Feature</p>
</th>
<th class="cellrowborder" valign="top" width="63.27%" id="mcps1.2.4.1.3"><p id="a2a1562364b09433a83133fa10b3cf2b3"><a name="a2a1562364b09433a83133fa10b3cf2b3"></a><a name="a2a1562364b09433a83133fa10b3cf2b3"></a>Description</p>
</th>
</tr>
</thead>
<tbody>
<tr id="row7979351559"><td class="cellrowborder" rowspan="2" valign="top" width="10.459999999999999%" headers="mcps1.2.4.1.1 "><p id="p69836331553"><a name="p69836331553"></a><a name="p69836331553"></a>PyTorch 1.5.0 features adapted to NPUs</p>
</td>
</tr>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p109832331055"><a name="p109832331055"></a><a name="p109832331055"></a> Basic framework functions</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p109832331055"><a name="p109832331055"></a><a name="p109832331055"></a> Fixed a few bugs.</p>
</td>
</tr>
<tr id="row7979351559"><td class="cellrowborder" rowspan="3" valign="top" width="10.459999999999999%" headers="mcps1.2.4.1.1 "><p id="p69836331553"><a name="p69836331553"></a><a name="p69836331553"></a>PyTorch 1.8.1 features adapted to NPUs</p>
</td>
<td class="cellrowborder" valign="top" width="26.27%" headers="mcps1.2.4.1.2 "><p id="p149831333357"><a name="p149831333357"></a><a name="p149831333357"></a>Decoupled as plugins</p>
</td>
<td class="cellrowborder" valign="top" width="26.27%" headers="mcps1.2.4.1.2 "><p id="p149831333357"><a name="p149831333357"></a><a name="p149831333357"></a>Decoupled the torch_npu plugin from the native PyTorch framework completely.</p>
</td>
<tr>
<td class="cellrowborder" valign="top" width="26.27%" headers="mcps1.2.4.1.2 "><p id="p149831333357"><a name="p149831333357"></a><a name="p149831333357"></a>Performance optimization</p>
</td>
<td class="cellrowborder" valign="top" width="26.27%" headers="mcps1.2.4.1.2 "><p id="p149831333357"><a name="p149831333357"></a><a name="p149831333357"></a>Optimized the single-operator delivery and collective communication functions.</p>
</td>
</tr>
<td class="cellrowborder" valign="top" width="63.27%" headers="mcps1.2.4.1.3 "><p id="p1398313336511"><a name="p1398313336511"></a><a name="p1398313336511"></a>API satisfaction</p>
</td>
<td class="cellrowborder" valign="top" width="63.27%" headers="mcps1.2.4.1.3 "><p id="p1398313336511"><a name="p1398313336511"></a><a name="p1398313336511"></a>Added more APIs. (For details, see the API list.)</p>
</td>
</tr>
</tbody>
</table>
<h3 id="Modified Features">Modified Features</h3>
N/A
<h3 id="Resolved Issues">Resolved Issues</h3>
N/A
<h3 id="Known Issues">Known Issues</h3>
<a name="table1969972073016"></a>
<table><thead align="left"><tr id="row3699162017307"><th class="cellrowborder" valign="top" width="18.22%" id="mcps1.1.3.1.1"><p id="p16992020153010"><a name="p16992020153010"></a><a name="p16992020153010"></a>Known Issue</p>
</th>
<th class="cellrowborder" valign="top" width="81.78%" id="mcps1.1.3.1.2"><p id="p269919203308"><a name="p269919203308"></a><a name="p269919203308"></a>Description</p>
</th>
</tr>
</thead>
<tbody><tr id="row9699142003011"><td class="cellrowborder" valign="top" width="18.22%" headers="mcps1.1.3.1.1 "><p id="p1769932017300"><a name="p1769932017300"></a><a name="p1769932017300"></a>Data type support</p>
</td>
<td class="cellrowborder" valign="top" width="81.78%" headers="mcps1.1.3.1.2 "><p id="p13699152010301"><a name="p13699152010301"></a><a name="p13699152010301"></a>NPUs do not support the input or output of the inf/nan data of the float16 type.</p>
</td>
</tr>
<tr id="row146991520153016"><td class="cellrowborder" valign="top" width="18.22%" headers="mcps1.1.3.1.1 "><p id="p156997200308"><a name="p156997200308"></a><a name="p156997200308"></a>Data format</p>
</td>
<td class="cellrowborder" valign="top" width="81.78%" headers="mcps1.1.3.1.2 "><p id="p10699182020308"><a name="p10699182020308"></a><a name="p10699182020308"></a>Dimensions cannot be reduced when the format larger than 4D is used.</p>
</td>
</tr>
<tr id="row11121205610549"><td class="cellrowborder" rowspan="3" valign="top" width="18.22%" headers="mcps1.1.3.1.1 "><p id="p1647216219558"><a name="p1647216219558"></a><a name="p1647216219558"></a>Restrictions on collective communication</p>
<p id="p0465121912402"><a name="p0465121912402"></a><a name="p0465121912402"></a></p>
</td>
<td class="cellrowborder" valign="top" width="81.78%" headers="mcps1.1.3.1.2 "><p id="p3116115695415"><a name="p3116115695415"></a><a name="p3116115695415"></a>The graphs executed on different devices in a training job must be the same.</p>
</td>
</tr>
<tr id="row51211656105411"><td class="cellrowborder" valign="top" headers="mcps1.1.3.1.1 "><p id="p1311616560541"><a name="p1311616560541"></a><a name="p1311616560541"></a>Allocation at only 1, 2, 4, or 8 processors is supported.</p>
</td>
</tr>
<tr id="row8647195765419"><td class="cellrowborder" valign="top" headers="mcps1.1.3.1.1 "><p id="p2064225716544"><a name="p2064225716544"></a><a name="p2064225716544"></a>Only the int8, int32, float16, and float32 data types are supported.</p>
</td>
</tr>
<tr id="row4646195719548"><td class="cellrowborder" valign="top" width="18.22%" headers="mcps1.1.3.1.1 "><p id="p4642195718541"><a name="p4642195718541"></a><a name="p4642195718541"></a>Apex function</p>
</td>
<td class="cellrowborder" valign="top" width="81.78%" headers="mcps1.1.3.1.2 "><p id="p864205725412"><a name="p864205725412"></a><a name="p864205725412"></a>In the current version, Apex is implemented mainly using Python, and the customized optimization of CUDA kernel in Apex is not supported.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="Compatibility">Compatibility</h3>
Atlas 800 (model 9010): CentOS 7.6, Ubuntu 18.04/2.04, BC-Linux 7.6, Debian 9.9, Debian 10, openEuler 20.03 LTS
Atlas 800 (model 9000): CentOS 7.6, Ubuntu 18.04/2.04, EulerOS 2.8/2.10, Kylin V10, BC-Linux 7.6, openEuler 20.03 LTS, UOS 20 1020e
<h2 id="frameworkptadapter-30rc1">FrameworkPTAdapter 3.0.RC1</h2>
<h3 id="Before You Start 1">Before You Start</h3>
This framework is modified based on the open-source PyTorch 1.5.0 and 1.8.1 developed by Facebook, inherits native PyTorch features, and uses NPUs for dynamic image training. Models are adapted by operator granularity, code can be reused, and current networks can be ported and used on NPUs with only device types or data types modified.
PyTorch 1.8.1 adopts the plugin adaptation mode and inherits the features of PyTorch 1.5.0. Their functions are basically the same, but PyTorch 1.8.1 provides better development experience for backend operator adaptation.
AOE-based tuning is supported.
<h3 id="New Features 1">New Features</h3>
**Table 1** Features supported by PyTorch
<a name="t76c34275cbb74753970f7c5a9eb594fa"></a>
<table><thead align="left"><tr id="r0c10e7163bf54fe8816ab5ca2d77ccc4"><th class="cellrowborder" valign="top" width="10.459999999999999%" id="mcps1.2.4.1.1"><p id="a7888762cf8294977b7d114b1c898d1bd"><a name="a7888762cf8294977b7d114b1c898d1bd"></a><a name="a7888762cf8294977b7d114b1c898d1bd"></a>Level-1 Feature</p>
</th>
<th class="cellrowborder" valign="top" width="26.27%" id="mcps1.2.4.1.2"><p id="a4581ffde4a5f455faadfba144243a9d4"><a name="a4581ffde4a5f455faadfba144243a9d4"></a><a name="a4581ffde4a5f455faadfba144243a9d4"></a>Level-2 Feature</p>
</th>
<th class="cellrowborder" valign="top" width="63.27%" id="mcps1.2.4.1.3"><p id="a2a1562364b09433a83133fa10b3cf2b3"><a name="a2a1562364b09433a83133fa10b3cf2b3"></a><a name="a2a1562364b09433a83133fa10b3cf2b3"></a>Description</p>
</th>
</tr>
</thead>
<tbody>
<tr id="row7979351559"><td class="cellrowborder" rowspan="2" valign="top" width="10.459999999999999%" headers="mcps1.2.4.1.1 "><p id="p69836331553"><a name="p69836331553"></a><a name="p69836331553"></a>PyTorch 1.5.0 features adapted to NPUs</p>
</td>
The <td class="cellrowborder" valign="top" width="26.27%" headers="mcps1.2.4.1.2 "><p id="p149831333357"><a name="p149831333357"></a><a name="p149831333357"></a>AOE-based tuning supported</p>
</td>
<td class="cellrowborder" valign="top" width="63.27%" headers="mcps1.2.4.1.3 "><p id="p1398313336511"><a name="p1398313336511"></a><a name="p1398313336511"></a>Supports AOE-based tuning to improve model performance.</p>
</td>
</tr>
<tr id="row13971435754"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p79831331353"><a name="p79831331353"></a><a name="p79831331353"></a>Basic framework functions</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p109832331055"><a name="p109832331055"></a><a name="p109832331055"></a> Added the function of adapted operator development. For details, see the operator list.</p>
</td>
</tr>
<tr id="row7979351559"><td class="cellrowborder" rowspan="3" valign="top" width="10.459999999999999%" headers="mcps1.2.4.1.1 "><p id="p69836331553"><a name="p69836331553"></a><a name="p69836331553"></a>PyTorch 1.8.1 features adapted to NPUs</p>
</td>
<td class="cellrowborder" valign="top" width="26.27%" headers="mcps1.2.4.1.2 "><p id="p149831333357"><a name="p149831333357"></a><a name="p149831333357"></a>Decoupled as plugins</p>
</td>
<td class="cellrowborder" valign="top" width="63.27%" headers="mcps1.2.4.1.3 "><p id="p1398313336511"><a name="p1398313336511"></a><a name="p1398313336511"></a>Port the NPU adapted code to the torch_npu plugin to decouple the Ascend adapted code from the native PyTorch code.</p>
</td>
<tr>
The <td class="cellrowborder" valign="top" width="26.27%" headers="mcps1.2.4.1.2 "><p id="p149831333357"><a name="p149831333357"></a><a name="p149831333357"></a>AOE-based tuning supported</p>
</td>
<td class="cellrowborder" valign="top" width="63.27%" headers="mcps1.2.4.1.3 "><p id="p1398313336511"><a name="p1398313336511"></a><a name="p1398313336511"></a>Supports AOE-based tuning to improve model performance.</p>
</td>
</tr>
<tr id="row109719353511"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p18983183315515"><a name="p18983183315515"></a><a name="p18983183315515"></a>Framework API satisfaction</p>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p836221112812"><a name="p836221112812"></a><a name="p836221112812"></a>Supports APIs adapted to PyTorch 1.5.0. For details, see the API list.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="Modified Features 1">Modified Features</h3>
N/A
<h3 id="Resolved Issues 1">Resolved Issues</h3>
N/A
<h3 id="Known Issues 1">Known Issues</h3>
<a name="table1969972073016"></a>
<table><thead align="left"><tr id="row3699162017307"><th class="cellrowborder" valign="top" width="18.22%" id="mcps1.1.3.1.1"><p id="p16992020153010"><a name="p16992020153010"></a><a name="p16992020153010"></a>Known Issue</p>
</th>
<th class="cellrowborder" valign="top" width="81.78%" id="mcps1.1.3.1.2"><p id="p269919203308"><a name="p269919203308"></a><a name="p269919203308"></a>Description</p>
</th>
</tr>
</thead>
<tbody><tr id="row9699142003011"><td class="cellrowborder" valign="top" width="18.22%" headers="mcps1.1.3.1.1 "><p id="p1769932017300"><a name="p1769932017300"></a><a name="p1769932017300"></a>Data type support</p>
</td>
<td class="cellrowborder" valign="top" width="81.78%" headers="mcps1.1.3.1.2 "><p id="p13699152010301"><a name="p13699152010301"></a><a name="p13699152010301"></a>NPUs do not support the input or output of the inf/nan data of the float16 type.</p>
</td>
</tr>
<tr id="row146991520153016"><td class="cellrowborder" valign="top" width="18.22%" headers="mcps1.1.3.1.1 "><p id="p156997200308"><a name="p156997200308"></a><a name="p156997200308"></a>Data format</p>
</td>
<td class="cellrowborder" valign="top" width="81.78%" headers="mcps1.1.3.1.2 "><p id="p10699182020308"><a name="p10699182020308"></a><a name="p10699182020308"></a>Dimensions cannot be reduced when the format larger than 4D is used.</p>
</td>
</tr>
<tr id="row11121205610549"><td class="cellrowborder" rowspan="3" valign="top" width="18.22%" headers="mcps1.1.3.1.1 "><p id="p1647216219558"><a name="p1647216219558"></a><a name="p1647216219558"></a>Restrictions on collective communication</p>
<p id="p0465121912402"><a name="p0465121912402"></a><a name="p0465121912402"></a></p>
</td>
<td class="cellrowborder" valign="top" width="81.78%" headers="mcps1.1.3.1.2 "><p id="p3116115695415"><a name="p3116115695415"></a><a name="p3116115695415"></a>The graphs executed on different devices in a training job must be the same.</p>
</td>
</tr>
<tr id="row51211656105411"><td class="cellrowborder" valign="top" headers="mcps1.1.3.1.1 "><p id="p1311616560541"><a name="p1311616560541"></a><a name="p1311616560541"></a>Allocation at only 1, 2, 4, or 8 processors is supported.</p>
</td>
</tr>
<tr id="row8647195765419"><td class="cellrowborder" valign="top" headers="mcps1.1.3.1.1 "><p id="p2064225716544"><a name="p2064225716544"></a><a name="p2064225716544"></a>Only the int8, int32, float16, and float32 data types are supported.</p>
</td>
</tr>
<tr id="row4646195719548"><td class="cellrowborder" valign="top" width="18.22%" headers="mcps1.1.3.1.1 "><p id="p4642195718541"><a name="p4642195718541"></a><a name="p4642195718541"></a>Apex function</p>
</td>
<td class="cellrowborder" valign="top" width="81.78%" headers="mcps1.1.3.1.2 "><p id="p864205725412"><a name="p864205725412"></a><a name="p864205725412"></a>In the current version, Apex is implemented mainly using Python, and the customized optimization of CUDA kernel in Apex is not supported.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="Compatibility 1">Compatibility</h3>
Atlas 800 (model 9010): CentOS 7.6, Ubuntu 18.04/2.04, BC-Linux 7.6, Debian 9.9, Debian 10, openEuler 20.03 LTS
Atlas 800 (model 9000): CentOS 7.6, Ubuntu 18.04/2.04, EulerOS 2.8/2.10, Kylin V10, BC-Linux 7.6, openEuler 20.03 LTS, UOS 20 1020e
<h2 id="FrameworkPTAdapter-204">FrameworkPTAdapter 2.0.4</h2>
<h3 id="Before You Start 2">Before You Start</h3>
This framework is modified based on the open-source PyTorch 1.5.0 and 1.8.1 developed by Facebook, inherits native PyTorch features, and uses NPUs for dynamic image training. Models are adapted by operator granularity, code can be reused, and current networks can be ported and used on NPUs with only device types or data types modified.
PyTorch 1.8.1 inherits the features of PyTorch 1.5.0. Their functions are basically the same, but PyTorch 1.8.1 provides better development experience for backend operator adaptation. Currently, PyTorch 1.8.1 supports only the ResNet-50 network model.
<h3 id="New Features 2">New Features</h3>
**Table 1** Features supported by PyTorch
<a name="t76c34275cbb74753970f7c5a9eb594fa"></a>
<table><thead align="left"><tr id="r0c10e7163bf54fe8816ab5ca2d77ccc4"><th class="cellrowborder" valign="top" width="10.459999999999999%" id="mcps1.2.4.1.1"><p id="a7888762cf8294977b7d114b1c898d1bd"><a name="a7888762cf8294977b7d114b1c898d1bd"></a><a name="a7888762cf8294977b7d114b1c898d1bd"></a>Level-1 Feature</p>
</th>
<th class="cellrowborder" valign="top" width="26.27%" id="mcps1.2.4.1.2"><p id="a4581ffde4a5f455faadfba144243a9d4"><a name="a4581ffde4a5f455faadfba144243a9d4"></a><a name="a4581ffde4a5f455faadfba144243a9d4"></a>Level-2 Feature</p>
</th>
<th class="cellrowborder" valign="top" width="63.27%" id="mcps1.2.4.1.3"><p id="a2a1562364b09433a83133fa10b3cf2b3"><a name="a2a1562364b09433a83133fa10b3cf2b3"></a><a name="a2a1562364b09433a83133fa10b3cf2b3"></a>Description</p>
</th>
</tr>
</thead>
<tbody><tr id="row7979351559"><td class="cellrowborder" rowspan="3" valign="top" width="10.459999999999999%" headers="mcps1.2.4.1.1 "><p id="p69836331553"><a name="p69836331553"></a><a name="p69836331553"></a>PyTorch 1.5.0 features adapted to NPUs</p>
</td>
<td class="cellrowborder" valign="top" width="26.27%" headers="mcps1.2.4.1.2 "><p id="p149831333357"><a name="p149831333357"></a><a name="p149831333357"></a>Optimization of model accuracy analyzer</p>
</td>
<td class="cellrowborder" valign="top" width="63.27%" headers="mcps1.2.4.1.3 "><p id="p1398313336511"><a name="p1398313336511"></a><a name="p1398313336511"></a>Supports mapping between IR and TBE operators and enabled the NPU dump data to be loaded to the GPU side for comparison.</p>
</td>
</tr>
<tr id="row109719353511"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p18983183315515"><a name="p18983183315515"></a><a name="p18983183315515"></a>E2E prof supported</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p836221112812"><a name="p836221112812"></a><a name="p836221112812"></a>Integrated the profile data obtained by the native PyTorch Profiling tool and CANN prof tool to implement end-to-end model and operator performance analysis.</p>
</td>
</tr>
<tr id="row13971435754"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p79831331353"><a name="p79831331353"></a><a name="p79831331353"></a>Basic framework functions</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p109832331055"><a name="p109832331055"></a><a name="p109832331055"></a> Added the function of adapted operator development. For details, see the operator list.</p>
</td>
</tr>
<tr id="row7979351559"><td class="cellrowborder" rowspan="2" valign="top" width="10.459999999999999%" headers="mcps1.2.4.1.1 "><p id="p69836331553"><a name="p69836331553"></a><a name="p69836331553"></a>PyTorch 1.8.1 features adapted to NPUs</p>
</td>
<td class="cellrowborder" valign="top" width="26.27%" headers="mcps1.2.4.1.2 "><p id="p149831333357"><a name="p149831333357"></a><a name="p149831333357"></a>AMP supported</p>
</td>
<td class="cellrowborder" valign="top" width="63.27%" headers="mcps1.2.4.1.3 "><p id="p1398313336511"><a name="p1398313336511"></a><a name="p1398313336511"></a>Supports the native training of automatic mixed precision (AMP) of PyTorch.</p>
</td>
</tr>
<tr id="row109719353511"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p18983183315515"><a name="p18983183315515"></a><a name="p18983183315515"></a>Profiling supported</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p836221112812"><a name="p836221112812"></a><a name="p836221112812"></a>Supports the native profiling function of PyTorch.</p>
</td>
</tr>
<tr id="row7979351559"><td class="cellrowborder" rowspan="2" valign="top" width="10.459999999999999%" headers="mcps1.2.4.1.1 "><p id="p69836331553"><a name="p69836331553"></a><a name="p69836331553"></a>OS compatibility</p>
</td>
<td class="cellrowborder" valign="top" width="26.27%" headers="mcps1.2.4.1.2 "><p id="p149831333357"><a name="p149831333357"></a><a name="p149831333357"></a>OS compatibility</p>
</td>
<td class="cellrowborder" valign="top" width="63.27%" headers="mcps1.2.4.1.3 "><p id="p1398313336511"><a name="p1398313336511"></a><a name="p1398313336511"></a>Supports Ubuntu 20.04 (x86 and Arm) and EulerOS 2.10 (Arm)</p>
</td>
<tr id="row13971435754"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p79831331353"><a name="p79831331353"></a><a name="p79831331353"></a>Python version compatibility</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p109832331055"><a name="p109832331055"></a><a name="p109832331055"></a>Supports compilation and use of Python 3.9 (only for PyTorch 1.8.1).</p>
</td>
</tr>
</tbody>
</table>
<h3 id="Modified Features 2">Modified Features</h3>
N/A
<h3 id="Resolved Issues 2">Resolved Issues</h3>
N/A
<h3 id="Known Issues 2">Known Issues</h3>
<a name="table1969972073016"></a>
<table><thead align="left"><tr id="row3699162017307"><th class="cellrowborder" valign="top" width="18.22%" id="mcps1.1.3.1.1"><p id="p16992020153010"><a name="p16992020153010"></a><a name="p16992020153010"></a>Known Issue</p>
</th>
<th class="cellrowborder" valign="top" width="81.78%" id="mcps1.1.3.1.2"><p id="p269919203308"><a name="p269919203308"></a><a name="p269919203308"></a>Description</p>
</th>
</tr>
</thead>
<tbody><tr id="row9699142003011"><td class="cellrowborder" valign="top" width="18.22%" headers="mcps1.1.3.1.1 "><p id="p1769932017300"><a name="p1769932017300"></a><a name="p1769932017300"></a>Data type support</p>
</td>
<td class="cellrowborder" valign="top" width="81.78%" headers="mcps1.1.3.1.2 "><p id="p13699152010301"><a name="p13699152010301"></a><a name="p13699152010301"></a>NPUs do not support the input or output of the inf/nan data of the float16 type.</p>
</td>
</tr>
<tr id="row146991520153016"><td class="cellrowborder" valign="top" width="18.22%" headers="mcps1.1.3.1.1 "><p id="p156997200308"><a name="p156997200308"></a><a name="p156997200308"></a>Data format</p>
</td>
<td class="cellrowborder" valign="top" width="81.78%" headers="mcps1.1.3.1.2 "><p id="p10699182020308"><a name="p10699182020308"></a><a name="p10699182020308"></a>Dimensions cannot be reduced when the format larger than 4D is used.</p>
</td>
</tr>
<tr id="row11121205610549"><td class="cellrowborder" rowspan="3" valign="top" width="18.22%" headers="mcps1.1.3.1.1 "><p id="p1647216219558"><a name="p1647216219558"></a><a name="p1647216219558"></a>Restrictions on collective communication</p>
<p id="p0465121912402"><a name="p0465121912402"></a><a name="p0465121912402"></a></p>
</td>
<td class="cellrowborder" valign="top" width="81.78%" headers="mcps1.1.3.1.2 "><p id="p3116115695415"><a name="p3116115695415"></a><a name="p3116115695415"></a>The graphs executed on different devices in a training job must be the same.</p>
</td>
</tr>
<tr id="row51211656105411"><td class="cellrowborder" valign="top" headers="mcps1.1.3.1.1 "><p id="p1311616560541"><a name="p1311616560541"></a><a name="p1311616560541"></a>Allocation at only 1, 2, 4, or 8 processors is supported.</p>
</td>
</tr>
<tr id="row8647195765419"><td class="cellrowborder" valign="top" headers="mcps1.1.3.1.1 "><p id="p2064225716544"><a name="p2064225716544"></a><a name="p2064225716544"></a>Only the int8, int32, float16, and float32 data types are supported.</p>
</td>
</tr>
<tr id="row4646195719548"><td class="cellrowborder" valign="top" width="18.22%" headers="mcps1.1.3.1.1 "><p id="p4642195718541"><a name="p4642195718541"></a><a name="p4642195718541"></a>Apex function</p>
</td>
<td class="cellrowborder" valign="top" width="81.78%" headers="mcps1.1.3.1.2 "><p id="p864205725412"><a name="p864205725412"></a><a name="p864205725412"></a>In the current version, Apex is implemented mainly using Python, and the customized optimization of CUDA kernel in Apex is not supported.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="Compatibility 2">Compatibility</h3>
Atlas 800 (model 9010): CentOS 7.6, Ubuntu 18.04/2.04, BC-Linux 7.6, Debian 9.9, Debian 10, openEuler 20.03 LTS
Atlas 800 (model 9000): CentOS 7.6, Ubuntu 18.04/2.04, EulerOS 2.8/2.10, Kylin V10, BC-Linux 7.6, openEuler 20.03 LTS, UOS 20 1020e
<h2 id="frameworkptadapter-203">FrameworkPTAdapter 2.0.3</h2>
<h3 id="Before You Start 3">Before You Start</h3>
This framework is modified based on the open-source PyTorch 1.5.0 developed by Facebook, inherits native PyTorch features, and uses NPUs for dynamic image training. Models are adapted by operator granularity, code can be reused, and current networks can be ported and used on NPUs with only device types or data types modified.
PyTorch 1.8.1 is supported by this version and later, and this version inherits the features of PyTorch 1.5.0 and provides the same functions, except for the Profiling tool. In addition, it optimizes the backend operator adaptation. Currently, PyTorch 1.8.1 supports only the ResNet-50 network model.
<h3 id="New Features 3">New Features</h3>
**Table 1** Features supported by PyTorch
<a name="t76c34275cbb74753970f7c5a9eb594fa"></a>
<table><thead align="left"><tr id="r0c10e7163bf54fe8816ab5ca2d77ccc4"><th class="cellrowborder" valign="top" width="10.459999999999999%" id="mcps1.2.4.1.1"><p id="a7888762cf8294977b7d114b1c898d1bd"><a name="a7888762cf8294977b7d114b1c898d1bd"></a><a name="a7888762cf8294977b7d114b1c898d1bd"></a>Level-1 Feature</p>
</th>
<th class="cellrowborder" valign="top" width="26.27%" id="mcps1.2.4.1.2"><p id="a4581ffde4a5f455faadfba144243a9d4"><a name="a4581ffde4a5f455faadfba144243a9d4"></a><a name="a4581ffde4a5f455faadfba144243a9d4"></a>Level-2 Feature</p>
</th>
<th class="cellrowborder" valign="top" width="63.27%" id="mcps1.2.4.1.3"><p id="a2a1562364b09433a83133fa10b3cf2b3"><a name="a2a1562364b09433a83133fa10b3cf2b3"></a><a name="a2a1562364b09433a83133fa10b3cf2b3"></a>Description</p>
</th>
</tr>
</thead>
<tbody><tr id="row7979351559"><td class="cellrowborder" rowspan="5" valign="top" width="10.459999999999999%" headers="mcps1.2.4.1.1 "><p id="p69836331553"><a name="p69836331553"></a><a name="p69836331553"></a>PyTorch features adapted to NPUs</p>
</td>
<td class="cellrowborder" valign="top" width="26.27%" headers="mcps1.2.4.1.2 "><p id="p149831333357"><a name="p149831333357"></a><a name="p149831333357"></a>PyTorch 1.8.1</p>
</td>
<td class="cellrowborder" valign="top" width="63.27%" headers="mcps1.2.4.1.3 "><p id="p1398313336511"><a name="p1398313336511"></a><a name="p1398313336511"></a>Added PyTorch 1.8.1. Currently, only the ResNet-50 network is supported, including the training scenario for distributed data parallel (DDP).</p>
</td>
</tr>
<tr id="row109719353511"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p18983183315515"><a name="p18983183315515"></a><a name="p18983183315515"></a>Python 3.8</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p836221112812"><a name="p836221112812"></a><a name="p836221112812"></a>Supported compilation and use of Python 3.8.</p>
</td>
</tr>
<tr id="row13971435754"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p79831331353"><a name="p79831331353"></a><a name="p79831331353"></a>Operator overflow/underflow detection tool</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p109832331055"><a name="p109832331055"></a><a name="p109832331055"></a>Supported IR-level operator overflow/underflow detection in the PyTorch framework. When an AI Core operator overflow/underflow occurs, the IR information is displayed.</p>
</td>
</tr>
<tr id="row185381431133610"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p953883153611"><a name="p953883153611"></a><a name="p953883153611"></a>OS compatibility</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p13538203153618"><a name="p13538203153618"></a><a name="p13538203153618"></a>Supported UOS 20 1020e ARM.</p>
</td>
</tr>
<tr id="row91681125173610"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p2168172519364"><a name="p2168172519364"></a><a name="p2168172519364"></a>Basic framework functions</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p1416815259367"><a name="p1416815259367"></a><a name="p1416815259367"></a>Added the function of adapted operator development. For details, see the operator list.</p>
</td>
</tr>
<tr id="row11970351050"><td class="cellrowborder" rowspan="26" valign="top" width="10.459999999999999%" headers="mcps1.2.4.1.1 "><p id="p298314333514"><a name="p298314333514"></a><a name="p298314333514"></a>Model training</p>
</td>
<td class="cellrowborder" valign="top" width="26.27%" headers="mcps1.2.4.1.2 "><p id="p19984193312511"><a name="p19984193312511"></a><a name="p19984193312511"></a>CenterFace</p>
</td>
<td class="cellrowborder" valign="top" width="63.27%" headers="mcps1.2.4.1.3 "><p id="p7517351258"><a name="p7517351258"></a><a name="p7517351258"></a>-</p>
</td>
</tr>
<tr id="row9965351254"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p1984033458"><a name="p1984033458"></a><a name="p1984033458"></a>PCBU</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p298411338513"><a name="p298411338513"></a><a name="p298411338513"></a>-</p>
</td>
</tr>
<tr id="row14966351959"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p198414331957"><a name="p198414331957"></a><a name="p198414331957"></a>Net++</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p1798413331756"><a name="p1798413331756"></a><a name="p1798413331756"></a>-</p>
</td>
</tr>
<tr id="row20966351454"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p4984183317518"><a name="p4984183317518"></a><a name="p4984183317518"></a>FCN8S</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p1698453311519"><a name="p1698453311519"></a><a name="p1698453311519"></a>-</p>
</td>
</tr>
<tr id="row19653517518"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p1298483319512"><a name="p1298483319512"></a><a name="p1298483319512"></a>OSNetRetinaFace</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p1798423312519"><a name="p1798423312519"></a><a name="p1798423312519"></a>-</p>
</td>
</tr>
<tr id="row39619351751"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p1298414331513"><a name="p1298414331513"></a><a name="p1298414331513"></a>PSPnet</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p10984633254"><a name="p10984633254"></a><a name="p10984633254"></a>-</p>
</td>
</tr>
<tr id="row496335654"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p19984433351"><a name="p19984433351"></a><a name="p19984433351"></a>EDSR</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p898473314517"><a name="p898473314517"></a><a name="p898473314517"></a>-</p>
</td>
</tr>
<tr id="row17953357517"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p14984123312515"><a name="p14984123312515"></a><a name="p14984123312515"></a>Tsm</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p159841033855"><a name="p159841033855"></a><a name="p159841033855"></a>-</p>
</td>
</tr>
<tr id="row16951435551"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p19984933457"><a name="p19984933457"></a><a name="p19984933457"></a>pnasnet5large</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p89846335512"><a name="p89846335512"></a><a name="p89846335512"></a>-</p>
</td>
</tr>
<tr id="row2095113520514"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p1798416331952"><a name="p1798416331952"></a><a name="p1798416331952"></a>Gaitset</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p098417336516"><a name="p098417336516"></a><a name="p098417336516"></a>-</p>
</td>
</tr>
<tr id="row89516351511"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p11985153312516"><a name="p11985153312516"></a><a name="p11985153312516"></a>fcn</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p169858331155"><a name="p169858331155"></a><a name="p169858331155"></a>-</p>
</td>
</tr>
<tr id="row5953353513"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p18985103311514"><a name="p18985103311514"></a><a name="p18985103311514"></a>Albert</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p2098513334519"><a name="p2098513334519"></a><a name="p2098513334519"></a>-</p>
</td>
</tr>
<tr id="row119533516513"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p598511336511"><a name="p598511336511"></a><a name="p598511336511"></a>AdvancedEast</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p119850331513"><a name="p119850331513"></a><a name="p119850331513"></a>-</p>
</td>
</tr>
<tr id="row39511356512"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p698553311512"><a name="p698553311512"></a><a name="p698553311512"></a>ReidStrongBaseline</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p1198514331659"><a name="p1198514331659"></a><a name="p1198514331659"></a>-</p>
</td>
</tr>
<tr id="row129463518517"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p99851633158"><a name="p99851633158"></a><a name="p99851633158"></a>Fast-scnn</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p1298514331359"><a name="p1298514331359"></a><a name="p1298514331359"></a>-</p>
</td>
</tr>
<tr id="row9942035757"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p109854331151"><a name="p109854331151"></a><a name="p109854331151"></a>RDN</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p1198583317511"><a name="p1198583317511"></a><a name="p1198583317511"></a>-</p>
</td>
</tr>
<tr id="row79415357517"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p6985833351"><a name="p6985833351"></a><a name="p6985833351"></a>SRFlow</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p29851033350"><a name="p29851033350"></a><a name="p29851033350"></a>-</p>
</td>
</tr>
<tr id="row12947357514"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p149859334518"><a name="p149859334518"></a><a name="p149859334518"></a>MGN</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p19851833850"><a name="p19851833850"></a><a name="p19851833850"></a>-</p>
</td>
</tr>
<tr id="row3941735855"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p898533316518"><a name="p898533316518"></a><a name="p898533316518"></a>Roberta</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p998553318518"><a name="p998553318518"></a><a name="p998553318518"></a>-</p>
</td>
</tr>
<tr id="row1093335856"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p1985533451"><a name="p1985533451"></a><a name="p1985533451"></a>RegNetY</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p59851033355"><a name="p59851033355"></a><a name="p59851033355"></a>-</p>
</td>
</tr>
<tr id="row49373518516"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p19986173311512"><a name="p19986173311512"></a><a name="p19986173311512"></a>VoVNet-39</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p798683310515"><a name="p798683310515"></a><a name="p798683310515"></a>-</p>
</td>
</tr>
<tr id="row5930351357"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p189862336515"><a name="p189862336515"></a><a name="p189862336515"></a>RegNetX</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p1398618331651"><a name="p1398618331651"></a><a name="p1398618331651"></a>-</p>
</td>
</tr>
<tr id="row169312351655"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p149863337513"><a name="p149863337513"></a><a name="p149863337513"></a>RefineNet</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p2098615331959"><a name="p2098615331959"></a><a name="p2098615331959"></a>-</p>
</td>
</tr>
<tr id="row11931235957"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p1198616331657"><a name="p1198616331657"></a><a name="p1198616331657"></a>RefineDet</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p1698611332518"><a name="p1698611332518"></a><a name="p1698611332518"></a>-</p>
</td>
</tr>
<tr id="row189215359511"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p16986183319512"><a name="p16986183319512"></a><a name="p16986183319512"></a>AlignedReID</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p1898715331055"><a name="p1898715331055"></a><a name="p1898715331055"></a>-</p>
</td>
</tr>
<tr id="row89213351858"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p119878330511"><a name="p119878330511"></a><a name="p119878330511"></a>FaceBoxes</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p129878331158"><a name="p129878331158"></a><a name="p129878331158"></a>-</p>
</td>
</tr>
</tbody>
</table>
<h3 id="Modified Features 3">Modified Features</h3>
N/A
<h3 id="Resolved Issues 3">Resolved Issues</h3>
N/A
<h3 id="Known Issues 3">Known Issues</h3>
<a name="table1969972073016"></a>
<table><thead align="left"><tr id="row3699162017307"><th class="cellrowborder" valign="top" width="18.22%" id="mcps1.1.3.1.1"><p id="p16992020153010"><a name="p16992020153010"></a><a name="p16992020153010"></a>Known Issue</p>
</th>
<th class="cellrowborder" valign="top" width="81.78%" id="mcps1.1.3.1.2"><p id="p269919203308"><a name="p269919203308"></a><a name="p269919203308"></a>Description</p>
</th>
</tr>
</thead>
<tbody><tr id="row9699142003011"><td class="cellrowborder" valign="top" width="18.22%" headers="mcps1.1.3.1.1 "><p id="p1769932017300"><a name="p1769932017300"></a><a name="p1769932017300"></a>Data type support</p>
</td>
<td class="cellrowborder" valign="top" width="81.78%" headers="mcps1.1.3.1.2 "><p id="p13699152010301"><a name="p13699152010301"></a><a name="p13699152010301"></a>NPUs do not support the input or output of the inf/nan data of the float16 type.</p>
</td>
</tr>
<tr id="row146991520153016"><td class="cellrowborder" valign="top" width="18.22%" headers="mcps1.1.3.1.1 "><p id="p156997200308"><a name="p156997200308"></a><a name="p156997200308"></a>Data format</p>
</td>
<td class="cellrowborder" valign="top" width="81.78%" headers="mcps1.1.3.1.2 "><p id="p10699182020308"><a name="p10699182020308"></a><a name="p10699182020308"></a>Dimensions cannot be reduced when the format larger than 4D is used.</p>
</td>
</tr>
<tr id="row11121205610549"><td class="cellrowborder" rowspan="3" valign="top" width="18.22%" headers="mcps1.1.3.1.1 "><p id="p1647216219558"><a name="p1647216219558"></a><a name="p1647216219558"></a>Restrictions on collective communication</p>
<p id="p0465121912402"><a name="p0465121912402"></a><a name="p0465121912402"></a></p>
</td>
<td class="cellrowborder" valign="top" width="81.78%" headers="mcps1.1.3.1.2 "><p id="p3116115695415"><a name="p3116115695415"></a><a name="p3116115695415"></a>The graphs executed on different devices in a training job must be the same.</p>
</td>
</tr>
<tr id="row51211656105411"><td class="cellrowborder" valign="top" headers="mcps1.1.3.1.1 "><p id="p1311616560541"><a name="p1311616560541"></a><a name="p1311616560541"></a>Allocation at only 1, 2, 4, or 8 processors is supported.</p>
</td>
</tr>
<tr id="row8647195765419"><td class="cellrowborder" valign="top" headers="mcps1.1.3.1.1 "><p id="p2064225716544"><a name="p2064225716544"></a><a name="p2064225716544"></a>Only the int8, int32, float16, and float32 data types are supported.</p>
</td>
</tr>
<tr id="row4646195719548"><td class="cellrowborder" valign="top" width="18.22%" headers="mcps1.1.3.1.1 "><p id="p4642195718541"><a name="p4642195718541"></a><a name="p4642195718541"></a>Apex function</p>
</td>
<td class="cellrowborder" valign="top" width="81.78%" headers="mcps1.1.3.1.2 "><p id="p864205725412"><a name="p864205725412"></a><a name="p864205725412"></a>In the current version, Apex is implemented mainly using Python, and the customized optimization of CUDA kernel in Apex is not supported.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="Compatibility 3">Compatibility</h3>
Atlas 800 (model 9010): CentOS 7.6, Ubuntu 18.04, BC-Linux 7.6, Debian 9.9, Debian 10, and openEuler 20.03 LTS.
Atlas 800 (model 9000): CentOS 7.6, Euler 2.8, Kylin V10, BC-Linux 7.6, openEuler 20.03 LTS, and UOS 20 1020e.
<h2 id="frameworkptadapter-202">FrameworkPTAdapter 2.0.2</h2>
<h3 id="Before You Start 4">Before You Start</h3>
This framework is modified based on the open-source PyTorch 1.5.0 primarily developed by Facebook, inherits native PyTorch features, and uses NPUs for dynamic image training. Models are adapted by operator granularity, code can be reused, and current networks can be ported and used on NPUs with only device types or data types modified.
<h3 id="New Features-1md">New Features</h3>
**Table 1** Features supported by PyTorch
<a name="t76c34275cbb74753970f7c5a9eb594fa"></a>
<table><thead align="left"><tr id="r0c10e7163bf54fe8816ab5ca2d77ccc4"><th class="cellrowborder" valign="top" width="10.489999999999998%" id="mcps1.2.4.1.1"><p id="a7888762cf8294977b7d114b1c898d1bd"><a name="a7888762cf8294977b7d114b1c898d1bd"></a><a name="a7888762cf8294977b7d114b1c898d1bd"></a>Level-1 Feature</p>
</th>
<th class="cellrowborder" valign="top" width="26.3%" id="mcps1.2.4.1.2"><p id="a4581ffde4a5f455faadfba144243a9d4"><a name="a4581ffde4a5f455faadfba144243a9d4"></a><a name="a4581ffde4a5f455faadfba144243a9d4"></a>Level-2 Feature</p>
</th>
<th class="cellrowborder" valign="top" width="63.21%" id="mcps1.2.4.1.3"><p id="a2a1562364b09433a83133fa10b3cf2b3"><a name="a2a1562364b09433a83133fa10b3cf2b3"></a><a name="a2a1562364b09433a83133fa10b3cf2b3"></a>Description</p>
</th>
</tr>
</thead>
<tbody><tr id="row171322953713"><td class="cellrowborder" rowspan="7" valign="top" width="10.489999999999998%" headers="mcps1.2.4.1.1 "><p id="p10237517181"><a name="p10237517181"></a><a name="p10237517181"></a>Adapted training models</p>
</td>
<td class="cellrowborder" valign="top" width="26.3%" headers="mcps1.2.4.1.2 "><p id="p6134294377"><a name="p6134294377"></a><a name="p6134294377"></a>YOLOV4</p>
</td>
<td class="cellrowborder" valign="top" width="63.21%" headers="mcps1.2.4.1.3 "><p id="p314533811397"><a name="p314533811397"></a><a name="p314533811397"></a>-</p>
</td>
</tr>
<tr id="row15990182233714"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p399019224374"><a name="p399019224374"></a><a name="p399019224374"></a>YOLOV3</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p1714553816396"><a name="p1714553816396"></a><a name="p1714553816396"></a>-</p>
</td>
</tr>
<tr id="row5301255373"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p1530325123719"><a name="p1530325123719"></a><a name="p1530325123719"></a>DB</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p5146193819390"><a name="p5146193819390"></a><a name="p5146193819390"></a>-</p>
</td>
</tr>
<tr id="row274203413712"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p197423343379"><a name="p197423343379"></a><a name="p197423343379"></a>RFCN</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p15828941153919"><a name="p15828941153919"></a><a name="p15828941153919"></a>-</p>
</td>
</tr>
<tr id="row78671918163714"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p188671318183713"><a name="p188671318183713"></a><a name="p188671318183713"></a>CRNN</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p10828241123917"><a name="p10828241123917"></a><a name="p10828241123917"></a>-</p>
</td>
</tr>
<tr id="row16912221171"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p6913132676"><a name="p6913132676"></a><a name="p6913132676"></a>Densenset161</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p209131221474"><a name="p209131221474"></a><a name="p209131221474"></a>-</p>
</td>
</tr>
<tr id="row1016073314719"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p3160153320717"><a name="p3160153320717"></a><a name="p3160153320717"></a>Densenset191</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p1516012331173"><a name="p1516012331173"></a><a name="p1516012331173"></a>-</p>
</td>
</tr>
<tr id="row9627165910386"><td class="cellrowborder" rowspan="4" valign="top" width="10.489999999999998%" headers="mcps1.2.4.1.1 "><p id="p1561535993811"><a name="p1561535993811"></a><a name="p1561535993811"></a>PyTorch features adapted to NPUs</p>
</td>
<td class="cellrowborder" valign="top" width="26.3%" headers="mcps1.2.4.1.2 "><p id="p136151659163819"><a name="p136151659163819"></a><a name="p136151659163819"></a>Basic Framework Functions</p>
</td>
<td class="cellrowborder" valign="top" width="63.21%" headers="mcps1.2.4.1.3 "><p id="p1661535983813"><a name="p1661535983813"></a><a name="p1661535983813"></a>Added the function of adapted operator development. For details, see the operator list.</p>
</td>
</tr>
<tr id="row7627155917380"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p1561525916383"><a name="p1561525916383"></a><a name="p1561525916383"></a>Model Accuracy Analyzer</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p19616115953816"><a name="p19616115953816"></a><a name="p19616115953816"></a>Added the Model Accuracy Analyzer and supported training accuracy demarcation.</p>
</td>
</tr>
<tr id="row46269593383"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p0616559163819"><a name="p0616559163819"></a><a name="p0616559163819"></a>Ascend 710 AI Processor</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p186161459193813"><a name="p186161459193813"></a><a name="p186161459193813"></a>Supported the online inference on the Ascend 710 AI Processor.</p>
</td>
</tr>
<tr id="row76261059153817"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p11616175953812"><a name="p11616175953812"></a><a name="p11616175953812"></a>OS Compatibility</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.2.4.1.2 "><p id="p8935115971714"><a name="p8935115971714"></a><a name="p8935115971714"></a>Supported Ubuntu 18.04.5 and openEuler 20.03 LTS.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="Modified Features 4">Modified Features</h3>
N/A
<h3 id="Resolved Issues 4">Resolved Issues</h3>
N/A
<h3 id="Known Issues 4">Known Issues</h3>
<a name="table1969972073016"></a>
<table><thead align="left"><tr id="row3699162017307"><th class="cellrowborder" valign="top" width="18.22%" id="mcps1.1.3.1.1"><p id="p16992020153010"><a name="p16992020153010"></a><a name="p16992020153010"></a>Known Issue</p>
</th>
<th class="cellrowborder" valign="top" width="81.78%" id="mcps1.1.3.1.2"><p id="p269919203308"><a name="p269919203308"></a><a name="p269919203308"></a>Description</p>
</th>
</tr>
</thead>
<tbody><tr id="row9699142003011"><td class="cellrowborder" valign="top" width="18.22%" headers="mcps1.1.3.1.1 "><p id="p1769932017300"><a name="p1769932017300"></a><a name="p1769932017300"></a>Data type support</p>
</td>
<td class="cellrowborder" valign="top" width="81.78%" headers="mcps1.1.3.1.2 "><p id="p13699152010301"><a name="p13699152010301"></a><a name="p13699152010301"></a>NPUs do not support the input or output of the inf/nan data of the float16 type.</p>
</td>
</tr>
<tr id="row146991520153016"><td class="cellrowborder" valign="top" width="18.22%" headers="mcps1.1.3.1.1 "><p id="p156997200308"><a name="p156997200308"></a><a name="p156997200308"></a>Data format</p>
</td>
<td class="cellrowborder" valign="top" width="81.78%" headers="mcps1.1.3.1.2 "><p id="p10699182020308"><a name="p10699182020308"></a><a name="p10699182020308"></a>Dimensions cannot be reduced when the format larger than 4D is used.</p>
</td>
</tr>
<tr id="row11121205610549"><td class="cellrowborder" rowspan="3" valign="top" width="18.22%" headers="mcps1.1.3.1.1 "><p id="p1647216219558"><a name="p1647216219558"></a><a name="p1647216219558"></a>Restrictions on collective communication</p>
<p id="p0465121912402"><a name="p0465121912402"></a><a name="p0465121912402"></a></p>
</td>
<td class="cellrowborder" valign="top" width="81.78%" headers="mcps1.1.3.1.2 "><p id="p3116115695415"><a name="p3116115695415"></a><a name="p3116115695415"></a>The graphs executed on different devices in a training job must be the same.</p>
</td>
</tr>
<tr id="row51211656105411"><td class="cellrowborder" valign="top" headers="mcps1.1.3.1.1 "><p id="p1311616560541"><a name="p1311616560541"></a><a name="p1311616560541"></a>Allocation at only 1, 2, 4, or 8 processors is supported.</p>
</td>
</tr>
<tr id="row8647195765419"><td class="cellrowborder" valign="top" headers="mcps1.1.3.1.1 "><p id="p2064225716544"><a name="p2064225716544"></a><a name="p2064225716544"></a>Only the int8, int32, float16, and float32 data types are supported.</p>
</td>
</tr>
<tr id="row4646195719548"><td class="cellrowborder" valign="top" width="18.22%" headers="mcps1.1.3.1.1 "><p id="p4642195718541"><a name="p4642195718541"></a><a name="p4642195718541"></a>Apex function</p>
</td>
<td class="cellrowborder" valign="top" width="81.78%" headers="mcps1.1.3.1.2 "><p id="p864205725412"><a name="p864205725412"></a><a name="p864205725412"></a>In the current version, Apex is implemented mainly using Python, and the customized optimization of CUDA kernel in Apex is not supported.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="Compatibility 4">Compatibility</h3>
Atlas 800 (model 9010): CentOS 7.6, Ubuntu 18.04, BC-Linux 7.6, Debian 9.9, Debian 10, and openEuler 20.03 LTS.
Atlas 800 (model 9000): CentOS 7.6/EulerOS 2.8/Kylin v10/BC-Linux 7.6/openEuler 20.03 LTS
Binary file not shown.

After

Width:  |  Height:  |  Size: 580 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 B

File diff suppressed because it is too large Load Diff

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