Skip to content

Commit ff9e531

Browse files
authored
style(platform): disable warning when cuda cc not matched (#14029)
Warning only at first when CUDA CC not matched. test=develop
1 parent d6a6a13 commit ff9e531

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

paddle/fluid/platform/device_context.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,12 @@ CUDADeviceContext::CUDADeviceContext(CUDAPlace place)
222222
driver_version_ = GetCUDADriverVersion(place_.device);
223223
runtime_version_ = GetCUDARuntimeVersion(place_.device);
224224

225-
LOG(INFO) << "device: " << place_.device
226-
<< ", CUDA Capability: " << compute_capability_
227-
<< ", Driver Version: " << driver_version_ / 1000 << "."
228-
<< (driver_version_ % 100) / 10
229-
<< ", Runtime Version: " << runtime_version_ / 1000 << "."
230-
<< (runtime_version_ % 100) / 10;
225+
LOG_FIRST_N(WARNING, 1) << "Please NOTE: device: " << place_.device
226+
<< ", CUDA Capability: " << compute_capability_
227+
<< ", Driver Version: " << driver_version_ / 1000
228+
<< "." << (driver_version_ % 100) / 10
229+
<< ", Runtime Version: " << runtime_version_ / 1000
230+
<< "." << (runtime_version_ % 100) / 10;
231231

232232
callback_manager_.reset(new StreamCallbackManager(stream_));
233233
}

0 commit comments

Comments
 (0)