Skip to content

Commit

Permalink
[refactor] Remove unnecessary checks in program
Browse files Browse the repository at this point in the history
  • Loading branch information
Ailing Zhang committed Dec 5, 2022
1 parent 61effe9 commit 8635695
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions taichi/program/program.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,7 @@ void Program::check_runtime_error() {
}

void Program::synchronize() {
// Normal mode shouldn't be affected by `sync` flag.
if (arch_uses_llvm(this_thread_config().arch) ||
this_thread_config().arch == Arch::metal ||
this_thread_config().arch == Arch::vulkan ||
this_thread_config().arch == Arch::opengl ||
this_thread_config().arch == Arch::dx12) {
program_impl_->synchronize();
}
program_impl_->synchronize();
}

StreamSemaphore Program::flush() {
Expand Down Expand Up @@ -440,11 +433,6 @@ void Program::print_memory_profiler_info() {
}

std::size_t Program::get_snode_num_dynamically_allocated(SNode *snode) {
TI_ASSERT(arch_uses_llvm(this_thread_config().arch) ||
this_thread_config().arch == Arch::metal ||
this_thread_config().arch == Arch::vulkan ||
this_thread_config().arch == Arch::opengl ||
this_thread_config().arch == Arch::dx12);
return program_impl_->get_snode_num_dynamically_allocated(snode,
result_buffer);
}
Expand Down

0 comments on commit 8635695

Please sign in to comment.