StanfordLegion / legion

The Legion Parallel Programming System
https://legion.stanford.edu
Apache License 2.0
682 stars 145 forks source link

Regent: support custom serializers for fields, task arguments #720

Open elliottslaughter opened 4 years ago

elliottslaughter commented 4 years ago

Regent should support custom serializers. These would be used with Legion's serdez interface to serialize fields of regions, and also internally inside the compiler to serialize task arguments of those types. This requires deciding what the user-facing serializer interface should be.

elliottslaughter commented 2 years ago

There is some initial support for this in 9b002e8186684b8cd9d14d8c6870f3821e0addea. It only supports task arguments and returns. (By the way, returns had been broken before; they didn't serialize the return value at all. This is fixed now.) There is a basic interface that allows you to define your own custom serializers in Regent. I need a bit more work to get this working with nested serialization, and to auto-generate the serialization code for "plain" types that contain elements that need serialization.

elliottslaughter commented 2 years ago

Serialization for (nested) arrays is in too now. I am punting on structs because it feels like those could just be handled by the custom serialization interface. Still need to define the custom serialization interface for nested types.

elliottslaughter commented 2 years ago

Nested custom serialization is now in with the examples/dynamic_array.rg code.