Skip to content

Commit

Permalink
fix: fix ci compile error when without gpu
Browse files Browse the repository at this point in the history
  • Loading branch information
Wanglongzhi2001 committed Nov 28, 2023
1 parent a3daaa2 commit c65442a
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@
namespace {

inline int getSMVersion() {
int sm_version = paddle::platform::GetGPUComputeCapability(
int sm_version = 80;
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)
sm_version = paddle::platform::GetGPUComputeCapability(
paddle::platform::GetCurrentDeviceId());
#endif
return sm_version;
}

Expand Down

0 comments on commit c65442a

Please sign in to comment.