Thanks for reply!



 Mehdi_AMINI:

The actual mechanism depends on how is this “split_strategy” represented? Is this an enum or a more complex datastrutture?


It should be a complex data structure containing something like 1D array representing shapes, 2D array representing devices, etc. Thus it is a struct.



 Mehdi_AMINI:

If you rather model this on the types themselves, then you’d just re-create a new type every time you want to modify the “split_strategy” and set it on the actual “edge” in the graph (a Value in MLIR terminology).


In that case, it seems that carrying information on Types is expensive, since I need to recreate every time it changes.  So I have to attach a pointer-like attribute, and mutate that underlying information, is this correct?
You saved my day! Thank you very much for your help!