Skip to content

Commit

Permalink
Added API to print loop structure
Browse files Browse the repository at this point in the history
  • Loading branch information
iitaku committed Jul 26, 2024
1 parent 9c57b7f commit 459bfb0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/ion/builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ class Builder {
*/
const std::map<std::string, Halide::JITExtern>& jit_externs() const;


/** Write out the loop nests specified by the schedule for this
* Builder's pipeline. Helpful for understanding what a schedule is
* doing. */
void print_loop_nest();

/**
* Register disposer hook which will be called from Builder destructor.
* This is available only for JIT mode.
Expand Down
6 changes: 6 additions & 0 deletions src/builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,12 @@ const std::map<std::string, Halide::JITExtern>& Builder::jit_externs() const {
return impl_->jit_externs;
}

void Builder::print_loop_nest() {
if (impl_->pipeline.defined()) {
impl_->pipeline.print_loop_nest();
}
}

void Builder::register_disposer(Impl *impl, const std::string& bb_id, const std::string& disposer_symbol) {
log::info("Builder::register_disposer");
for (const auto& kv : impl->bb_modules) {
Expand Down

0 comments on commit 459bfb0

Please sign in to comment.