Closed mairooni closed 1 week ago
[Review in progress] Test are passing for OpenCL and PTX.
Throw exception when this type of code is executed for the SPIR-V backend. This can be done within the a compilation phase.
The comments have been addressed. @jjfumero please have another look.
Great. Thanks Mary!
The refactoring has been applied, thanks @mikepapadim!
Great, so we merge this.
Description
This PR adds support for conditional copy-by-reference in local memory.
Problem description
If a plain copy-by-reference occurs in local memory, graal updates the references automatically. For example, the code below is legal and functionally correct:
However, if the copy takes place depending on a condition, e.g.:
Tornado produces a compiler error. This PR adds the necessary functionality to make this conditional copy-by-reference legal. This patch is for OpenCL and PTX, SPIR-V needs further investigation.
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?
Run
tornado-test -V --fast uk.ac.manchester.tornado.unittests.arrays.TestArrayCopies