We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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 }
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> }
The text was updated successfully, but these errors were encountered:
assigned to @ftynse
Sorry, something went wrong.
As of 60cf845, these inputs do not crash.
ftynse
No branches or pull requests
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>
}
The text was updated successfully, but these errors were encountered: