Skip to content

Commit

Permalink
Attempt to get the serialization stuff going.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcourteaux committed Oct 6, 2023
1 parent aeb3d37 commit 0ed58d6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Deserialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -505,9 +505,10 @@ Stmt Deserializer::deserialize_stmt(Serialize::Stmt type_code, const void *stmt)
const auto min = deserialize_expr(for_stmt->min_type(), for_stmt->min());
const auto extent = deserialize_expr(for_stmt->extent_type(), for_stmt->extent());
const ForType for_type = deserialize_for_type(for_stmt->for_type());
const auto allow_partitioning = for_stmt->allow_partitioning();
const DeviceAPI device_api = deserialize_device_api(for_stmt->device_api());
const auto body = deserialize_stmt(for_stmt->body_type(), for_stmt->body());
return For::make(name, min, extent, for_type, device_api, body);
return For::make(name, min, extent, for_type, device_api, body, allow_partitioning);
}
case Serialize::Stmt_Store: {
const auto *store_stmt = (const Serialize::Store *)stmt;
Expand Down
1 change: 1 addition & 0 deletions src/Serialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ std::pair<Serialize::Stmt, Offset<void>> Serializer::serialize_stmt(FlatBufferBu
Serialize::CreateFor(builder, name_serialized,
min_serialized.first, min_serialized.second,
extent_serialized.first, extent_serialized.second,
for_stmt->allow_partitioning,
for_type, device_api,
body_serialized.first, body_serialized.second)
.Union());
Expand Down
1 change: 1 addition & 0 deletions src/halide_ir.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ table For {
min: Expr;
extent: Expr;
for_type: ForType;
allow_partitioning: bool;
device_api: DeviceAPI;
body: Stmt;
}
Expand Down

0 comments on commit 0ed58d6

Please sign in to comment.