-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
[libtorch] Add new port #8318
[libtorch] Add new port #8318
Conversation
In general we don't delete ports. If caffe users should really really really be using this port we should turn caffe into a stub port which prints a deprecation message and redirects the user to this port by having a dependency on this one. |
@cbezault Oh, I never thought about the point. Will recover the port soon. |
* Download PyTorch 1.2.0 through official url * SHA512 checksum for each platforms * Replaced packaged protobuf to that of VcPkg * use cu100 when feature 'cuda' is requested
Just fixed the removal of |
@luncliff I also propose to leave caffe as an empty port redirecting to this one. Otherwise we would have to check for the reciprocal installation since the two might be incompatible |
@cenit Sorry, I can't get the word, 'empty'. |
something similar to what happened to ilmbase when it got merged to openexr. Now ilmbase is empty and depends on openexr, so when you install it you are "redirected". |
@cbezault @cenit Understood. Doing so is indeed easy. When I open the PR I thought they have to be replaced. If I have to make the |
Since caffe2 just became libtorch from the c++ point of view (and also the python one...), I can't see the point in keeping both. Am I missing something? also don't be afraid about broken api/abi compatibility. There is no port that needs fixing, and vcpkg itself is very aggressive in updating libraries... so this would be just the perfect way to update an "old" caffe2 port! |
for the "history" of caffe2 we also have the |
* port 'caffe2' depends 'libtorch' * port 'caffe2' became empty
@cenit Oh, wow. Learned a new feature! |
Also, i’d create an “empty” |
I asked about the difference between Related Issues: |
Ok, fair enough |
what are the errors on the windows platform? I tried to see also CI:14505 build but it looks empty. Might be that the force-push removed the references to the previous trials, but CI remembered them and declared port already failed. Can you please retrigger the build, just bumping the version inside CONTROL file for example, if you don't know what was wrong? |
error
|
With the message I recognized that the cpuinfo is merged.
I will adjust the part in this weekend, **as soon as possible**.
My windows laptop is broken (not working) now so I have to borrow one.
… On 5 Oct 2019, at 1:48 AM, Voskrese ***@***.***> wrote:
install pre-built ?
error
Installing package libtorch[core,cuda]:x64-windows...
The following files are already installed in E:/tools/vcpkg/installed/x64-windows and are in conflict with libtorch:x64-windows
Installed by cpuinfo:x64-windows
debug/lib/clog.lib
debug/lib/cpuinfo.lib
include/clog.h
include/cpuinfo.h
lib/clog.lib
lib/cpuinfo.lib
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#8318?email_source=notifications&email_token=ADLSYE2XPXXMUJ5MWXF6J3DQM5XW5A5CNFSM4IZ4IRCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAMHZFA#issuecomment-538475668>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ADLSYE5F73FWQLSM76ZMKKTQM5XW5ANCNFSM4IZ4IRCA>.
|
* usage: add cpuinfo targets * portfile checks target architecture and linkage option by this update, 'x86-windows' and '*-windows-static' must fail.
* the prebuilt package can't be used for the platform :(
Just updated the files. Now it seems like x64-windows is working well. |
Just read the portfile and the initial message better now:
I am a little bit uncomfortable with it. Is it really necessary? Whenever possible, vcpkg builds library from sources... |
Sorry for late comment, @cenit. I couldn't focus on the issue thesedays. However, me and my teammates wanted to ship the package (libtorch 1.2.0) and some other build results in the vcpkg. For the purpose my decision was to place those prebuilt into the installed dir. If such portfile can't be adopted, I think this PR should be closed. |
I can understand your position. Which is reasonable. I am not sure the mods might agree with it or not. The only pre-built ports that you can find on vcpkg are ones that are not providing the source code, and so the built artifacts are the only things available... let’s see here their stance |
Do we have any decision on this PR? It would be amazing to have libtorch working in vcpkg. |
we are waiting for the feedback. :)
…On Thu, Oct 17, 2019, 1:42 AM Jason Juang ***@***.***> wrote:
Do we have any decision on this PR? It would be amazing to have libtorch
working in vcpkg.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8318?email_source=notifications&email_token=ADLSYE574FMCDMVP36FFN3DQO476PA5CNFSM4IZ4IRCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBNFBTA#issuecomment-542789836>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADLSYE2RNFQFLOCJXKXDB7LQO476PANCNFSM4IZ4IRCA>
.
|
@luncliff if you can expand on why you think shipping a pre-built binary is a superior choice in this case I would be interested in hearing it. |
@cbezault I don't think using a prebuilt is a kind of superior choice. Pros
Cons
Considering the issue, definitely, the best choice is to build PyTorch from the source. But I think the way requires too much for using the port. |
It is unfortunate that building will take so long. It seems like the right thing for us to do is to provide a tarball of MKL like Conda does. (We could literally take from conda...). Once binary caching gets released to the public the build time problem should mostly go away. You could also try to use the beta binary caching feature in your CI. |
I can try but it's out of my cost... I will close this for now
so another person can try in the future.
…On Fri, Oct 18, 2019, 2:20 AM Curtis J Bezault ***@***.***> wrote:
It is unfortunate that building will take so long. It seems like the right
thing for us to do is to provide a tarball of MKL like Conda does. (We
could literally take from conda...)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8318?email_source=notifications&email_token=ADLSYE3YDRMG5GV6Z2H54SDQPCNHJA5CNFSM4IZ4IRCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBQ332A#issuecomment-543276520>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADLSYE3IJ4US3NX4AOLCD7LQPCNHJANCNFSM4IZ4IRCA>
.
|
That is great, I was not aware there was a plan to use those binaries outside your CI system. I thought about using those binary by lurking the CI system logs, but then I desisted as I thought it was only for internal use. Do you have some entry point on how to do that? Thanks in advance. |
It's been a minute since I've had to turn it on but I think there's a --binary-caching flag and there's definitely some sort of environment variable you can set. Note there's still some details that are not added to the hash of the packages. Notably the type of compiler used is not hashed, ports which just just check for system dependencies such as cuda are not hashed correctly, and ports which have dependencies on ports in other triplets like proj4[database] are not hashed correctly. |
Note you will also need to point vcpkg/archives to somewhere all your ci machines can reach (like a network drive) |
This PR adds a new port for PyTorch.
Instead of performing local build, the new port extracts prebuilt binaries.
Changes
libtorch 1.2.0
(C++ part for PyTorch)Related Issues
Triplets
Unavailables
*-windows-static
*-uwp
Installation
CPU Only
For windows, there are only 1 available triplet.
For Linux and OSX, simply install with …
GPU (with CUDA)
Notice that CUDA support is only available for Windows/Linux
Usage
Targets of the
protobuf
andcpuinfo
sould be specified.