Open mortendahl opened 2 years ago
An alternative might be to expand on with_context!
(if needed, @voronaam?) so that the above could also be written as with_context!(plc, sess, x.shape())
.
The two might also work in conjunction so that we could have with_context!(plc, x.shape())
, ie without mentioning sess
.
This is a discussion issue to collect thoughts.
Question is whether values should hold an explicit reference to the session in which they belong?
This would allow us to redirect for instance
x.shape()
tox.plc.shape(&x.session, &x)
(since they already hold their placement).For symbolic values this has already been considered to allow
SymbolicHandle
to check eg type signatures against the operations in the computation, which it currently cannot do since it only holds the name of the operation (it cannot even verify that the operation really exists in the computation).For future eager values this might also be nice.