Skip to content

Commit 8a486f1

Browse files
committed
update
1 parent b3a2e94 commit 8a486f1

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/xccl/NanCheck_XPU.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
#ifdef USE_C10D_XCCL
2-
31
#include <ATen/Dispatch.h>
42
#include <ATen/native/xpu/sycl/MemoryAccessUtils.h>
53
#include <ATen/xpu/XPUContext.h>
6-
#include <comm/XPUGuard.h>
4+
#include <comm/SYCLContext.h>
75
#include <stdint.h>
86
#include <torch/torch.h>
97
#include <xccl/NanCheck_XPU.hpp>
@@ -131,7 +129,8 @@ struct checkForNaN {
131129

132130
// Align input address up to BytePack in case it is not
133131
T* ptrAlign = (T*)ALIGN_UP(data, BytePack);
134-
size_t preProcElts = min(ptrAlign - data, size);
132+
size_t preProcElts =
133+
std::min<size_t>(static_cast<size_t>(ptrAlign - data), size);
135134

136135
size_t size_left = size;
137136

@@ -216,5 +215,3 @@ void checkForNan(const at::Tensor& tensor, at::xpu::XPUStream& stream) {
216215
}
217216

218217
} // namespace c10d
219-
220-
#endif // USE_C10D_XCCL

0 commit comments

Comments
 (0)