-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[MXNET-1229] use OpenBLAS, lapack & OpenCV from conan #13400
Conversation
Signed-off-by: SSE4 <[email protected]>
Signed-off-by: SSE4 <[email protected]>
@mxnet-label-bot add [pr-awaiting-review] |
Hey @SSE4 Thanks for the work here. I'm a big fan of Conan.io. I strongly support using one of the modern C++ package management systems in MXNet. However, for Apache projects we prefer to discuss changes like this in a mailing list so that it reaches all of our core contributors to collect their opinions. Would you be able to send a message to [email protected] summarizing the issue with our current dependency tracking, and how Conan could improve this? Feel free to just c + p most of the text from the description you have here. |
@KellenSunderland sure, I've subscribed to your mail list and moved discussion to the following mail thread |
Great suggestion, thank you for your contribution @SSE4 ! |
unix-gpu error is weird:
any clue why did it fail? |
@anirudh2290 @frankfliu @samskalicky @Vikas89 @leleamol - can you guys check it out and see if you can help? |
@SSE4 it looks like a jenkins problem (according to this: https://issues.jenkins-ci.org/browse/JENKINS-37790) Can you push an empty commit to retrigger the CI? If that doesnt work maybe @marcoabreu has some insight from the CI side. |
@samskalicky done |
@samskalicky so build is green, feel free to review it further |
@SSE4 Just to confirm, this change enables conan builds using the example in the description. And can still be built without conan correct? This just adds another way to build for now right? |
@samskalicky yes, you're absolutely right, change adds conan builds which are optional, and you still can build things exactly as you used to build before. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@anirudh2290 @leleamol Can you review once? |
ping @anirudh2290 @leleamol |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does it affect the license of the built artifact, especially for projects with modules that carry multiple licenses? For example, opencv has a contrib module that carries additional licenses, which doesn't get used by mxnet. Do we rely on whoever publishes the particular package we use to conan, to decide which submodules to include?
hi @szha |
@szha - Can you please take a look back at this PR? Thanks! |
@vandanavk resolved |
If we add Conan support like this won't it require a connection to the conan artifacts repository while building? My main issue with Conan is that it "spreads over" your Cmake files (like it did in this case). It looks like it is an "all or nothing" solution. What would happen if I do want to compile against the dependencies of my operating system? Could I do that? AlternativeAn alternative to provide all dependencies is to use conda (disclaimer: I'm a big conda fan). If we have a conda-environment file declaring all the dependencies, then the steps would be:
This is something I want to work on the next few weeks, so it is on my roadmap. Cool, but I want Conan!I agree that adding Conan support is important, but let's think about it more thoroughly and not let it "spread over" the cmake files. Let's think more deeply in how to add Conan support into Mxnet. |
@edisongustavo |
Great! Thanks for the link. I am in favor of using this "Transparent CMake integration: “cmake_paths” generator". So we could do the dance:
This is very similar to what would be the conda dance:
I have some comments and questions about the conan part: In the blog post it shows the integration using the variables created by each library (eg: Is there something I'm missing here?
Great! I believe that it could be done if we use conan along the route specified in my comment above, correct?
Given that you've sent that blog post it has clarified things for me. My concern was in the case of conan working only in this "intrusive mode" (where you have to modify your CMakeLists.txt) so then requiring the internet connection every time you call cmake. Since we could use the "cmake_paths" generator then this is not a concern anymore. A question for you: How easy is it to mirror a conan repository? Or maybe only mirroring the packages we need. Is that possible? |
and then use something like:
you know, this PR is more like proof-of-concept, and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have an option to turn on and off the dependency management by conan?
@szha yes, why not |
@anirudhacharya @KellenSunderland
what's the next steps? |
@mxnet-label-bot add[pr-awaiting-response] |
@mxnet-label-bot remove[pr-awaiting-review] |
@SSE4 Gentle ping to address requested changes |
@szha I've added option for conan |
@pinaraws changes were addressed |
@mxnet-label-bot add[pr-awaiting-review] |
@mxnet-label-bot remove[pr-awaiting-response] |
@szha Gentle ping for review.... |
@marcoabreu for review |
@SSE4 is this PR good to go for merge? |
@karan6181 yes |
@szha Could you please review this PR again and merge if it's looks correct ? Thanks! |
Description
conan is an open-source package manager for C++ projects. it allows to manage project dependencies in transparent and declarative manner.
currently, apache incubator-mxnet project uses the following different ways to manage its dependencies:
this appears to be very heterogeneous and hard to manage/maintain, as multiple various commands are in use to achieve dependencies installation, as well as multiple places are to look for dependency versions and their updates.
with conan, it may became much more straightforward, as dependencies will be declared in single place (conanfile) and installed via single command (conan install).
as project is very complex, and has lots of dependencies, for the first prototype I've used only very few of dependencies from conan:
OpenCV
,OpenBLAS
andlapack
.others may be easily added then one by one, but they first has to be packaged (not all of them are packaged yet, e.g.
GoogleTest
is available, whileMKL
is not).for instance, I've used the following script to run local conan build on Windows:
similarly, the same can be achieved on Linux or Mac OS X:
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments
/cc @memsharded @lasote @danimtb @jgsogo @uilianries