Skip to content

Commit 17f711a

Browse files
authored
[backport] Remove __restrict__. (dmlc#11669)
1 parent 0915f5f commit 17f711a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/tree/gpu_hist/evaluate_splits.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class EvaluateSplitAgent {
110110
return gpair;
111111
}
112112

113-
__device__ __forceinline__ void Numerical(DeviceSplitCandidate *__restrict__ best_split) {
113+
__device__ __forceinline__ void Numerical(DeviceSplitCandidate *best_split) {
114114
for (int scan_begin = gidx_begin; scan_begin < gidx_end; scan_begin += kBlockSize) {
115115
bool thread_active = (scan_begin + threadIdx.x) < gidx_end;
116116
GradientPairInt64 bin = thread_active ? LoadGpair(node_histogram + scan_begin + threadIdx.x)
@@ -147,7 +147,7 @@ class EvaluateSplitAgent {
147147
}
148148
}
149149

150-
__device__ __forceinline__ void OneHot(DeviceSplitCandidate *__restrict__ best_split) {
150+
__device__ __forceinline__ void OneHot(DeviceSplitCandidate *best_split) {
151151
for (int scan_begin = gidx_begin; scan_begin < gidx_end; scan_begin += kBlockSize) {
152152
bool thread_active = (scan_begin + threadIdx.x) < gidx_end;
153153

tests/cpp/common/test_device_vector.cu

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ TEST(TestVirtualMem, Version) {
114114
#if defined(xgboost_IS_WIN)
115115
ASSERT_FALSE(pinned.IsVm());
116116
#else // defined(xgboost_IS_WIN)
117-
if (major >= 12 && minor >= 5) {
117+
if (major > 12) {
118+
ASSERT_TRUE(pinned.IsVm());
119+
} else if (major >= 12 && minor >= 5) {
118120
ASSERT_TRUE(pinned.IsVm());
119121
} else {
120122
ASSERT_FALSE(pinned.IsVm());

0 commit comments

Comments
 (0)