beehive-lab / TornadoVM

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

Compilation failure of tornado-drivers-ptx #274

Open PolyRocketMatt opened 10 months ago

PolyRocketMatt commented 10 months ago

Describe the bug

When executing steps to install TornadoVM on Windows from here, I get a compilation error from one of the TornadoVM modules.

How To Reproduce

Expected behavior

Successfull build of TornadoVM (step 6 in the instructions)

Computing system setup (please complete the following information):

Additional context

The full log output of the build can be found here.


stratika commented 10 months ago

hi @PolyRocketMatt, can you please also provide the JDK version that you downloaded for your JAVA_HOME?

PolyRocketMatt commented 10 months ago

Updated the original post with that information, as well as the version of Maven I am using.

stratika commented 10 months ago

The JDK17 binary breaks in Windows. My guess is that the link pointing to the JDK17 is not compatible with the latest Graal 23.1.0 compiler update that we performed recently. We will validate it, and report any updates here. In the mean time, the JDK21 binary seems to be working.

jjfumero commented 10 months ago

There is no Graal 23.1.0 for JDK 17, only for JDK 21. We will update the docs.

jjfumero commented 10 months ago

I just double-checked on Windows 11 and MSys64. It works for JDK 21 and GraalVM.

Just for reference, here's my source file:

#!/bin/bash
export JAVA_HOME="C:\Users\jjfum\Documents\bin\jvms\graalvm-jdk-21_windows-x64_bin\graalvm-jdk-21+35.1"

## NEXT TWO LINES NECESSARY TO BUILD PTX (NVIDIA CUDA) BACKEND
## COMMENT THEM OUT OR JUST IGNORE IF YOU ARE NOT INTERESTED IN PTX BUILD
## OTHERWISE UPDATE 'CUDA_PATH' WITH ACTUAL VALUE (REMEMBER OF UNIX_STYLE SLASHES AND SPACES!!!)
export CUDA_PATH="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.1"
export PTX_LDFLAGS=-L\"$CUDA_PATH/lib/x64\"

# LEAVE THE REST OF FILE 'AS IS'
# DON'T ALTER!
export PATH=$PWD/bin/bin:$PATH               ## This directory will be automatically generated during Tornado compilation
export TORNADO_SDK=$PWD/bin/sdk              ## This directory will be automatically generated during Tornado compilation
CMAKE_FILE=$(where cmake | head -n 1)
export CMAKE_ROOT=${CMAKE_FILE%\\*\\*}

Then:

source sources.sh
make graal-jdk-17-plus BACKEND=ptx

You can also build with the OpenCL backend.

jjfumero commented 10 months ago

@PolyRocketMatt , did you get the chance to test it again? Did this solve the issue?

PolyRocketMatt commented 10 months ago

I did. Building now seems to work, but even with a fresh install and all it seems like the tornado command is not recognized (even though building everything seemed to be succesful).

jjfumero commented 8 months ago

Hi @PolyRocketMatt . sorry I missed the last message. Did it finally work? If it builds, then the issue could be the PATH to the TornadoVM bin folder ($TORNADO_ROOT/bin/sdk/bin)