AnyDSL / thorin

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

Add dynamic shared memory allocation #144

Open michael-kenzel opened 11 months ago

michael-kenzel commented 11 months ago

This adds a parameter to allocate a given amount of dynamic shared memory upon kernel launch.

corresponding runtime changes: https://github.com/AnyDSL/runtime/pull/41

Hugobros3 commented 11 months ago

This PR looks fine but keep in mind my remarks concerning computing that shared memory pool size statically using PE instead of a bespoke pass.

Also why merge this into master considering the plugin system isn't merged there currently and probably won't be for a while ?

michael-kenzel commented 11 months ago

Sorry, I should have mentioned that up there, this is independent of the plugin and programming model stuff. It just adds a parameter to allocate a given amount of dynamic shared memory upon launch. There's a corresponding PR that updates the runtime accordingly. We will need this regardless of how we end up computing the size, and this is also useful as just a standalone thing, so we thought it would be best to just get this into main right away to minimize divergence.