Replies: 6 comments 17 replies
-
Hi, yeah we have had quite a few people ask for windows support so its definitely on our radar and its matter of when and not if we would add windows support fully. We have been super excited to see the community take the lead on this and as resources become available we will definitely commit to making windows support official. Re CMake: We are happy to accept PRs adding alternative build systems. For sure if you work in the CMake ecosystem, its much easier to have everything be CMake. Same for other alternatives as well. Our position though is that these would be primarily community maintained. When we notice issues we will be willing to add patches as needed but we are not going to actively test these alternative build systems and bazel will remain the source of truth. |
Beta Was this translation helpful? Give feedback.
-
It's awesome that you successfully compiled the binaries - were you able to successfully use namespaces like torchscript on Windows, and import and use optimized torchscript models? I am trying to do the same thing but having difficulty getting the .lib file, and I'm not even sure if at that point all the functions will be available, as it seems like my .dll file doesn't even contain any namespaces like torchscript. If you did successfully compile them in a way that was fully functional, would you mind sharing the files and the libtorch version you are using so I can at least have a working prototype of my program with them? Thanks for your contribution to this! |
Beta Was this translation helpful? Give feedback.
-
Yes, I was able to successfully call Indeed, getting the lib file is not automatic. As said in the first message, I am relying an CMake to build the lib and in that case, CMake is generating these lib files that are missing with Bazel. I am planning to contribute with the CMake machinery to this repo in the near future. Once that's done, you'll be able to get your lib files easily. |
Beta Was this translation helpful? Give feedback.
-
That's really cool that you were able to get it fully working. I have been trying for days to get a working .lib from bazel and been unsuccessful so far. Would you be willing to share your project (imperfect as it may be) that successfully created a working .lib, maybe in a fork? I am frustrated spinning my wheels trying to get it compiling in bazel, and I would also love to contribute to it to help other people not have to go through this trouble to get Windows to compile. |
Beta Was this translation helpful? Give feedback.
-
Following this work, I opened the PR #1058 |
Beta Was this translation helpful? Give feedback.
-
Thanks @gcuendet for your contribution! #1058 is merged and will be part of v1.2! |
Beta Was this translation helpful? Give feedback.
-
Hello! Great work on that library, thanks a lot. 👍
In order to be able to really use it in production though, we would need a better windows support. I invested quite some effort into compiling the lib (mostly following this excellent step-by-step guide but also packaging the windows library correctly (exporting the symbols from the API into the .lib and not just generating a .dll).
Doing that I found the handling of dependencies with Bazel pretty fragile and, being much more efficient with CMake, decided to add CMake support (taking inspiration from the slightly outdated work by JosephChenHub referenced here). From my opinion, that allows to consume dependencies in a much easier way using cmake finders as well as consume this library in another project easily.
I am starting this discussion to see if the maintainers of this library (@narendasan and possibly others?) would be interested in this work. I am willing to invest more efforts into this, if there is an interest in moving toward a full / official windows support.
What's your view on this?
Thanks again for the great work and looking forward for what is to come next!
Gabriel
Beta Was this translation helpful? Give feedback.
All reactions