Coder Social home page Coder Social logo

Windows Installation Issue about ftorch HOT 31 OPEN

vbalmer avatar vbalmer commented on August 20, 2024
Windows Installation Issue

from ftorch.

Comments (31)

jatkinson1000 avatar jatkinson1000 commented on August 20, 2024 1

Hi @vbalmer

Thanks for bringing this to our attention and trying those simple suggestions.

I have now spun up a Windows VM and successfully replicated the problem you are having (and also found an opportunity to improve some of our documentation in #123) which is the first step.

I'll work on finding a solution and get back to you once we have more news.
If you make any progress in the meantime please do let us know!

from ftorch.

jatkinson1000 avatar jatkinson1000 commented on August 20, 2024

Adding notes:

It seems to be that there is an issue locating mkl correctly (math kernel library used for mathematical operations).

This source suggests that it could be because calling the setvars.bat sets a number of environment variables, including CMAKE_PREFIX_PATH required for linking, but we are perhaps the overwriting this when we set -DCMAKE_PREFIX_PATH in the cmake command.

To check this I have tried running CMake with -DTorch_DIR=<path> instead of -DCMAKE_PREFIX_PATH=<path>, but still get the same error.

I tried setting the MKL_ROOT environment variable, but no luck as @vbalmer suggested above:

set MKL_ROOT="C:/Program Files (x86)/Intel/oneAPI/mkl/latest"

I also tried setting it to C:/Program Files (x86)/Intel/oneAPI/mkl which is the actual location on my machine. Still no luck.
Interestingly, however CMake does output a warning saying it is ignoring this variable for compatibility with policy CMP0074:

CMake Warning (dev) at C:/Users/Test/Downloads/libtorch-win-shared-with-deps-2.3.0+cpu/libtorch/share/cmake/Caffe2/public/mkl.cmake:1 (find_package):
  Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables.
  Run "cmake --help-policy CMP0074" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  Environment variable MKL_ROOT is set to:

    "C:/Program Files (x86)/Intel/oneAPI/mkl"

  For compatibility, CMake is ignoring the variable.

It seems that despite setting CMake is ignoring the location to link from, so next steps might be to try hadr-coding to see if we can force a link for success at all.

I am running cmake with the --trace flag for more output, but this is a bit too much.
Running cmake build with verbose is helpful, however:

cmake --build . --verbose

@jwallwork23 these may be useful as a starting point if you get chance to look.

from ftorch.

jatkinson1000 avatar jatkinson1000 commented on August 20, 2024

Related issues andf PRs on the PyTorch repo:

Some suggest that it is an issue with the FindMKL file supplied with pytorch/cmake/
Modules/FindMKL.cmake

Tried with the nightly build of libtorch to see if there has been a recent fix, but still the same issue.

Tried setting -DCMAKE_FIND_PACKAGE_PREFER_CONFIG variable to try and force CMake to use the native FindMKL.cmake file rather than the one provided by PyTorch but the issue persists.

It may be that we consider opening an issue on the PyTorch repository as this seems to perhaps be an issue with libtorch.

from ftorch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.