import-onnx support on onnx.Clip but --convert-torch-onnx-to-torch failed
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 736
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 15
Description
c1.mlir:112:12: error: failed to legalize operation 'torch.operator' that was explicitly marked illegal
%109 = torch.operator "onnx.Clip"(%106, %107, %108) : (!torch.vtensor<[1,32,112,112],f32>, !torch.vtensor<[],f32>, !torch.vtensor<[],f32>) -> !torch.vtensor<[1,32,112,112],f32>
^
c1.mlir:112:12: note: see current operation: %123 = "torch.operator"(%120, %121, %122) <{name = "onnx.Clip"}> : (!torch.vtensor<[1,32,112,112],f32>, !torch.vtensor<[],f32>, !torch.vtensor<[],f32>) -> !torch.vtensor<[1,32,112,112],f32>
import-onnx support on onnx.Clip but --convert-torch-onnx-to-torch failed
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported failure with --convert-torch-onnx-to-torch and inspect the generated c1.mlir operation at line 112, where onnx.Clip remains as torch.operator. Trace how import-onnx handles onnx.Clip and determine what is needed for the conversion to legalize it; done means the reported model conversion completes without this error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, pytorch
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100