Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
weberlo committed Nov 10, 2019
1 parent 6edc23a commit b1008f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/runtime/micro/device/arm/stm32f746xx/utvm_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ uint32_t stop_time = 0;
int32_t UTVMTimerStart() {
SYST_CSR = (1 << SYST_CSR_ENABLE) | (1 << SYST_CSR_CLKSOURCE);
// wait until timer starts
while (SYST_CVR == 0);
while (SYST_CVR == 0) {}
start_time = SYST_CVR;
return 0;
}
Expand Down
12 changes: 7 additions & 5 deletions src/runtime/micro/micro_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,11 @@ MicroSession::MicroSession(

runtime_symbol_map_ = LoadBinary(binary_path, false).symbol_map;

// Patch pointers to define the bounds of the workspace section and the word size (for allocation alignment).
std::shared_ptr<MicroSectionAllocator> workspace_allocator = GetAllocator(SectionKind::kWorkspace);
uint64_t ws_start = workspace_allocator->start_addr().value();
uint64_t ws_end = workspace_allocator->max_addr().value();
// Patch pointers to define the bounds of the workspace section and the word
// size (for allocation alignment).
std::shared_ptr<MicroSectionAllocator> ws_allocator = GetAllocator(SectionKind::kWorkspace);
uint64_t ws_start = ws_allocator->start_addr().value();
uint64_t ws_end = ws_allocator->max_addr().value();
if (word_size_ == 4) {
uint32_t workspace_start_addr = (uint32_t) ws_start;
uint32_t workspace_end_addr = (uint32_t) ws_end;
Expand Down Expand Up @@ -407,7 +408,8 @@ DevPtr MicroSession::EncoderAppend(TargetDataLayoutEncoder* encoder, const TVMAr
};
// Update the device type to look like a host, because codegen generates
// checks that it is a host array.
CHECK(dev_arr.ctx.device_type == static_cast<DLDeviceType>(kDLMicroDev)) << "attempt to write TVMArray with non-micro device type";
CHECK(dev_arr.ctx.device_type == static_cast<DLDeviceType>(kDLMicroDev))
<< "attempt to write TVMArray with non-micro device type";
dev_arr.ctx.device_type = DLDeviceType::kDLCPU;
tvm_arr_slot.WriteValue(dev_arr);
return tvm_arr_slot.start_addr();
Expand Down

0 comments on commit b1008f2

Please sign in to comment.