Skip to content

Commit

Permalink
Fix bug in export.cpp when grid/block size was derived from tunable…
Browse files Browse the repository at this point in the history
… parameters
  • Loading branch information
stijnh committed Apr 24, 2023
1 parent afc33a0 commit b85b321
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,21 @@ struct KernelBuilderSerializerHack {

result["name"] = builder.kernel_name_;
result["compile_flags"] = expr_list_to_json(builder.compile_flags_);
result["block_size"] = expr_list_to_json(builder.block_size_);
result["grid_size"] = expr_list_to_json(builder.grid_size_);
result["shared_memory"] = expr_to_json(builder.shared_mem_);
result["template_args"] = expr_list_to_json(builder.template_args_);
result["defines"] = std::move(defines);
result["headers"] = std::move(headers);

result["block_size"] = expr_list_to_json(std::array<Expr, 3> {
builder.determine_block_size(0),
builder.determine_block_size(1),
builder.determine_block_size(2)});

result["grid_size"] = expr_list_to_json(std::array<Expr, 3> {
builder.determine_block_size(0),
builder.determine_block_size(1),
builder.determine_block_size(2)});

return result;
}
};
Expand Down

0 comments on commit b85b321

Please sign in to comment.