@@ -24,7 +24,9 @@ class FieldImpl : public aot::Field {
24
24
class AotModuleImpl : public aot ::Module {
25
25
public:
26
26
explicit AotModuleImpl (const AotModuleParams ¶ms, 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) {
28
30
const std::string bin_path =
29
31
fmt::format (" {}/metadata.tcb" , params.module_path );
30
32
if (!read_from_binary_file (ti_aot_data_, bin_path)) {
@@ -146,7 +148,8 @@ class AotModuleImpl : public aot::Module {
146
148
}
147
149
148
150
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 ()) {
150
153
ti_aot_data_.spirv_codes .resize (index + 1 );
151
154
auto &codes = ti_aot_data_.spirv_codes [index ];
152
155
const auto &k = ti_aot_data_.kernels [index ];
@@ -163,7 +166,7 @@ class AotModuleImpl : public aot::Module {
163
166
}
164
167
165
168
static std::vector<uint32_t > read_spv_file (const std::string &output_dir,
166
- const TaskAttributes &k) {
169
+ const TaskAttributes &k) {
167
170
const std::string spv_path = fmt::format (" {}/{}.spv" , output_dir, k.name );
168
171
std::vector<uint32_t > source_code;
169
172
std::ifstream fs (spv_path, std::ios_base::binary | std::ios::ate);
0 commit comments