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

[faiss] Add new port #13825

Merged
merged 12 commits into from
Oct 30, 2020
Merged

[faiss] Add new port #13825

merged 12 commits into from
Oct 30, 2020

Conversation

ahojnnes
Copy link
Contributor

This PR adds FAISS as a new port. This resolves issue #1405.

@JackBoosY JackBoosY added the category:new-port The issue is requesting a new library to be added; consider making a PR! label Oct 9, 2020
ports/faiss/portfile.cmake Outdated Show resolved Hide resolved
ports/faiss/portfile.cmake Outdated Show resolved Hide resolved
ports/faiss/vcpkg.json Outdated Show resolved Hide resolved
ports/faiss/portfile.cmake Show resolved Hide resolved
@NancyLi1013 NancyLi1013 changed the title Add new portfiles for FAISS library [faiss] Add new port Oct 9, 2020
ahojnnes and others added 4 commits October 10, 2020 09:42
Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
@ahojnnes
Copy link
Contributor Author

Thanks @NancyLi1013. I applied your suggested changes.

@NancyLi1013
Copy link
Contributor

Could not locate cached archive: W:\0e\0e7428e6609fee29b8a0de5708cac8bece9a6ff9.zip
-- Downloading https://github.com/facebookresearch/faiss/archive/a17a631dc326b3b394f4e9fb63d0a7af475534dc.tar.gz...
CMake Error at scripts/cmake/vcpkg_download_distfile.cmake:102 (message):
  

  File does not have expected hash:

          File path: [ D:/downloads/temp/facebookresearch-faiss-a17a631dc326b3b394f4e9fb63d0a7af475534dc.tar.gz ]
      Expected hash: [ 78b85aa14d183e7e65bf79e70c2c13195728055957ca6c7618081097446aa9b8418d032ca6fc34d18461b8e9f080df88fe4eb62723f7044a794862c3e9efff56 ]
        Actual hash: [ f1ab5b3c4bb89d26c0bc425b59deb42c614d58c8c0d14447dc91db6428e9efe7e7e469d7e2ad3d00e1f068ae8ed997e6a9555e6b8427ab785f63637c2cd947a9 ]

  The file may have been corrupted in transit.  This can be caused by
  proxies.  If you use a proxy, please set the HTTPS_PROXY and HTTP_PROXY
  environment variables to
  "https://user:***@your-proxy-ip-address:port/".

You should also update the hash value.

@ahojnnes
Copy link
Contributor Author

ahojnnes commented Oct 13, 2020

@NancyLi1013 It happened what I suspected to happen. The older version 1.6.3 doesn't compile, because they did not have CMake build files back then. I suggest to revert back to the proposed commit from above. Since then also many bug fixes have gone into the code, so we should really try to be on the latest version in the master branch.

@NancyLi1013
Copy link
Contributor

Hi @ahojnnes
The version 1.6.3 doesn't support CMake, which is not related with the problem. The current issue is that the archive file failed to download.

I checked the upstream. There is another new release, we might update it to 1.7.4.

@ahojnnes
Copy link
Contributor Author

@NancyLi1013 I updated to v1.6.4. It should work now.

@NancyLi1013
Copy link
Contributor

Thanks for your quick update.
Have you tested the feature? Does it work fine?

@ahojnnes
Copy link
Contributor Author

ahojnnes commented Oct 19, 2020

@NancyLi1013 I have tested the package for a while already. It works fine. One remaining open question is how to best manage the dependency against lapack and openblas, which both typically compile with special instruction sets. The current package configuration of faiss here compiles against lapack/openblas statically, which means that the produced package is not redistributable to another machine. Not sure what the best way is to manage this problem in vcpkg. Typically, you would always want to use an optimized lapack/blas implementation for your specific machine. Any suggestions?

@NancyLi1013
Copy link
Contributor

Hi @ahojnnes
Is there any problem that the dependency includes lapack and openblas?

I noticed that other ports such as armadilloalso have the same dependency as faiss.

@ahojnnes
Copy link
Contributor Author

@NancyLi1013 It seems like it is all fine. I also checked other libraries depending on lapack and openblas. I think we can get this PR merged as is. I tested this quite extensively on Windows & Linux over the last weeks.

@NancyLi1013 NancyLi1013 added info:reviewed Pull Request changes follow basic guidelines and removed requires:author-response labels Oct 29, 2020
@NancyLi1013
Copy link
Contributor

LGTM now, thanks for your PR @ahojnnes.

@BillyONeal
Copy link
Member

Thanks for your contribution!

@BillyONeal BillyONeal merged commit 5d4fb44 into microsoft:master Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:new-port The issue is requesting a new library to be added; consider making a PR! info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants