beehive-lab / TornadoVM

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

Generated Kernel is NULL #15

Closed gkatev closed 4 years ago

gkatev commented 4 years ago

Hello, In a fresh git clone, I'm getting the following error when I run "make tests":

Test: class uk.ac.manchester.tornado.unittests.TestHello
    Running test: testHello                  ................  [FAILED] 
        \_[REASON] Task was not executed.
    Running test: testVectorAddition         ................  [FAILED] 
        \_[REASON] [ERROR] Generated Kernel is NULL. 
Please report this issue to https://github.com/beehive-lab/TornadoVM
    Running test: testSimpleCompute          ................  [FAILED] 
        \_[REASON] [ERROR] Generated Kernel is NULL. 
Please report this issue to https://github.com/beehive-lab/TornadoVM
    Running test: testSimpleCompute2         ................  [FAILED] 
        \_[REASON] [ERROR] Generated Kernel is NULL. 
Please report this issue to https://github.com/beehive-lab/TornadoVM
    Running test: testSimpleInOut            ................  [FAILED] 
        \_[REASON] [ERROR] Generated Kernel is NULL. 
Please report this issue to https://github.com/beehive-lab/TornadoVM
Test ran: 5, Failed: 5

And also more similar output for the rest of the unittests. Also, on a simple test program of mine, adapted from the testHello unittest:

uk.ac.manchester.tornado.api.exceptions.TornadoRuntimeException: [ERROR] Generated Kernel is NULL. 
Please report this issue to https://github.com/beehive-lab/TornadoVM
    at tornado.drivers.opencl@0.6/uk.ac.manchester.tornado.drivers.opencl.graal.OCLInstalledCode.checkKernelNotNull(OCLInstalledCode.java:353)
    at tornado.drivers.opencl@0.6/uk.ac.manchester.tornado.drivers.opencl.graal.OCLInstalledCode.submitWithoutEvents(OCLInstalledCode.java:359)
    at tornado.drivers.opencl@0.6/uk.ac.manchester.tornado.drivers.opencl.graal.OCLInstalledCode.launchWithoutDeps(OCLInstalledCode.java:389)
    at tornado.runtime@0.6/uk.ac.manchester.tornado.runtime.TornadoVM.execute(TornadoVM.java:498)
    at tornado.runtime@0.6/uk.ac.manchester.tornado.runtime.TornadoVM.execute(TornadoVM.java:194)
    at tornado.runtime@0.6/uk.ac.manchester.tornado.runtime.tasks.TornadoTaskSchedule.scheduleInner(TornadoTaskSchedule.java:421)
    at tornado.runtime@0.6/uk.ac.manchester.tornado.runtime.tasks.TornadoTaskSchedule.schedule(TornadoTaskSchedule.java:642)
    at tornado.api@0.6/uk.ac.manchester.tornado.api.TaskSchedule.execute(TaskSchedule.java:230)
    at TestHello.testHello(TestHello.java:69)
    at TestHello.main(TestHello.java:33)
Exception in thread "main" java.lang.AssertionError: Task was not executed.
    at junit@4.12/org.junit.Assert.fail(Assert.java:88)
    at junit@4.12/org.junit.Assert.assertTrue(Assert.java:41)
    at TestHello.testHello(TestHello.java:73)
    at TestHello.main(TestHello.java:33)

'tornado --devices' shows:

Number of Tornado drivers: 1
Total number of devices  : 1
Tornado device=0:0
    Clover -- AMD Radeon RX 5700 XT (NAVI10, DRM 3.36.0, 5.6.13-arch1-1, LLVM 10.0.0)
        Global Memory Size: 8.0 GB
        Local Memory Size: 32.0 KB
        Workgroup Dimensions: 3
        Max WorkGroup Configuration: [256, 256, 256]
        Device OpenCL C version: OpenCL C 1.1
jjfumero commented 4 years ago

Hi, can you run the following command?

$ tornado-test.py -V --debug -J"-Dtornado.fullDebug=True" uk.ac.manchester.tornado.unittests.TestHello#testVectorAddition

Additionally, we have tested on AMD using the ROCM drivers. We support from OpenCL 1.2 (I am not sure if that's the issue). Is it possible to update the drivers for your AMD?

gkatev commented 4 years ago

Okay, so I got a useful error:

INFO: fatal error: cannot open file '/usr/lib/clc/gfx1010-amdgcn-mesa-mesa3d.bc': No such file or directory

A similar error also appears in clinfo, and from some searching it's possible that Navi 10 is not yet supported by mesa-opencl (?). I'm currently educating myself on different frameworks related to OpenCL on AMD and seeing what is possible at the current time with this specific GPU.

jjfumero commented 4 years ago

Yes, it looks like an installation/configuration problem with OpenCL.

gkatev commented 4 years ago

Yes exactly. I'll see if I can fix it for my Navi 10 or use another GPU... Thanks for the support