Skip to content

Conversation

@0x3878f
Copy link
Contributor

@0x3878f 0x3878f commented Mar 14, 2025

PR Category

Execute Infrastructure

PR Types

Improvements

Description

Pcard-67164
Support check distributed info of tensor in TensorVariable Guard

Note

  • To deal with the scenario where the operand is a fake value in func _complete_op_dist_attr of the mix_to_dist_pass in future.
def _complete_op_dist_attr(program, block=None): ... for op in block.ops: ... for operand in op.operands_source(): tmp_attr = operand.dist_attr() if tmp_attr is None: operand_attrs.append(pir.Attribute()) value_mesh = None tmp_op_dist_attr = operand.get_defining_op().dist_attr # error occurs when operand is a fake value if tmp_op_dist_attr is not None: value_mesh = tmp_op_dist_attr.process_mesh else: operand_attrs.append(tmp_attr) value_mesh = tmp_attr.process_mesh if value_mesh is not None and value_mesh not in meshes: meshes.append(value_mesh) ...
@paddle-bot
Copy link

paddle-bot bot commented Mar 14, 2025

你的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.

Comment on lines 27 to 33
def apply_fn(fn, x, y):
return fn(x, y)


@check_no_breakgraph
def fn1(x, y):
return x + y
Copy link
Member

Choose a reason for hiding this comment

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

直接写一个 dist_fn 就可以吧,apply_fn 是我其他单测用来测试用的,这个 case 应该不用这么绕

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好的,我修改一下

Comment on lines 36 to 37
class TestApplyDifferentFunctions(TestCaseBase):
def test_apply_fn(self):
Copy link
Member

Choose a reason for hiding this comment

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

单测 case 名改一下

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好的

SigureMo
SigureMo previously approved these changes Mar 14, 2025
Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

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

LGTMeow 🐾

@SigureMo SigureMo changed the title [SOT] Add guard for dist tensor [SOT][Dist] Add guard for dist tensor Mar 14, 2025
SigureMo
SigureMo previously approved these changes Mar 17, 2025
@0x3878f 0x3878f force-pushed the sot_dist_info_guard branch from d81bfef to 7174f7e Compare March 19, 2025 09:08
Copy link
Contributor

@wanghuancoder wanghuancoder left a comment

Choose a reason for hiding this comment

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

LGTM

@SigureMo SigureMo merged commit 2b7bf33 into PaddlePaddle:develop Mar 20, 2025
30 checks passed
YqGe585 pushed a commit to YqGe585/Paddle that referenced this pull request May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants