Skip to content

Conversation

Difers
Copy link
Contributor

@Difers Difers commented Sep 13, 2023

PR types

Function optimization

PR changes

APIs

Description

完善get_value相关OP的dtype支持

  • 对相关OP:slice, strided_slice, gather_nd, unsqueeze, suqeeze, transpose, stack补全注册类型
  • 补全get_value不同类型单测
  • 避免gather_nd index complex类型转化问题,改动了ops.yaml,backward.yaml, 加入了skip 【Complex op】add complex support for index_select and index_sample #56457
  • gather_nd 反向OP 需调用 atomicAdd,补全了 atomicAdd bool, int8, uint8, int16类型

@paddle-bot
Copy link

paddle-bot bot commented Sep 13, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot bot added the contributor External developers label Sep 13, 2023
@Difers Difers force-pushed the add_setvalue_types branch 2 times, most recently from 003d578 to 1e8ee36 Compare September 14, 2023 01:49
@Difers Difers changed the title Enhance dtype support for the set_value operation. Enhance dtype support for the get_value operation. Sep 14, 2023
@Difers Difers force-pushed the add_setvalue_types branch 2 times, most recently from 00a7739 to 104cfe5 Compare September 15, 2023 15:46
self.ndtype = np.float64
self.dtype = 'complex128'


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

辛苦补充下简单的case,测试补充的case在反向op下的可行性

@Difers Difers force-pushed the add_setvalue_types branch 2 times, most recently from 5c30706 to 1b4aad3 Compare September 21, 2023 10:13
@paddle-ci-bot
Copy link

paddle-ci-bot bot commented Sep 29, 2023

Sorry to inform you that 1b4aad3's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

@Difers Difers force-pushed the add_setvalue_types branch 4 times, most recently from 333a979 to c2003e5 Compare October 9, 2023 08:59
@Difers Difers closed this Oct 10, 2023
@Difers Difers reopened this Oct 10, 2023
Copy link
Contributor

@zoooo0820 zoooo0820 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

self.dtype = 'complex128'


class TestGetitemGard(unittest.TestCase):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gard -> Grad, 等到下个PR一起改过来吧

@Difers Difers force-pushed the add_setvalue_types branch 3 times, most recently from a1b61b5 to a4fb546 Compare October 12, 2023 06:20
@paddle-ci-bot
Copy link

paddle-ci-bot bot commented Oct 20, 2023

Sorry to inform you that a4fb546's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

@Difers Difers force-pushed the add_setvalue_types branch from a4fb546 to 4b9a08f Compare October 24, 2023 07:04
@Difers Difers force-pushed the add_setvalue_types branch from 4b9a08f to cd6cbf8 Compare October 30, 2023 05:57
Copy link
Contributor

@zoooo0820 zoooo0820 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@jeff41404 jeff41404 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -938,6 +938,8 @@
func : gather_nd_grad
composite : gather_nd_grad(x, index, out_grad, x_grad)
no_need_buffer : x
data_transform :
skip_transform : index
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里不对index做data_transform,是因为在kernel内部对这个参数做了限制吗?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里不对index做data_transform,是因为在kernel内部对这个参数做了限制吗?

是的,index要求int32/int64类型,但会在x是complex类型时被自动转换为complex导致报错,因此希望加上skip_transform保留原始类型

@luotao1 luotao1 merged commit d8d45ae into PaddlePaddle:develop Nov 3, 2023
zeroRains pushed a commit to zeroRains/Paddle that referenced this pull request Nov 8, 2023
* add more type&test for getitem

* fix uint8

* add atomicAdd some int types

* fix cpplint error

* fix some type error

* add some miss type

* add return for cudaAdd
danleifeng pushed a commit to danleifeng/Paddle that referenced this pull request Nov 14, 2023
* add more type&test for getitem

* fix uint8

* add atomicAdd some int types

* fix cpplint error

* fix some type error

* add some miss type

* add return for cudaAdd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants