Skip to content

fix: index_put converter to handle multi-shape slicing with None #3475

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2025

Conversation

chohk88
Copy link
Collaborator

@chohk88 chohk88 commented Apr 15, 2025

Description

Previously, index_put converter passed all test cases but failed in a corner case where slicing is done using a multi-dimensional tensor together with None (e.g., tensor[None, idx_tensor]). This PR updates the converter to properly handle that case.

Fixes # (issue)

Type of change

Please delete options that are not relevant and/or add your own.

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the style guidelines of this project (You can use the linters)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas and hacks
  • I have made corresponding changes to the documentation
  • I have added tests to verify my fix or my feature
  • New and existing unit tests pass locally with my changes
  • I have added the relevant labels to my PR in so that relevant reviewers are notified

@chohk88 chohk88 added the component: converters Issues re: Specific op converters label Apr 15, 2025
@chohk88 chohk88 requested review from peri044 and apbose April 15, 2025 06:52
@chohk88 chohk88 self-assigned this Apr 15, 2025
@github-actions github-actions bot added component: tests Issues re: Tests component: conversion Issues re: Conversion stage component: api [Python] Issues re: Python API component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths labels Apr 15, 2025
@github-actions github-actions bot requested a review from gs-olive April 15, 2025 06:53
@chohk88 chohk88 requested a review from zewenli98 April 15, 2025 06:54
Copy link
Collaborator

@zewenli98 zewenli98 left a comment

Choose a reason for hiding this comment

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

Can you rebase on the latest main branch? If all CI tests pass after the rebase, then LGTM

@chohk88 chohk88 force-pushed the index_put_multishape_slice branch from caf5e58 to 0ab02c3 Compare April 18, 2025 08:28
Copy link

pytorch-bot bot commented Apr 22, 2025

No ciflow labels are configured for this repo.
For information on how to enable CIFlow bot see this wiki

@zewenli98 zewenli98 removed the request for review from gs-olive April 22, 2025 03:25
@chohk88 chohk88 merged commit 325c83e into main Apr 22, 2025
164 of 182 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/binaries/all Build for all Python Versions cla signed component: api [Python] Issues re: Python API component: conversion Issues re: Conversion stage component: converters Issues re: Specific op converters component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths component: tests Issues re: Tests needs-release-cherrypick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 [Bug] Unsupported ops : torch.ops.aten.index_put.default - validator: False
3 participants