https://github.com/halide/Halide
Revision f75f68d6f9331c8f92e93b91ab8efaf21dca3334 authored by Xuanda Yang on 11 August 2023, 21:45:38 UTC, committed by GitHub on 11 August 2023, 21:45:38 UTC
* init

* sync

* single func pipeline round-trip test

* roundtrip test framework completed, single output function tested, no Dag yet

* serialize Stmt, partially done (cuz no support of Expr yet), not fully
tested

* deviceAPI MemoryType ForType

* Expr, with a grain of salt

* fix exprs in stmts

* format everything

* Range

* fix undefined exprs and stmts

* address some review comments:
- proper using
- proper includes
- rename Serdes -> Serialize

* address more review comments
- rename .hlb/.hlr to .hlpipe
- reserve vectors
- proper memory management

* deserialize_expr_vector

* support bound, storageDim, loopLevel and funcSchedule

* Specialization, Definition

* sync commit

* temporarily comment out func mapping stuff to remove blockers

* helper funcs

* call_type and reduction_domain

* ModulusRemainder and VectorReduceOp, some minor refactoring

* prefetch directive

* name mangling and closing on function's odds and ends

* split

* dim

* stage schedule

* tidy

* parameter

* more parameter

* check nullptr and some minor fix

* fix crashing

* func index replacing func ptr during serialization

* extern func arg, some minor cleanup

* replace cerr with halide assert

* buffer??

* remove printer

* fix

* wrappers in func_schedule

* clear func mapping to use serializer for more than 1 pipelines, use unordered_map also

* attempt to move serialization into core, get cmake working for now

* fix

* we maybe don't need submodule

* fix cmake

* make headers work again, with some hacks ofc

* serialization now lives in libHalide

* testing 101

* don't include flatbuffers header in Halide.h

* fix

* namespace adjust

* user_assert

* fix a missing field

* fix missing type info in some exprs

* fix bug in function mapping

* fix function DAG broken issue

* format

* rm cout in cpp files and change test group name

* fix the case func ptr is not defined

* add a missing call type deserialization

* serialize unique parameters

* serialize unique buffers

* fix missing type in parameter

* fix a missing tail stra

* change find_transive_call to build_enviroment to include wrappers in the DAG

* upstream current test strategy, intercept JIT compilation for each pipeline, serdes ronudtrip and back

* make sure buffer memory layout are the same

* don't use ir comparator to compare pipelines, we will use jit tests from now

* don't serialize Parameter's buffer, compute external buffers from Call, Variable and ExternFuncArgument and don't serialize them as well

* fix, 35 tests remaining

* fix output function orders

* reuse jit_externs since we cannot really serialize it, 29 tests to go

* fix that buffer_constraints, host_alignment and memory_type are incorrectly removed, also add missing exact in split

* only use outputs and requirements from deserialized pipeline during testing

* nits

* add missing requirements during deserialization

* restore original pipeline's contents after lowering

* address some review comments

* Install flatbuffers for clang-tidy

* use std::map to make results the same on different compiler

* proper way to handle cropped buffers

* fix cmake build using alex's branch

* try set flatbuffers_DIR explicitly

* case sensitive?

* rename serialization test env var

* cleanup Serialization.cpp

* format

* have halide version embedded in the file identifier

* nits and comments

* format

* try make clang-tidy happy and const a lot of things

* const more things

* support istream input

* nit

* add template function deserialize_vector

* nit

* attempt to integrate serialization test

* line breaks

* remove hack in compile_jit, at least for now

* fix

* add #ifdef guards

* format

* try nolint

* special case two files so clang-tidy will be happy

* Make Flatbuffers-missing error more useful

* Make a few final changes

- change BUILD_SERIALIZATION -> WITH_SERIALIZATION to match other flags better
- fix capitalization of the CMake package (must be `FlatBuffers` for some Linux usage)
- add stub calls to the de/serialization calls when building without Flatbuffers

* Oops addition

* clang-format

* Add temporary debug hackery

* more hackery

* grr

* sdfsdf

* sigh, capitalization

* One more try

* Update presubmit.yml

* No more mr nice guy

* Update CMakeLists.txt

* Revise build rules & script to allow clang-tidy for the new files

* Update CMakeLists.txt

* Apply clang-tidy fixes

* Fix target for generated header

* Prefer to use FetchContent for flatbuffers

* Fixes

* set PIC on

* more pic

* fix attempt

* fix attempt

* try macos

* coreutils

* Update run-clang-tidy.sh

* noquiet

* final again?

---------

Co-authored-by: Steven Johnson <srj@google.com>
1 parent 93514c3
History
Tip revision: f75f68d6f9331c8f92e93b91ab8efaf21dca3334 authored by Xuanda Yang on 11 August 2023, 21:45:38 UTC
Experimental serializer (#7594)
Tip revision: f75f68d
File Mode Size
.github
apps
cmake
dependencies
doc
packaging
python_bindings
src
test
tools
tutorial
util
.clang-format -rw-r--r-- 1.4 KB
.clang-format-ignore -rw-r--r-- 375 bytes
.clang-tidy -rw-r--r-- 6.9 KB
.gitattributes -rw-r--r-- 342 bytes
.gitignore -rw-r--r-- 4.9 KB
.gitmodules -rw-r--r-- 0 bytes
CMakeLists.txt -rw-r--r-- 6.6 KB
CMakePresets.json -rw-r--r-- 6.8 KB
CODE_OF_CONDUCT.md -rw-r--r-- 3.5 KB
LICENSE.txt -rw-r--r-- 14.4 KB
MANIFEST.in -rw-r--r-- 159 bytes
Makefile -rw-r--r-- 105.4 KB
README.md -rw-r--r-- 16.5 KB
README_cmake.md -rw-r--r-- 77.9 KB
README_fuzz_testing.md -rw-r--r-- 3.9 KB
README_python.md -rw-r--r-- 31.8 KB
README_rungen.md -rw-r--r-- 12.1 KB
README_vulkan.md -rw-r--r-- 11.4 KB
README_webassembly.md -rw-r--r-- 10.5 KB
README_webgpu.md -rw-r--r-- 4.4 KB
pyproject.toml -rw-r--r-- 196 bytes
requirements.txt -rw-r--r-- 130 bytes
run-clang-format.sh -rwxr-xr-x 1.4 KB
run-clang-tidy.sh -rwxr-xr-x 3.8 KB
setup.py -rw-r--r-- 1.2 KB

README.md

back to top