Skip to content

Can generators run in-place? #6324

Answered by peteraarts811
popizdeh asked this question in Q&A
Discussion options

You must be logged in to vote

Currently we actually do this.
However, you need to take this situation into account when creating your schedule.
Currently our solution is somewhat like the following:

  1. intermediate_buffers = some_function1(input_buffers)
  2. output_buffers = some_function2(intermediate_buffers )

In our schedule we do a compute_root on intermediate_buffers,
after which it is safe to write the output_buffers (which will actually overwrite the input_buffers).

You do need to take into account though that the auto-scheduler will probably not help you (as far as I know..).

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@popizdeh
Comment options

@steven-johnson
Comment options

@popizdeh
Comment options

Answer selected by steven-johnson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants