func @main(%cf2:f32,%cf3:f32) {
%A = alloc() : memref<1x2xf32>
affine.store %cf2, %A[0,0] : memref<1x2xf32>
affine.store %cf3, %A[0,1] : memref<1x2xf32>
%U1 = memref_cast %A: memref<1x2xf32> to memref<*xf32>
call @print_memref_f32(%U1): (memref<*xf32>) → ()
return
}
func @print_memref_f32(memref<*xf32>)
I converted this mlir to LLVM using :
1.mlir-opt --lower-affine --convert-scf-to-std -convert-std-to-llvm
2.mlir-translate -mlir-to-llvmir
then I compile the code using clang ex.ll path-to/libmlir_runner_utils.so -o main
/
When I run using LD_LIBRARY_PATH="path to llibmlir_runner_utils.so " ./main 0.0 1.0
I am getting output as [[0, 3.34724e+21]]
But I am expecting value as [[0.0,1.0]]
Is there any library which I have to link for taking input from command prompt?
Thank You