Skip to content

Commit 044b280

Browse files
committed
Ensure a consistent line-endings policy
I just went to change one line in a file, then found out the whole file changed since it was committed differently to my local system, and we don't do normalisation yet. This fixes that. Here we add a .gitattributes file at the top level with the policy `* text=auto` which roughly translates as files that git considers "text" are stored internally in history as LF and checked out according to local user preference (which might be CRLF on a certain person's Win32 box, for example). In addition to the new .gitattributes, files that had CRLF line-endings in the history have been renormalized with `git add --renormalize .`. This should make cross-platform development easier while respecting local configs. When in Rome...
1 parent fb3cbd1 commit 044b280

File tree

5 files changed

+458
-457
lines changed

5 files changed

+458
-457
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
//===--------- ur_level_zero.cpp - Level Zero Adapter ---------------------===//
2-
//
3-
// Copyright (C) 2023 Intel Corporation
4-
//
5-
// Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM
6-
// Exceptions. See LICENSE.TXT
7-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8-
//
9-
//===----------------------------------------------------------------------===//
10-
11-
#include <algorithm>
12-
#include <climits>
13-
#include <string.h>
14-
15-
#include "ur_level_zero.hpp"
16-
17-
// Define the static class field
18-
std::mutex ZeCall::GlobalLock;
1+
//===--------- ur_level_zero.cpp - Level Zero Adapter ---------------------===//
2+
//
3+
// Copyright (C) 2023 Intel Corporation
4+
//
5+
// Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM
6+
// Exceptions. See LICENSE.TXT
7+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8+
//
9+
//===----------------------------------------------------------------------===//
10+
11+
#include <algorithm>
12+
#include <climits>
13+
#include <string.h>
14+
15+
#include "ur_level_zero.hpp"
16+
17+
// Define the static class field
18+
std::mutex ZeCall::GlobalLock;
Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
1-
//===--------- ur_level_zero.hpp - Level Zero Adapter ---------------------===//
2-
//
3-
// Copyright (C) 2023 Intel Corporation
4-
//
5-
// Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM
6-
// Exceptions. See LICENSE.TXT
7-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8-
//
9-
//===----------------------------------------------------------------------===//
10-
#pragma once
11-
12-
#include <cassert>
13-
#include <cinttypes>
14-
#include <list>
15-
#include <map>
16-
#include <stdarg.h>
17-
#include <string>
18-
#include <unordered_map>
19-
#include <vector>
20-
21-
#include <ur/ur.hpp>
22-
#include <ur_api.h>
23-
#include <ze_api.h>
24-
#include <zes_api.h>
25-
26-
#include "common.hpp"
27-
#include "context.hpp"
28-
#include "device.hpp"
29-
#include "event.hpp"
30-
#include "image.hpp"
31-
#include "kernel.hpp"
32-
#include "memory.hpp"
33-
#include "physical_mem.hpp"
34-
#include "platform.hpp"
35-
#include "program.hpp"
36-
#include "queue.hpp"
37-
#include "sampler.hpp"
38-
#include "usm.hpp"
1+
//===--------- ur_level_zero.hpp - Level Zero Adapter ---------------------===//
2+
//
3+
// Copyright (C) 2023 Intel Corporation
4+
//
5+
// Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM
6+
// Exceptions. See LICENSE.TXT
7+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8+
//
9+
//===----------------------------------------------------------------------===//
10+
#pragma once
11+
12+
#include <cassert>
13+
#include <cinttypes>
14+
#include <list>
15+
#include <map>
16+
#include <stdarg.h>
17+
#include <string>
18+
#include <unordered_map>
19+
#include <vector>
20+
21+
#include <ur/ur.hpp>
22+
#include <ur_api.h>
23+
#include <ze_api.h>
24+
#include <zes_api.h>
25+
26+
#include "common.hpp"
27+
#include "context.hpp"
28+
#include "device.hpp"
29+
#include "event.hpp"
30+
#include "image.hpp"
31+
#include "kernel.hpp"
32+
#include "memory.hpp"
33+
#include "physical_mem.hpp"
34+
#include "platform.hpp"
35+
#include "program.hpp"
36+
#include "queue.hpp"
37+
#include "sampler.hpp"
38+
#include "usm.hpp"

source/ur/ur.cpp

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
2-
//===--------- ur.cpp - Unified Runtime ----------------------------------===//
3-
//
4-
// Copyright (C) 2023 Intel Corporation
5-
//
6-
// Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM
7-
// Exceptions. See LICENSE.TXT
8-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
9-
//
10-
//===----------------------------------------------------------------------===//
11-
12-
#include "ur.hpp"
13-
#include <cassert>
14-
15-
// Controls tracing UR calls from within the UR itself.
16-
bool PrintTrace = [] {
17-
const char *PiRet = std::getenv("SYCL_PI_TRACE");
18-
const char *Trace = PiRet ? PiRet : nullptr;
19-
const int TraceValue = Trace ? std::stoi(Trace) : 0;
20-
if (TraceValue == -1 || TraceValue == 2) { // Means print all traces
21-
return true;
22-
}
23-
return false;
24-
}();
1+
2+
//===--------- ur.cpp - Unified Runtime ----------------------------------===//
3+
//
4+
// Copyright (C) 2023 Intel Corporation
5+
//
6+
// Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM
7+
// Exceptions. See LICENSE.TXT
8+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
9+
//
10+
//===----------------------------------------------------------------------===//
11+
12+
#include "ur.hpp"
13+
#include <cassert>
14+
15+
// Controls tracing UR calls from within the UR itself.
16+
bool PrintTrace = [] {
17+
const char *PiRet = std::getenv("SYCL_PI_TRACE");
18+
const char *Trace = PiRet ? PiRet : nullptr;
19+
const int TraceValue = Trace ? std::stoi(Trace) : 0;
20+
if (TraceValue == -1 || TraceValue == 2) { // Means print all traces
21+
return true;
22+
}
23+
return false;
24+
}();

0 commit comments

Comments
 (0)