meet error: 'torch.type_bound' must be attached to an argument of !torch.tensor/!torch.vtensor type
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 736
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 15
Description
hi
use torch-mlir, the test program as below:
@torch.jit.script
def prim_Loop_whilelike(n: int):
f = 3.2
while f < n:
f = f * f
return f
lg = torch.jit.script(prim_Loop_whilelike)
torch.jit.save(lg, "45.pt")
model = torch.jit.load("45.pt", map_location=torch.device('cpu'))
module = torch_mlir.compile(model, [torch.tensor(20)], output_type="torch", verbose=True)
pls help me to fix it ASAP, thanks
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 provided torch.jit and torch_mlir.compile program with verbose output to confirm the type_bound error. Trace where the reported error is emitted and determine the expected handling for this loop; done means the example compiles without that error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- compilers, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100