You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I converted ONNX to MLIR using onnx-mlir --EmitMLIR.
I added main function to pass input to graph and print statement to print the output of graph.
Then I lowered LLVM Dialect using onnx-mlir-opt --convert-krnl-to-llvm and.onnx.mlir>n1.mlir.
Lowered to LLVM IR using mlir-translate --mlir-to-llvmir n1.mlir>n2.ll
the I ran the .ll file using clang n2.ll "pathto"/libmlir_runner_utils.so -o main -lm
/usr/bin/ld: /tmp/n2-dacb78.o: in function main_graph': undefined reference to getEmbeddedConstPool'
/usr/bin/ld: /tmp/n2-dacb78.o: in function _dyn_entry_point_main_graph': undefined reference to getRtMemRef'
undefined reference to getData' undefined reference to getSizes'
undefined reference to getStrides' undefined reference to createOrderedRtMemRefDict'
undefined reference to createRtMemRef' undefined reference to setData'
undefined reference to setDType' undefined reference to getSizes'
undefined reference to getStrides' undefined reference to setRtMemRef'
I am getting error like above.
How can I solve this?
Thank you
The text was updated successfully, but these errors were encountered:
You are not linking with the library where those functions are defined i.e. RtMemRefUtils
It would be much easier if you compile your code using onnx-mlir all the way to LLVM, compile the LLVM as a shared object and then just call the model function from inside a C/C++ main function.
Thank You. If I link RtMemRefUtils Iam still getting error as:
undefined reference to getEmbeddedConstPool'
To resolve this I tried creating a shared object of onnx-mlir/src/Runtime/GetEmbeddedConstPool.cpp and linking while compiling but I am getting error like:
onnx-mlir/src/Runtime/liblibrary.so: undefined reference to _binary_param_bin_start' onnx-mlir/src/Runtime/liblibrary.so: undefined reference to _binary_param_bin_end'
I converted ONNX to MLIR using onnx-mlir --EmitMLIR.
I added main function to pass input to graph and print statement to print the output of graph.
Then I lowered LLVM Dialect using onnx-mlir-opt --convert-krnl-to-llvm and.onnx.mlir>n1.mlir.
Lowered to LLVM IR using mlir-translate --mlir-to-llvmir n1.mlir>n2.ll
the I ran the .ll file using clang n2.ll "pathto"/libmlir_runner_utils.so -o main -lm
/usr/bin/ld: /tmp/n2-dacb78.o: in function
main_graph': undefined reference to
getEmbeddedConstPool'/usr/bin/ld: /tmp/n2-dacb78.o: in function
_dyn_entry_point_main_graph': undefined reference to
getRtMemRef'undefined reference to
getData' undefined reference to
getSizes'undefined reference to
getStrides' undefined reference to
createOrderedRtMemRefDict'undefined reference to
createRtMemRef' undefined reference to
setData'undefined reference to
setDType' undefined reference to
getSizes'undefined reference to
getStrides' undefined reference to
setRtMemRef'I am getting error like above.
How can I solve this?
Thank you
The text was updated successfully, but these errors were encountered: