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

Add MATLAB support with the CMake build on windows #4886

Closed
willyd opened this issue Oct 24, 2016 · 6 comments
Closed

Add MATLAB support with the CMake build on windows #4886

willyd opened this issue Oct 24, 2016 · 6 comments

Comments

@willyd
Copy link
Contributor

willyd commented Oct 24, 2016

Current CMakeLists.txt disables the MATLAB support. Need to change:

caffe_option(BUILD_matlab "Build Matlab wrapper" OFF IF UNIX OR APPLE OR WIN32)

FindMatlabMex.cmake fails to find mex.bat on Windows. CMake added the matlab_add_mex in the FindMatlab.cmake maybe we can use this Find module instead on windows?

@willyd willyd mentioned this issue Oct 24, 2016
@lunzueta
Copy link

Hi @willyd. I already have experience in compiling matcaffe in previous Caffe versions for Windows. I'm currently trying to solve this issue with CMake in my local repo. What I'm trying to do is a custom finder and linker of the required Matlab files (I don't think that using FindMatlab.cmake is a good idea in this case, which I've also tried). Hopefully, during this week I'll be able to give you an update on this (I mean, a PR).

@willyd
Copy link
Contributor Author

willyd commented Oct 24, 2016

@lunzueta In one of my previous PRs I actually had MATLAB working using the FindMatlab.cmake module you can check it out there: https://github.com/willyd/caffe/tree/msvc

I believe all the MATLAB related changes were done in this commit: https://github.com/willyd/caffe/tree/cbbd3a7d00d04bc7a536a969d9e1c3730f4c3fe6.

The most relevant files I believe were:

Hopefully, during this week I'll be able to give you an update on this (I mean, a PR).

I will wait for your feedback then.

@lunzueta
Copy link

OK @willyd, I didn't try that one, so I'll compare and test both approaches and if in the end what I'm trying to do has something that can benefit the community, I'll send the PR, otherwise, it wouldn't make too much sense to do so :-P

@lunzueta
Copy link

@willyd, your approach is clearer and simpler than what I was trying to do, so I'd definitively go for it. I've already submitted a PR (#4928) where I handpicked some lines from some cmake files of your msvc branch. I also updated the README.md file. I was able to run classification_demo.m correctly in Matlab 2014b with the generated .mexw64 file.

@willyd
Copy link
Contributor Author

willyd commented Oct 31, 2016

@lunzueta Thanks a lot! I believe that there are are some tests in the MATLAB package are you able to run them?

I will review the PR and get back to you.

@lunzueta
Copy link

@willyd Yes, I'm able to run successfully the run_tests.m script included in the MATLAB package.

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

2 participants