-
Notifications
You must be signed in to change notification settings - Fork 323
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
Default make need onnx to be installed #1059
Comments
The CI does install third_party/onnx. You can see in Dockerfile.onnx-mlir and Dockerfile.onnx-mlir-dev:
And the default make does produce all the binaries such as onnx-mlir and onnx-mlir-opt. |
@gongsu832 , thanks, that explain the mystery (was grepping for On the second point, could I ask you to look into separating the default make (gen of onnx-mlir and onnx-mlir-opt + lit tests that work without onnx) for our default users, plus a more complete target for our CIs and developers? That would be great. If that make could also install onnx, that would be the cherry on top... continuing as is with a bit of explanation in the "developer" section is ok too. |
@AlexandreEichenberger A seemingly simple thing like "install onnx" can turn into a nightmare simply because all the dependencies involved and there are unlimited number of host configurations that this can go run. There is simply no way to write some simple target or script and expect it to work in all these configurations. That's why we have the And on the issue of the build system, I really don't quite understand why we keep trying to run tests in the default make target. Even MLIR doesn't do that. I understand the desire to make the system as easy to use as possible. But let's not burden the base build system for that. The base build system is for building onnx-mlir, not for teaching you how to use onnx-mlir. You can do that with scripts and docs. |
I am following the readme to build this project ( FAILED: docs/doc_example/add.so /home/demo/onnx-mlir/build/docs/doc_example/add.so
cd /home/demo/onnx-mlir/build/docs/doc_example && /usr/bin/python3.8 /home/demo/onnx-mlir/build/docs/doc_example/gen_add_onnx.py && /home/demo/onnx-mlir/build/Debug/bin/onnx-mlir add.onnx
Traceback (most recent call last):
File "/home/demo/onnx-mlir/build/docs/doc_example/gen_add_onnx.py", line 1, in <module>
import onnx
ModuleNotFoundError: No module named 'onnx'
Came across this thread while looking for a solution for this error. Not sure how to proceed. Any help is greatly appreciated. |
A simple work around is to go in the build directory and then type |
I would like to see the ALL target for onnx-mlir now execute any tests - and all the test building be configurable via the I agree with @gongsu832 that being able to call |
That make sense.
|
ONNX_BUILD_TESTS: this would be fairly easy to implement since the tests it would apply to are probably just the numerical tests at this point. There may be some others, but it shouldn't be terribly difficult. check-all: this is a little bit more complicated to implement. I took a first pass a while back and the issue I ran into is that there's no single reporting mechanism for the tests, so the results are not merged together (i.e. the lit tests report their failures collectively, the ctests report their failures collectively, etc. but there's not a single summary). It is fairly trivial to add a target that would run all the tests, but the reporting would be suboptimal. |
This issue still seems unresolved and has caused some build difficulties for users. For example, during my own experience building this project, I mistakenly assumed that ONNX would be automatically built, and it took me a considerable amount of time to identify the root cause. Perhaps it would be better to actively notify users during the build process or include a clear note in the docs/BuildOnLinuxOSX.md file, reminding them to run a command like: |
Thanks for this report. Will try to see if we can address the issues mentioned in this PR. |
#3021 implements steps 1 & 2 above, but did not create a Thanks for reactualizing this issue @chaojibendan, and sorry for your difficulties finding the cause of the build error. Hopefully this PR will also help a bit future developers. |
Our default build listed in the README.txt (https://github.com/onnx/onnx-mlir#installation-on-unix) is as follows:
and this attempts to build stuff for running the
check-onnx-backend
, which requires onnx. To the best of my understanding, building onnx requires the procedure listed here (https://github.com/onnx/onnx-mlir#installing-third_party-onnx-for-backend-tests-or-rebuilding-onnx-operations).I don't understand why our CIs don't appear to install onnx from our third_party submodule.
From our discussions today, our default make (listed in the README instructions) should build whatever is needed for an end to end test, namely onnx-mlir. Building also onnx-mlir-opt and running the simple lit tests are probably fine (I am for it)
The text was updated successfully, but these errors were encountered: