Skip to content

Avoid segfault in segmentation with dangling unary ops#586

Merged
jacobhinkle merged 7 commits intomainfrom
fix_issue585
Jul 14, 2023
Merged

Avoid segfault in segmentation with dangling unary ops#586
jacobhinkle merged 7 commits intomainfrom
fix_issue585

Conversation

@jacobhinkle
Copy link
Collaborator

Fixes #585

@jacobhinkle jacobhinkle requested a review from naoyam July 13, 2023 14:16
@jacobhinkle jacobhinkle marked this pull request as ready for review July 13, 2023 14:16
Copy link
Collaborator

@naoyam naoyam left a comment

Choose a reason for hiding this comment

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

LGTM. The reason this only happens with a scalar and not with a tensor is that we delete uses that do not lead to fusion outputs. So, if a unary-op sequence from a tensor input does not lead to an output, the uses of the fusion input should be empty, so we shouldn't add anything to to_visit.

@naoyam
Copy link
Collaborator

naoyam commented Jul 13, 2023

Nice catch and thanks for fixing!

jacobhinkle and others added 3 commits July 14, 2023 07:14
Co-authored-by: Naoya Maruyama <naoyam@users.noreply.github.com>
Co-authored-by: Naoya Maruyama <naoyam@users.noreply.github.com>
@jacobhinkle jacobhinkle merged commit e7967f7 into main Jul 14, 2023
@jacobhinkle jacobhinkle deleted the fix_issue585 branch July 14, 2023 12:26
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.

Segfault segmenting in presence of dangling unary Op chain from inputs

2 participants