Skip to content

Commit

Permalink
fix cuda error (#5509)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiweibo authored Feb 23, 2021
1 parent a759615 commit 7763db2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lite/core/program.cc
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ void Program::PrepareWorkspace(
VLOG(4) << "Var " << var_name << " in block " << block_idx;
VLOG(4) << " - type " << static_cast<int>(var_type);

#ifdef LITE_WITH_XPU
#if defined(LITE_WITH_XPU) || defined(LITE_WITH_CUDA)
if (!var_desc->Persistable()) {
#endif
// Collect precision info into var_type_map_
Expand All @@ -414,7 +414,7 @@ void Program::PrepareWorkspace(
var_type_map_[var_name] = LiteType::GetTensorListTy(
TARGET(kUnk), PRECISION(kUnk), DATALAYOUT(kUnk));
}
#ifdef LITE_WITH_XPU
#if defined(LITE_WITH_XPU) || defined(LITE_WITH_CUDA)
}
#endif

Expand Down

0 comments on commit 7763db2

Please sign in to comment.