Skip to content

FakeTensorUpdater doesn't support HOPs #156819

@zou3519

Description

@zou3519

def should_process_node(node):
# node.target for nodes returning true from this function
# are called under fake mode and does not work for inductor
# lowerings. We check if the node.target is an aten operator
# or operator.getitem which is used when returning multiple
# tensors from an op.
return node.op == "call_function" and (
isinstance(node.target, torch._ops.OpOverload)
or node.target == operator.getitem
)

This will probably lead to silent incorrectness?

Also, given that FakeTensorUpdater is load bearing (bugs in it will cause silent incorrectness), we should probably sit down and try to unittest it directly.

cc @ezyang @gchanan @kadeng @msaroufim @chauhang @penguinwu @eellison @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @muchulee8 @amjames @aakhundov @bdhirsh

Metadata

Metadata

Labels

high prioritymodule: fakeTensormodule: inductormodule: pt2-dispatcherPT2 dispatcher-related issues (e.g., aotdispatch, functionalization, faketensor, custom-op,oncall: pt2pt2: ubn"unbreak now" hi-pri, only applies to the PyTorch Compiler Team.triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions