Closed chhzh123 closed 3 years ago
What happens if you also specify s.to(out, target.xcel)
?
@Hecmay, do we handle the case where the tensor is declared inside (i.e., not via the arguments, like out
in this case)?
What happens if you also specify
s.to(out, target.xcel)
?
The error message is the same, but it marks the stage twice.
[01:49:01] Mark stage S on FPGA scope...
[01:49:01] Mark stage S on FPGA scope...
[01:49:01] Mark stage C on FPGA scope...
@seanlatias Yes, we can. In that case, we should be able to attach the tensor automatically to the imperative stage, I suppose. I added a pass to fix this issue -- we still use the dataflow analysis and restored DFG to partition the graph. If there is any problem with the graph partitioning (like in this case, the restored DFG does not correctly capture the stage hierarchy), we just offload the whole graph to FPGA.
This is fixed already. Test cases: https://github.com/cornell-zhang/heterocl/blob/heteroflow/tests/test_schedule_stream.py#L86
It's able to stream single imperative stage. However, code mixes with imperative and declarative stages cannot be streamed as usual, as shown below.
Seems some nodes in the stage graph are not annotated correctly.