Skip to content

Conversation

xiaoguoguo626807
Copy link
Contributor

@xiaoguoguo626807 xiaoguoguo626807 commented Oct 16, 2023

PR types

others

PR changes

others

Description

pcard-67164

  1. axis != None 分支中uniform无法处理【int, opresult】 类型shape输入,导致infermeta 推断out shape 为【1, -1】无法alloc 内存。
  2. res10 和 其他res 在一个program中处理会导致fetch op 拿不到输入;因此分开处理
image 3. TestDropOutWithProbTensor 中dropout的 p参数为assign的结果,在python-c层要求double数据报错。考虑到python-c按照yaml配置生成,p不是可变attribute 因此不考虑适配此种情况。
  1. 补充,add, gelu 其他单测

xiaoguoguo626807 and others added 30 commits August 30, 2023 01:44
def check_static_result(self, place):
paddle.enable_static()
with base.program_guard(base.Program(), base.Program()):
program = paddle.static.Program()
with base.program_guard(program, program):
Copy link
Contributor

Choose a reason for hiding this comment

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

param_guard 里分别是main_program和startup_program,这里不应该传入同一个的

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

def test_errors(self):
paddle.enable_static()
with program_guard(Program(), Program()):
program1 = paddle.static.Program()
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
program1 = paddle.static.Program()
main_prog = paddle.static.Program()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

def test_errors(self):
paddle.enable_static()
with program_guard(Program(), Program()):
program1 = paddle.static.Program()
program2 = paddle.static.Program()
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
program2 = paddle.static.Program()
startup_prog = paddle.static.Program()

下同

Copy link
Contributor

@YuanRisheng YuanRisheng left a comment

Choose a reason for hiding this comment

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

确认一下本pr中未修改的base.program_guard是否是pir下的program_guard

@xiaoguoguo626807 xiaoguoguo626807 merged commit a08db48 into PaddlePaddle:develop Oct 17, 2023
@xiaoguoguo626807 xiaoguoguo626807 deleted the dropout branch October 17, 2023 07:30
hitywt pushed a commit to hitywt/Paddle that referenced this pull request Oct 24, 2023
* tmp

* modify unsqueeze

* modify part complex bug

* modify

* modify cpu

* [PIR]Migrate maximum into pir

* Polish code

* add ir_grad of static_gradient

* add test

* modify bug

* modify

* test_with_pir

* close one test

* add_math_op_patch

* modify

* modify

* add mean fill_constant test

* modify cpu int32 test

* get_shape_tensor

* delete

* add default place

* add dropout unittest

* Update test/legacy_test/test_elementwise_div_op.py

* modify review comment

* modify add test

---------

Co-authored-by: 0x45f <wangzhen45@baidu.com>
jiahy0825 pushed a commit to jiahy0825/Paddle that referenced this pull request Oct 26, 2023
* tmp

* modify unsqueeze

* modify part complex bug

* modify

* modify cpu

* [PIR]Migrate maximum into pir

* Polish code

* add ir_grad of static_gradient

* add test

* modify bug

* modify

* test_with_pir

* close one test

* add_math_op_patch

* modify

* modify

* add mean fill_constant test

* modify cpu int32 test

* get_shape_tensor

* delete

* add default place

* add dropout unittest

* Update test/legacy_test/test_elementwise_div_op.py

* modify review comment

* modify add test

---------

Co-authored-by: 0x45f <wangzhen45@baidu.com>
danleifeng pushed a commit to danleifeng/Paddle that referenced this pull request Nov 14, 2023
* tmp

* modify unsqueeze

* modify part complex bug

* modify

* modify cpu

* [PIR]Migrate maximum into pir

* Polish code

* add ir_grad of static_gradient

* add test

* modify bug

* modify

* test_with_pir

* close one test

* add_math_op_patch

* modify

* modify

* add mean fill_constant test

* modify cpu int32 test

* get_shape_tensor

* delete

* add default place

* add dropout unittest

* Update test/legacy_test/test_elementwise_div_op.py

* modify review comment

* modify add test

---------

Co-authored-by: 0x45f <wangzhen45@baidu.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants