iree
iree copied to clipboard
torch.aten.multinomial: failed to legalize operation 'torch.constant.bool'
What happened?
Here's the full reproducer:
> cat module.torch
module {
func.func @main(%arg0: !torch.vtensor<[1,256000],f32>) -> !torch.vtensor<[1,1],si64>
{
%int1 = torch.constant.int 1
%true = torch.constant.bool true
%none = torch.constant.none
%2519 = torch.aten.multinomial %arg0, %int1, %true, %none : !torch.vtensor<[1,256000],f32>, !torch.int, !torch.bool, !torch.none -> !torch.vtensor<[1,1],si64>
return %2519 : !torch.vtensor<[1,1],si64>
}
}
> iree-compile --iree-input-type=torch --iree-hal-target-backends=llvm-cpu module.torch
<unknown>:0: error: failed to legalize operation 'torch.constant.bool'
<unknown>:0: note: see current operation: %0 = "torch.constant.bool"() <{value = true}> : () -> !torch.bool
This comes from running Google's Gemma model through SHARK-Turbine.
I would appreciate the pointers where to look to understand the problem better.
Steps to reproduce your issue
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
What component(s) does this issue relate to?
MLIR
Version information
No response
Additional context
No response