beehive-lab/TornadoVM

[bug] Problem with closing bracket in a generated OpenCL kernel

Opened this issue · 3 comments

Describe the bug

I noticed that one of the unit-tests that belongs to the white-list group, has a problem with a closing bracket only for the OpenCL backend. The PTX and SPIRV backends are working.

How To Reproduce

I have built TornadoVM as follows:

git checkout develop
./bin/tornadovm-installer --jdk jdk-21 --backend opencl && source setvars.sh
tornado --version

returns

version=1.0.7-dev
branch=develop
commit=4a2a072

Backends installed: 
	 - opencl

I ran the test06() test from the TestIf.java class, and got the output as follows:

tornado --jvm "-Xmx6g -Dtornado.recover.bailout=False -Dtornado.unittests.verbose=True " -m tornado.unittests/uk.ac.manchester.tornado.unittests.tools.TornadoTestRunner --params "uk.ac.manchester.tornado.unittests.foundation.TestIf#test06"
WARNING: Using incubator modules: jdk.incubator.vector
2 errors generated.
[TornadoVM-OCL-JNI] ERROR : clBuildProgram -> Returned: -11

[ERROR] TornadoVM JIT Compiler - OpenCL Build Error Log:

<kernel>:52:1: error: expected identifier or '('
return;
^
<kernel>:53:1: error: extraneous closing brace ('}')
}  //  kernel
^


Test: class uk.ac.manchester.tornado.unittests.foundation.TestIf#test06
	Running test: test06                     ................  [FAILED] 
		\_[REASON] Bailout is disabled. 

Expected behavior

The expected behavior is to generate the OpenCL kernel which will be able to be built.

Computing system setup (please complete the following information):

  • OS: Ubuntu 23.10
  • OpenCL version: OpenCL 1.2
  • Driver: n/a
  • TornadoVM commit id: 4a2a072 from branch develop

Hi @stratika, May I ask if there is automatic CI control for failed tests?

I am asking because I had the same issue a week ago and reported it: #511 (reply in thread) .

I am curious why it went unnoticed.

hi @andrii0lomakin, we have a server running Jenkins on a daily basis for all regression tests (unit-tests, benchmarks, TornadoVM-Ray-Tracer) on the develop branch and for all backends. The develop branch is the one where we merge all PRs, and then we usually merge it in the master every Friday (or more often).

Regarding the tests reported in #511, it would be greatly appreciated if you can follow the bug form, and provide info about which tests are failing, how you are running the tests, and on which system (OS, GPU vendor, GPU driver, backend) you run them. This will help our team to have a look faster and reproduce the problem.

Some times, we have observed issues in some systems that are related to the drivers.

@stratika, thank you for a detailed explanation.
Will report the bug as needed next time for sure.