This PR adds an option in the TornadoOptions to select which runtime we want as default to dispatch SPIR-V code.
By default. TornadoVM currently selects the OpenCL, but the user now can override this by using the following option:
Use -Dtornado.spirv.dispatcher=opencl to select OpenCL as default.
Use -Dtornado.spirv.dispatcher=levelzero to select LevelZero as default.
This is useful to pass, for example, all tests with another Runtime Dispatcher for SPIR-V.
$ make tests-spirv-levelzero
$ make tests-spirv-opencl
Problem description
n/ a.
Backend/s tested
Mark the backends affected by this PR.
[ ] OpenCL
[ ] PTX
[X] SPIRV
OS tested
Mark the OS where this PR is tested.
[X] Linux
[ ] OSx
[ ] Windows
Did you check on FPGAs?
If it is applicable, check your changes on FPGAs.
[ ] Yes
[X] No
How to test the new patch?
make BACKEND=spirv
tornado --jvm="-Dtornado.spirv.dispatcher=opencl" uk.ac.manchester.tornado.drivers.TornadoDeviceQuery --params="verbose"
tornado --jvm="-Dtornado.spirv.dispatcher=levelzero" uk.ac.manchester.tornado.drivers.TornadoDeviceQuery --params="verbose"
## If set a random value
tornado --jvm="-Dtornado.spirv.dispatcher=foo" uk.ac.manchester.tornado.drivers.TornadoDeviceQuery --params="verbose"
#We get an error
Description
This PR adds an option in the
TornadoOptions
to select which runtime we want as default to dispatch SPIR-V code. By default. TornadoVM currently selects the OpenCL, but the user now can override this by using the following option:-Dtornado.spirv.dispatcher=opencl
to select OpenCL as default.-Dtornado.spirv.dispatcher=levelzero
to select LevelZero as default.This is useful to pass, for example, all tests with another Runtime Dispatcher for SPIR-V.
Problem description
n/ a.
Backend/s tested
Mark the backends affected by this PR.
OS tested
Mark the OS where this PR is tested.
Did you check on FPGAs?
If it is applicable, check your changes on FPGAs.
How to test the new patch?