Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert-std-to-llvm crashes on input with constant tensors #47119

Closed
joker-eph opened this issue Oct 9, 2020 · 2 comments
Closed

convert-std-to-llvm crashes on input with constant tensors #47119

joker-eph opened this issue Oct 9, 2020 · 2 comments
Assignees
Labels
bugzilla mlir:llvm worksforme

Comments

@joker-eph
Copy link
Collaborator

joker-eph commented Oct 9, 2020

Bugzilla Link 47775
Resolution WORKSFORME
Resolved on Oct 12, 2020 01:45
Version unspecified
OS All
CC @River707,@ftynse

Extended Description

https://llvm.discourse.group/t/mlir-how-to-define-tensor-constants-with-std-constant/1932

//crash at mlir-opt --convert-std-to-llvm std.constant.mlir

func @​tensor_constant_0d_f32() -> tensor {
%cst = std.constant dense<0.0> : tensor
return %cst : tensor
}

//crash at mlir-opt --convert-std-to-llvm std.constant.mlir

func @​tensor_constant_1d_f32() -> tensor<4xf32> {
%cst = std.constant dense<[1.0, 2.0, 3.0, 4.0]> : tensor<4xf32>
return %cst : tensor<4xf32>
}

// crash at mlir-opt --convert-std-to-llvm std.constant.mlir

func @​tensor_constant_2d_f32() -> tensor<3x4xf32> {
%0 = std.constant dense<[[0.0, 0.0, 0.0, 0.0], [1.0, 1.0, 1.0, 1.0], [2.0, 2.0, 2.0, 2.0]]>
: tensor<3x4xf32>
return %0 : tensor<3x4xf32>
}

@joker-eph
Copy link
Collaborator Author

joker-eph commented Oct 9, 2020

assigned to @ftynse

@ftynse
Copy link
Member

ftynse commented Oct 12, 2020

As of 60cf845, these inputs do not crash.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
@Quuxplusone Quuxplusone added the worksforme label Jan 20, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla mlir:llvm worksforme
Projects
None yet
Development

No branches or pull requests

3 participants