Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions paddle/cuda/src/hl_cuda_device.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */

// clang-format off
// Because clang-format 4.X and clang-format 3.8+ format
// following lines in different. So disable clang-format.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没理解为什么不能把 #include "hl_cuda.h" 这一行挪到下面一点的位置呢?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

编译上没问题,但是clang-format不同版本会对这段代码产生不同的format结果。

单测中,会检查format没有变化。

#include "hl_cuda.h"
#include <cuda_profiler_api.h>
#include <string.h>
Expand All @@ -23,6 +26,7 @@ limitations under the License. */
#include "hl_dso_loader.h"
#include "hl_thread.ph"
#include "paddle/utils/Logging.h"
// clang-format on

namespace dynload {

Expand Down