Skip to content

Commit

Permalink
Update instructions to include generated schedules (#7928)
Browse files Browse the repository at this point in the history
The generated schedule from the auto-scheduler can no longer be
copy-n-pasted to the Generater source code. Update the tutorial to
show how the generated schedules can be appled and included into
Generator. Use case: version control and fine tuning of schedules.

Resolves: #7148
See also: #7900

Co-authored-by: Steven Johnson <[email protected]>
  • Loading branch information
antonysigma and steven-johnson authored Nov 29, 2023
1 parent bf5f206 commit ad5dd20
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tutorial/lesson_21_auto_scheduler_generate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,15 @@ class AutoScheduled : public Halide::Generator<AutoScheduled> {
gray.compute_root();
Iy.compute_root();
Ix.compute_root();

// As discussed earlier, the generated schedule that is dumped to
// file is an actual Halide C++ source, which is readily copy-pasteable
// back into this very same source file with few modifications.
// Or, developers can save the generated schedules to the source directory,
// and then include the generated schedule here.
//
// #include "tutorial.schedule.h"
// apply_schedule_auto_schedule_true(get_pipeline(), get_target());
}
}

Expand Down

0 comments on commit ad5dd20

Please sign in to comment.