the.bay.news

Should `torch.clip` decompose to `torch.clamp`

PyTorch Forums
Should `torch.clip` decompose to `torch.clamp`
The documentation for torch.clip mentions that it is an alias of torch.clamp but there is no decomposition defined for torch.clip in torch/_decomp/ In the exported IR, thus a torch.clip gets exported as torch.ops.aten.clip.default(...) I’m wondering if a decomposition should be added so backends only have to support clamp. Currently, we’re seeing failures when importing a Module with torch.clip in it via Torch-MLIR. Lowering it to StableHLO fails as there isn’t suppport for clip

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.