Christos Perivolaropoulos b23f8f414b [pallas/pallas_mgpu] Discharging run_scoped should not be discharging the intermediates
When we do run_scoped[jaxpr, R1,R2], it can't be assumed that references
corresponding to R1 and R2 can be safely discharged. Sometimes they can (eg
Accumulator) but sometimes they can't (eg SMEM scratch). It should be up to the
lowering rule to do such discharging.

This further means that during lowering there is no guarantee that the
references will not be used/returned by nested scoped blocks so we also remove
that check.

PiperOrigin-RevId: 722137352
2025-02-01 09:37:03 -08:00
..
2023-08-01 16:43:13 -07:00