llvm / llvm/torch-mlir

Remove optional tensor logic from linalg lowering for `IndexPutHackedTwinOp`

Open
#3,489 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
1.9k
Forks
736
Avg merge
5d 22h
Merged PRs (30d)
15

Description

The op `IndexPutHackedTwinOp` takes a [list of index tensors](https://github.com/llvm/torch-mlir/blob/acd57a352033f3c8315847e6d60b1fbb4188c44c/include/torch-mlir/Dialect/Torch/IR/GeneratedTorchOps.td#L5843) as an argument, not a list of optional tensors. This means that all the logic in the lowering checking if indices are `None` can be removed.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the linalg lowering implementation for `IndexPutHackedTwinOp`, then compare its handling of indices with the op definition in `include/torch-mlir/Dialect/Torch/IR/GeneratedTorchOps.td`. Done means the lowering no longer checks index tensors for `None`, while preserving the expected lowering behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.