Segfault in prompt_encoder
Closed this issue · 3 comments
yizhuoz004 commented
christopherbate commented
I believe the primary bug fix was merged today, but there is a lingering issue with tensor.cast
, same as the fp8 bug; will push fix tomorrow
shelkesagar29 commented
This issue arises due to a bug in upstream stablehlo pass.
It converts the following IR
%3 = stablehlo.subtract %c_19, %c_37 : (tensor<1x1xi32>, tensor<1x1xi32>) -> tensor<?x?xi32>
%4 = plan.with_shape %3(%c1_i32, %c1_i32) : (tensor<?x?xi32>, i32, i32) -> tensor<?x?xi32>
to
%57 = "stablehlo.constant"() <{value = dense<-1> : tensor<1x1xi32>}> : () -> tensor<1x1xi32>
%58 = "plan.with_shape"(%57, %20, %20) : (tensor<1x1xi32>, i32, i32) -> tensor<?x?xi32>
However, if op is replaced with constant and consumer is non stablehlo op, tensor.cast
should be used which is missing.
shelkesagar29 commented
PR #401
provides Stablehlo patch that resolves this issue.
I tested IR on SHLO -> Executable
pipeline and it runs successfully.