Skip to content

Fix the crash with copy op in dynamo#7902

Merged
zpcore merged 1 commit intomasterfrom
JackCaoG/dynamo_handle_copy
Aug 23, 2024
Merged

Fix the crash with copy op in dynamo#7902
zpcore merged 1 commit intomasterfrom
JackCaoG/dynamo_handle_copy

Conversation

@JackCaoG
Copy link
Copy Markdown
Collaborator

@JackCaoG JackCaoG commented Aug 23, 2024

We need to do a dedup for the dynamo output, for example in the case of

def f(a):
  a += 1
  return a

From dynamo bridge perspective there are 2 outputs.

  1. input a has been inplace updated
  2. return value a

However from XLA perspective there is only one output. In order to match these two thing we need a way to tell that 2 output are the same hence we need to dedup. In the test case I added, there is a copy op in the function we want to compile. In this case dynamo bridge failed to recognize copied tensor and the origional tensor are the same tensor hence the crash.

@JackCaoG JackCaoG requested review from lsy323 and will-cromar August 23, 2024 17:02
@JackCaoG JackCaoG marked this pull request as ready for review August 23, 2024 17:02
@zpcore zpcore merged commit 3d860bf into master Aug 23, 2024
@zpcore zpcore deleted the JackCaoG/dynamo_handle_copy branch August 23, 2024 17:36
yitongh pushed a commit to AlibabaPAI/xla that referenced this pull request Oct 11, 2024
yitongh pushed a commit to AlibabaPAI/xla that referenced this pull request Dec 11, 2024
yitongh pushed a commit to AlibabaPAI/xla that referenced this pull request Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants