Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【NPU】Cherry-pick ascendrc ops code by 0325 to develop #32197

Merged
merged 98 commits into from
Apr 15, 2021

Commits on Apr 12, 2021

  1. merge 31065

    xymyeah authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    c4ce9c5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bd13ff2 View commit details
    Browse the repository at this point in the history
  3. merge 31249

    xymyeah authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    0592003 View commit details
    Browse the repository at this point in the history
  4. [NPU] Support npu op pow and pow grad (PaddlePaddle#31247)

    * [NPU] Support npu op: (1) pow (2) pow_grad
    
    * Support fp16
    liym27 authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    5a69ab8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e8b5505 View commit details
    Browse the repository at this point in the history
  6. support list of list attribute for NPU (PaddlePaddle#31299)

    * support list of list attribute for NPU
    
    * fix compile problem
    
    * fix reference
    zhiqiu authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    9851897 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c5474d7 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    1085db5 View commit details
    Browse the repository at this point in the history
  9. merge 31347

    zhiqiu authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    1e952c3 View commit details
    Browse the repository at this point in the history
  10. [NPU] Support npu op layer_norm and layer_norm_grad (PaddlePaddle#31310)

    * init commit, add layer_norm npu kernel
    
    * fix typo
    
    * add unittest
    
    * add unittest
    
    * fix bug
    
    * fix bug
    
    * refine ut
    zhiqiu authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    19aca4f View commit details
    Browse the repository at this point in the history
  11. [NPU] add npu kernel for equal op (PaddlePaddle#31393)

    * add npu kernel for equal op
    
    * refine code
    
    * add more ut
    
    * update year
    zhiqiu authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    b8789b0 View commit details
    Browse the repository at this point in the history
  12. [NPU] Support npu kernel for shape op (PaddlePaddle#31427)

    * add shape npu
    
    * fix
    
    * fix
    frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    c457e6b View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    832548f View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    b788ae0 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    37ed82e View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    612a998 View commit details
    Browse the repository at this point in the history
  17. [NPU] squeeze and unsqueeze op for ascend (PaddlePaddle#31452)

    Co-authored-by: root <xiayanming@baidu.com>
    2 people authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    792c8e4 View commit details
    Browse the repository at this point in the history
  18. Support npu kernel for gather op (PaddlePaddle#31458)

    * add gather npu op
    
    * code review done
    
    * update python new line
    
    * precommit
    
    * fix review
    
    * del commit
    xymyeah authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    738cbb9 View commit details
    Browse the repository at this point in the history
  19. 【NPU】add scale op for npu (PaddlePaddle#31499)

    * add scale npu
    
    * fix
    
    * fix
    frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    01c7bf5 View commit details
    Browse the repository at this point in the history
  20. Support TensorFormVector, TensorToVector of bool type (PaddlePaddle#3…

    …1518)
    
    * support TensorFormVector, TensorToVector of bool type
    
    * add ut
    
    * fix compile problem
    zhiqiu authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    33d16f2 View commit details
    Browse the repository at this point in the history
  21. 【NPU】support npu kernel for fill_constant op (PaddlePaddle#31521)

    * add fill_constant npu
    
    * add fill_constant npu
    
    * fix
    frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    8b47d68 View commit details
    Browse the repository at this point in the history
  22. cherry-pick 31422, solve conflict

    xymyeah authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    efa770c View commit details
    Browse the repository at this point in the history
  23. 【NPU】Support npu kernel for matmul op (PaddlePaddle#31544)

    * add matmulv2_npu
    
    * add matmul
    
    * add matmul
    frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    06dd58d View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    795c645 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    4d79141 View commit details
    Browse the repository at this point in the history
  26. 【NPU】add relu op for npu (PaddlePaddle#31515)

    * add relu npu
    
    * fixed
    
    * fix
    frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    ad2c58c View commit details
    Browse the repository at this point in the history
  27. 【NPU】Suppert npu kernel for reshape2 op (PaddlePaddle#31524)

    * add reshape2 npu
    
    * add reshpe2
    frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    9d2c9dc View commit details
    Browse the repository at this point in the history
  28. [NPU] Support npu kernel for gather op fix bug (PaddlePaddle#31541)

    * add gather npu op
    
    * code review done
    
    * update python new line
    
    * precommit
    
    * fix review
    
    * del commit
    
    * update gather_grad
    
    * fix bug
    
    * fix bug
    xymyeah authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    991c03c View commit details
    Browse the repository at this point in the history
  29. [NPU] Support npu kernel for amp_check_finite_and_unscale_npu op (Pad…

    …dlePaddle#31457)
    
    * Support npu kernel for amp_check_finite_and_unscale_npu op
    
    * support EnforceNotMet exception
    
    * fix exception bug
    
    * modify python unittest
    
    * precommit
    
    * update c++ unittest
    
    * fix review
    
    * fix review
    xymyeah authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    4765645 View commit details
    Browse the repository at this point in the history
  30. [NPU] accuracy op (PaddlePaddle#31492)

    * accuracy op
    
    * fix license
    
    * fix
    
    * add test and fix bug
    yinhaofeng authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    c28885e View commit details
    Browse the repository at this point in the history
  31. [NPU] add Assign OP (PaddlePaddle#31561)

    * add assign op
    
    * add test assign npu test
    
    * dele if def
    
    Co-authored-by: oyjxer <1728722986@qq.com>
    2 people authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    20a165c View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    3738ec7 View commit details
    Browse the repository at this point in the history
  33. 【NPU】Support npu op gelu and gelu_grad (PaddlePaddle#31530)

    * Support npu op gelu and gelu_grad
    
    * Support npu op gelu and gelu_grad
    oyjxer authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    6096f9b View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    a7625c0 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    003eb59 View commit details
    Browse the repository at this point in the history
  36. [NPU] add range op (PaddlePaddle#31560)

    * add range op
    
    * fix codestyle; call GetSize directly
    
    Co-authored-by: oyjxer <1728722986@qq.com>
    2 people authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    ba085b9 View commit details
    Browse the repository at this point in the history
  37. 【NPU】Support npu op elementwise_div and elementwise_div_grad (PaddleP…

    …addle#31573)
    
    * Support npu op elementwise_div and elementwise_div_grad
    
    * Support npu op elementwise_div and elementwise_div_grad
    
    * Support npu op elementwise_div and elementwise_div_grad
    oyjxer authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    cbe00cb View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    dc1f62b View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    1ead5a0 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    c4423e6 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    099cf9e View commit details
    Browse the repository at this point in the history
  42. [NPU] Support npu op table_lookup_v2 and table_lookup_v2_grad (Paddle…

    …Paddle#31399)
    
    * [npu] support npu kernel `table_lookup_v2`
    
    * clean up
    
    * +python test
    
    * +cmake
    
    * clean up
    
    * remove int8 kernel
    + python unitest for fp16
    
    * clean up
    Meiyim authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    14d3009 View commit details
    Browse the repository at this point in the history
  43. [NPU] support npu kernel for less_than (PaddlePaddle#31327)

    * [npu] support npu kernel for `less than`
    
    * remove int* kernel
    
    * cleanup
    Meiyim authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    07f3f5a View commit details
    Browse the repository at this point in the history
  44. [NPU] Support npu kernel scatter op (PaddlePaddle#31624)

    * Support npu kernel scatter op
    
    * Add more test
    oyxuan-11 authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    817a06e View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    2d5cd1e View commit details
    Browse the repository at this point in the history
  46. [NPU] Support NPU kernel cast op (PaddlePaddle#31635)

    Co-authored-by: frankwhzhang <frankwhzhang@126.com>
    oyxuan-11 and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    38419f5 View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    1f4a044 View commit details
    Browse the repository at this point in the history
  48. 【NPU】Support NPU kernel for reduce_sum op v2 (PaddlePaddle#31620)

    * add reduce_sum
    
    * fix broadcastd
    
    * fix test
    
    * fix
    
    * add unsqueeze in reduce_sum
    
    * add template
    
    * add unittest for keep_dim
    
    * test reduce_all
    
    Co-authored-by: frankwhzhang <frankwhzhang@126.com>
    pangyoki and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    14f23be View commit details
    Browse the repository at this point in the history
  49. [NPU] add npu kernel for adam (PaddlePaddle#31644)

    * add npu kernel for adam
    
    * refine code
    
    * disable test
    
    * modify atol
    zhiqiu authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    9ed9b8a View commit details
    Browse the repository at this point in the history
  50. 【NPU】Support npu kernel for mul op (PaddlePaddle#31584)

    * add mul
    
    * add test mul
    frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    b7ba6a2 View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    cb2d7b2 View commit details
    Browse the repository at this point in the history
  52. [NPU] add npu kernel for mean Op (PaddlePaddle#31562)

    * update mean op
    
    * update mean op
    
    * give a better test activation
    
    Co-authored-by: oyjxer <1728722986@qq.com>
    2 people authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    a6c6a09 View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    595e605 View commit details
    Browse the repository at this point in the history
  54. 【NPU】Add TensorCopy to NPU kernel for reduce_sum op (PaddlePaddle#31667)

    * update unittest
    
    * add TensorCopy in npu grad kernel
    pangyoki authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    a0f7d11 View commit details
    Browse the repository at this point in the history
  55. [NPU] Support npu op expand (PaddlePaddle#31405)

    * [npu] support npu kernel  for `expand`
    Meiyim authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    22b95a1 View commit details
    Browse the repository at this point in the history
  56. [NPU] fix shape of dx in mul_grad (PaddlePaddle#31675)

    * fix shape of dx
    
    * refine code
    zhiqiu authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    ee43974 View commit details
    Browse the repository at this point in the history
  57. [NPU] add Increment op (PaddlePaddle#31563)

    * add increment
    
    * fix
    
    * update test increment op inplace
    
    * update increment op
    
    * increment b = 2
    
    Co-authored-by: oyjxer <1728722986@qq.com>
    2 people authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    8c4b97c View commit details
    Browse the repository at this point in the history
  58. [NPU] add NPU add topk (PaddlePaddle#31596)

    * add topk op
    
    * add cmake
    
    * update topk npu op
    
    * refactor func
    
    * fix test not go npu TopKD bug
    
    * NPUPlace(4) to NPUPlace(0)
    
    * update comment
    
    Co-authored-by: oyjxer <1728722986@qq.com>
    2 people authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    41093f6 View commit details
    Browse the repository at this point in the history
  59. Configuration menu
    Copy the full SHA
    6d7aa89 View commit details
    Browse the repository at this point in the history
  60. Configuration menu
    Copy the full SHA
    5e8f854 View commit details
    Browse the repository at this point in the history
  61. cherry-pick 31564, solve conflict

    OleNet authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    e8acc60 View commit details
    Browse the repository at this point in the history
  62. Configuration menu
    Copy the full SHA
    993235b View commit details
    Browse the repository at this point in the history
  63. Configuration menu
    Copy the full SHA
    af99906 View commit details
    Browse the repository at this point in the history
  64. Configuration menu
    Copy the full SHA
    24ad385 View commit details
    Browse the repository at this point in the history
  65. Configuration menu
    Copy the full SHA
    fc9554d View commit details
    Browse the repository at this point in the history
  66. [NPU] fix reshape npu op kernel (PaddlePaddle#31726)

    * rename npu op file
    
    * fix reshape
    zhiqiu authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    07f97a4 View commit details
    Browse the repository at this point in the history
  67. [NPU] change transpose to transpose2 (PaddlePaddle#31734)

    * change transpose to transpose2
    
    * fix bug
    zhiqiu authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    3dcd6b5 View commit details
    Browse the repository at this point in the history
  68. Configuration menu
    Copy the full SHA
    9d0f0c1 View commit details
    Browse the repository at this point in the history
  69. [NPU] fix some bugs of npu op (PaddlePaddle#31739)

    * fix softmax
    
    * fix mean
    
    * fix lookup_table_v2
    zhiqiu authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    504163a View commit details
    Browse the repository at this point in the history
  70. Configuration menu
    Copy the full SHA
    76903ce View commit details
    Browse the repository at this point in the history
  71. [NPU] fix the grad kernel diff bug of gather op (PaddlePaddle#31757)

    * fix gather grad kernel diff
    
    * fix gather grad kernel diff
    
    * fix gather review bug
    xymyeah authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    d0d14d0 View commit details
    Browse the repository at this point in the history
  72. Configuration menu
    Copy the full SHA
    731d52c View commit details
    Browse the repository at this point in the history
  73. Configuration menu
    Copy the full SHA
    2e4544d View commit details
    Browse the repository at this point in the history
  74. [NPU] support list of tensor input (PaddlePaddle#31801)

    * support list of tensor as npu input
    
    * add comment
    
    * fix typo
    
    * fix typo
    zhiqiu authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    db31a33 View commit details
    Browse the repository at this point in the history
  75. [NPU] add npu kernel for concat op (PaddlePaddle#31695)

    * add npu kernel for concat op
    
    * add npu kernel for concat op
    
    * refine code
    
    * update
    
    * refine concat_grad
    zhiqiu authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    b761a75 View commit details
    Browse the repository at this point in the history
  76. Configuration menu
    Copy the full SHA
    9acdf0d View commit details
    Browse the repository at this point in the history
  77. Configuration menu
    Copy the full SHA
    f674b39 View commit details
    Browse the repository at this point in the history
  78. Configuration menu
    Copy the full SHA
    5bcfa8a View commit details
    Browse the repository at this point in the history
  79. [NPU] support mixed precision input for npu layer norm (PaddlePaddle#…

    …31847)
    
    * support mixed precision input for npu layer norm
    
    * fix layer_norm npu kernel
    
    Co-authored-by: zhiqiu <chenqiuliang@baidu.com>
    2 people authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    25aa56b View commit details
    Browse the repository at this point in the history
  80. 【NPU】Support npu kernel for update_loss_scaling op (PaddlePaddle#31830)

    * add update_loss_scaling_npu NPU kernel
    
    * change TensorFromVec to Memset
    pangyoki authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    7f6b837 View commit details
    Browse the repository at this point in the history
  81. Configuration menu
    Copy the full SHA
    2f8a972 View commit details
    Browse the repository at this point in the history
  82. Configuration menu
    Copy the full SHA
    5f0944d View commit details
    Browse the repository at this point in the history
  83. Configuration menu
    Copy the full SHA
    661c4b2 View commit details
    Browse the repository at this point in the history
  84. [NPU] fix some op bugs (PaddlePaddle#31855)

    * fix some op bugs
    
    * fix some bugs
    
    * follow comments
    
    * fix log level
    
    * add ut
    zhiqiu authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    399959e View commit details
    Browse the repository at this point in the history
  85. Configuration menu
    Copy the full SHA
    1464a59 View commit details
    Browse the repository at this point in the history
  86. [NPU] add npu kernel for truncated_gaussian_random op (PaddlePaddle#3…

    …1654)
    
    * init
    
    * add todo
    
    * add npu kernel for truncated_gaussian_random
    
    * add sync
    
    * fix concat_grad
    
    * fix typo
    zhiqiu authored and frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    479009e View commit details
    Browse the repository at this point in the history
  87. fix compile

    frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    9553a21 View commit details
    Browse the repository at this point in the history
  88. fix compile

    frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    de3d052 View commit details
    Browse the repository at this point in the history
  89. fix compile

    frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    8d94bd7 View commit details
    Browse the repository at this point in the history
  90. fix compile

    frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    4a3cd69 View commit details
    Browse the repository at this point in the history
  91. fix compile

    frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    3e5278a View commit details
    Browse the repository at this point in the history
  92. fix compile

    frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    2ac9f4b View commit details
    Browse the repository at this point in the history
  93. fix code style

    frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    c46f44f View commit details
    Browse the repository at this point in the history
  94. fix code style

    frankwhzhang committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    85ae3e2 View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2021

  1. fix code

    frankwhzhang committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    a5e35e2 View commit details
    Browse the repository at this point in the history
  2. Fix op test (PaddlePaddle#32231)

    liym27 authored and frankwhzhang committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    f032717 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ff622d8 View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2021

  1. fix style code

    frankwhzhang committed Apr 14, 2021
    1 Configuration menu
    Copy the full SHA
    7e9c4ef View commit details
    Browse the repository at this point in the history