beehive-lab / TornadoVM

TornadoVM: A practical and efficient heterogeneous programming framework for managed languages
https://www.tornadovm.org
Apache License 2.0
1.18k stars 113 forks source link

Instalation issues: Following docs for Windows 10 you will have crashes, but you're able to compile it manually following Linux steps #235

Closed bitstuffing closed 1 year ago

bitstuffing commented 1 year ago

Hi there, I'm trying to install this great project and test it on Windows 10, but I'm following the official docs and doesn't work.

One issue that is easy to solve is the following line:

https://github.com/beehive-lab/TornadoVM/blob/3016dbff03c50bccd98a80ab774ddf5a2c1ca215/docs/source/installation.rst#L90

Refering to this official doc manual

which could easily be replaced by: ./scripts/tornadovm-installer --jdk graalvm-jdk-17 --backend opencl,ptx,spirv

But there is more, when I'm using MINGW64 (because I'm following the manual, I have also w64devkit and has the same behavior:

./scripts/tornadovm-installer --jdk graalvm-jdk-17 --backend opencl
mingw64_nt-10.0-19045
Traceback (most recent call last):
  File "/c/Users/user/workspace/TornadoVM/./scripts/tornadovm-installer", line 347, in <module>
    installer.install(args)
  File "/c/Users/user/workspace/TornadoVM/./scripts/tornadovm-installer", line 284, in install
    self.downloadCMake()
  File "/c/Users/user/workspace/TornadoVM/./scripts/tornadovm-installer", line 99, in downloadCMake
    fileName = self.processFileName(url)
                                    ^^^
UnboundLocalError: cannot access local variable 'url' where it is not associated with a value

In the early steps of instalation.

I have seen that line, and there is no control over Windows (mingw64), and if this project use Windows it should be there.

But, if I use the logic and try to compile it with:

make BACKENDS=opencl

at least, compilation works (just for opencl)

imagen

jjfumero commented 1 year ago

Thanks @bitstuffing for trying TornadoVM. The Windows port is experimental and it only works using the MSys2 terminal and the OpenCL/PTX backends. The usual install command:

./scripts/tornadovm-installer --jdk graal-jdk-17  --backend opencl,ptx,spirv 

only applies for Linux and OSx.

The docs for the Windows installation are here: https://tornadovm.readthedocs.io/en/latest/installation.html#tornadovm-for-windows-10-11-using-graalvm

An alternative for Windows is to use WSL 2. In my case, I have both OpenCL and SPIR-V for the Intel HD graphics and ARC GPUs. More details here: https://jjfumero.github.io/posts/2022/06/tornadov-intelgpus-windows11-wsl

bitstuffing commented 1 year ago

Thanks for the report, finally I've upgraded to Windows11 and I've used WSL, like you've suggested, to install it over "ubuntu". Tests works fine, including the python script error that I've commented before.

Anyway, the readme related to install instructions is not good, because graal-jdk-17 is not a valid argument and should be changed by:

./scripts/tornadovm-installer --jdk graalvm-jdk-17  --backend opencl,ptx,spirv

Thanks for your support

jjfumero commented 1 year ago

Great. thank you for testing. I will close this issue.