Revision 97573c6e6f803a234be18e37648c3399537808fd authored by Volodymyr Kysenko on 27 October 2023, 21:21:26 UTC, committed by GitHub on 27 October 2023, 21:21:26 UTC
* Minimal hoist_storage plumbing

* HoistedStorage placeholder IR node

* Basic hoist_storage test

* Fully plumb through the HoistedStorage node

* IRPrinter for HoistedStorage

* Insert hoisted storage at the correct loop level

* Progress

* Formatted

* Move out common code for creating Allocate node

* Format

* Emit Allocate at the HoistedStorage site

* Collect all dependant vars

* Basic test working

* Progress

* Substitute lets into allocation extents instead of lifting stuff

* Infer bounds for the extends dependant on loop variables

* Update tests

* Remove old code

* Remove old code

* Better tests

* More tests

* Validate schedules with hoist_storage

* Error test

* Fix stupid mistake

* More tests

* Remove debug prints

* Better errors

* Add missing handler for inlined functions

* Format

* Comments

* Format

* Add some missing visit handlers

* New line

* Fix comment

* Luckily we only have two build systems

* Adds hoist_storage_root

* Comment for IR node

* Serialization support for HoistedStorage

* Handle hoist_storage fo tuples

* Handle multiple realize nodes

* Move assert up

* Better error message

* Better loop bounds

* Format

* Updated error message

* Happy clang-tidy happy me

* An error message when compute is inlined, but store is not inlined

* Only mutate lets which are needed

* Update apps to use hoist_storage

Some very minor performance gains, but mostly in the noise.

Also switched the apps makefiles to emit stmt html by default instead of
stmt, to take advantage of the new and improved stmt html.

* Switch to stack of hoisted storages

* Limit scope of lets for expansion

* Break early

* Skip substitute_in_all_lets

* Re-use expanded min/extents

* WebAssembly JIT does not support custom allocators

* Change debug level to get more info about segfault

* More debugging prints

* Let's try aligned malloc

* Revert "Change debug level to get more info about segfault"

This reverts commit a5a689be8c6ad351674f3ced3bbf542335f91d75.

* Revert "More debugging prints"

This reverts commit bb6b8c1313cbdb9f355df20fd203ee02d485042e.

---------

Co-authored-by: Andrew Adams <andrew.b.adams@gmail.com>
1 parent ed357c2
Raw File
halide_image.h
#ifndef HALIDE_TOOLS_IMAGE_H
#define HALIDE_TOOLS_IMAGE_H

/** \file
 *
 * This allows code that relied on halide_image.h and
 * Halide::Tools::Image to continue to work with newer versions of
 * Halide where HalideBuffer.h and Halide::Buffer are the way to work
 * with data.
 *
 * Besides mapping Halide::Tools::Image to Halide::Buffer, it defines
 * USING_HALIDE_BUFFER to allow code to conditionally compile for one
 * or the other.
 *
 * It is intended as a stop-gap measure until the code can be updated.
 */

#include "HalideBuffer.h"

namespace Halide {
namespace Tools {

#define USING_HALIDE_BUFFER

template<typename T>
using Image = Buffer<T>;

}  // namespace Tools
}  // namespace Halide

#endif  // #ifndef HALIDE_TOOLS_IMAGE_H
back to top