add opencv build configuration (optional)#39
add opencv build configuration (optional)#39BBuf wants to merge 1 commit intobuddy-compiler:mainfrom
Conversation
|
@BBuf Good idea! These compile commands really helpful for users to access OpenCV in buddy-mlir. |
zhanghb97
left a comment
There was a problem hiding this comment.
As for the details, I think we can give users different choices:
-
Install with a package manager (apt, yum, etc.) or from source (your current version). In this way, users don't need to specify the OpenCV configuration when building buddy-mlir. The advantage is that it is very convenient to configure.
-
Only build from source and don't install. In this way, users need to give the configuration (-DOpenCV_DIR=</PATH/TO/OPENCV/BUILD/>) to their build dir when building buddy-mlir. The advantage is that users can switch between different OpenCV versions at any time without affecting the installed environment.
@BBuf Yes! DIP Dialect itself does not depend on OpenCV. The DIP C/C++ interface depends on OpenCV. As for the encode/decode image file, is there any lightweight methods, or what works can we refer to implement our own support in MemRef container? |
|
maybe this is a good reference. https://github.com/msnh2012/Msnhnet/blob/master/src/cv/MsnhCVMat.cpp#L60 |
Do you think we should create a For dependencies which are needed to be built from source, perhaps we can create a unified bash script so that users can get all of them using a single command. What is your opinion on above ideas? |
I agree with this point.
Maybe we can have a look at how |
meshtag
left a comment
There was a problem hiding this comment.
Do you think we should have support for other OS (for ex. Windows) as well?
Personally I think it would be great to support windows and macos, so that it will be more convenient for some windows/macos users. |
Maybe another docker image with llvm and opencv installed can be provided. |
|
I think it's too expensive to maintain documentation and scripts for various domain-specific frameworks (we should consider different OS and different CPUs, which runs the risk of combo explosion). So I prefer that we give a link to the official build/install documentation of each framework, and provide some supporting descriptions like this PR (without the ubuntu-specific part). And maybe providing a docker file is a good idea. However, there is a concern that we are synchronizing the llvm version every day. If the docker file is provided, the daily testing overhead will increase.
AFAIK, the About this PR @BBuf I have pushed the documentation for writing framework support (see here). Domain-Specific Container Ideally, I think we should provide our own default encoder/decoder and be compatible with data structures of other frameworks. Take the image processing as an example: |
I have updated OpenCV build docs of windows and linux in here. |
When I'm free, I will have a try to implement a encode/decode method that does not depend on opencv in Img Class. |
Nice! Feel free to do this, I will leave this part to you. |
I meant to use |
Does this PR require a review? or can we safely close it? |
Yes, we can close it! |
Buddy-compiler is a very interesting project, I had complie and ran edge_detection example successfuly today.
But when I compile, I found there's no compile commands for OpenCV,so this pr add OpenCV compile commands in README.md.