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

How to compile dynamic library for backend riscv #2802

Open
xysxs opened this issue Apr 16, 2024 · 0 comments
Open

How to compile dynamic library for backend riscv #2802

xysxs opened this issue Apr 16, 2024 · 0 comments

Comments

@xysxs
Copy link

xysxs commented Apr 16, 2024

I want to deploy the mnist-lenet network to the riscv backend, I executed the following command
onnx-mlir -O3 --EmitLib --mtriple=riscv64-unknown-linux-gnu mnist_lenet.onnx
but it reported an error
/usr/bin/ld: mnist.o: Relocations in generic ELF (EM: 243) /usr/bin/ld: mnist.o: Relocations in generic ELF (EM: 243) /usr/bin/ld: mnist.o: Relocations in generic ELF (EM: 243) /usr/bin/ld: mnist.o: error adding symbols: file in wrong format collect2: error: ld returned 1 exit status c++ mnist.o -o mnist.so -shared -fPIC -L/home/xy/Desktop/onnx-mlir/build/Debug/lib -lcruntime Error message: Program path: /usr/bin/c++ Command execution failed.
I think this is because the static library architecture is x86 in /build/Debug/lib

If only producing .obj files like this:
onnx-mlir -O3 --EmitObj --mtriple=riscv64-unknown-linux-gnu mnist_lenet.onnx
Then when generating the executable file later, do I still need to link the static library? Will an error be reported?
what should I do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant