Skip to content

Commit d6776e8

Browse files
pre-commit-ci[bot]taichi-gardener
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 08de819 commit d6776e8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

taichi/runtime/gfx/aot_module_loader_impl.cpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ class FieldImpl : public aot::Field {
2424
class AotModuleImpl : public aot::Module {
2525
public:
2626
explicit AotModuleImpl(const AotModuleParams &params, Arch device_api_backend)
27-
: module_path_(params.module_path), runtime_(params.runtime), device_api_backend_(device_api_backend) {
27+
: module_path_(params.module_path),
28+
runtime_(params.runtime),
29+
device_api_backend_(device_api_backend) {
2830
const std::string bin_path =
2931
fmt::format("{}/metadata.tcb", params.module_path);
3032
if (!read_from_binary_file(ti_aot_data_, bin_path)) {
@@ -146,7 +148,8 @@ class AotModuleImpl : public aot::Module {
146148
}
147149

148150
bool try_load_spv_code(std::size_t index) {
149-
if (index >= ti_aot_data_.spirv_codes.size() || ti_aot_data_.spirv_codes[index].empty()) {
151+
if (index >= ti_aot_data_.spirv_codes.size() ||
152+
ti_aot_data_.spirv_codes[index].empty()) {
150153
ti_aot_data_.spirv_codes.resize(index + 1);
151154
auto &codes = ti_aot_data_.spirv_codes[index];
152155
const auto &k = ti_aot_data_.kernels[index];
@@ -163,7 +166,7 @@ class AotModuleImpl : public aot::Module {
163166
}
164167

165168
static std::vector<uint32_t> read_spv_file(const std::string &output_dir,
166-
const TaskAttributes &k) {
169+
const TaskAttributes &k) {
167170
const std::string spv_path = fmt::format("{}/{}.spv", output_dir, k.name);
168171
std::vector<uint32_t> source_code;
169172
std::ifstream fs(spv_path, std::ios_base::binary | std::ios::ate);

0 commit comments

Comments
 (0)