AnyDSL / thorin

The Higher-Order Intermediate Representation
https://anydsl.github.io
GNU Lesser General Public License v3.0
151 stars 15 forks source link

`reserve_shared` does not work as intended in JIT #132

Closed PearCoding closed 1 year ago

PearCoding commented 1 year ago

Compiling a program with JIT and using reserve_shared inside a device code triggers the following error:

E:runtime:1313 col 32 - 51: reserve_shared: only allowed in device code

The same code compiled in the command line (anydsl_runtime_wrap) works as intended. The zip file reserve_shared_jit.zip contains a simple project with two targets nonjit and jit.

nonjit compiles without any problems. Note, running it might return garbage, as the target intention is only to be compiled. jit compiles, as no artic code is touched yet, but running it triggers the above mentioned error.

The error was replicated on a Ubuntu 2022.4 system with the most recent AnyDSL version (as of 19.09.2022).