TornadoVM icon indicating copy to clipboard operation
TornadoVM copied to clipboard

Compilation failure of tornado-drivers-ptx

Open PolyRocketMatt opened this issue 1 year ago • 8 comments

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

    1. Follow instructions 1 through 5 from here (I did look at the known issues and started with a fresh MSYS2 installation).
    1. When compiling using the mingw64 terminal with the following command: source etc/sources.env make graal-jdk-17-plus BACKEND=ptx A compilation error arises (see this gist for the stack trace/log output)

Expected behavior

Successfull build of TornadoVM (step 6 in the instructions)

Computing system setup (please complete the following information):

  • OS: [Windows 10]
  • PTX: cuda_11.7.r11.7/compiler.31294372_0
  • Nvidia Driver: 31.0.15.3114
  • TornadoVM Commit ID: 9158641
  • JDK: 17
  • Maven: 3.9.4

Additional context

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


PolyRocketMatt avatar Oct 01 '23 11:10 PolyRocketMatt

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

stratika avatar Oct 01 '23 13:10 stratika

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

PolyRocketMatt avatar Oct 01 '23 13:10 PolyRocketMatt

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.

stratika avatar Oct 01 '23 15:10 stratika

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

jjfumero avatar Oct 01 '23 17:10 jjfumero

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 avatar Oct 02 '23 06:10 jjfumero

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

jjfumero avatar Oct 04 '23 07:10 jjfumero

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).

PolyRocketMatt avatar Oct 05 '23 11:10 PolyRocketMatt

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)

jjfumero avatar Nov 29 '23 06:11 jjfumero