Skip to content

Commit 3aa48db

Browse files
authored
[SYCL][ESIMD] Fix an issue causing a build break when building ESIMD on Windows platform (#6789)
1 parent 3916d3b commit 3aa48db

File tree

2 files changed

+49
-5
lines changed

2 files changed

+49
-5
lines changed

sycl/include/sycl/ext/intel/experimental/esimd/detail/memory_intrin.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ __esimd_lsc_load_stateless(__ESIMD_DNS::simd_mask_storage_t<N> pred,
929929
continue;
930930
}
931931

932-
constexpr uint MASK = loadstoreAlignMask<Ty, VS, DS, N>();
932+
constexpr unsigned MASK = loadstoreAlignMask<Ty, VS, DS, N>();
933933
constexpr int ChanlCount = __ESIMD_EDNS::to_int<VS>();
934934

935935
int ByteDistance = 0;
@@ -1159,7 +1159,7 @@ __ESIMD_INTRIN void __esimd_lsc_store_stateless(
11591159
continue;
11601160
}
11611161

1162-
constexpr uint MASK = loadstoreAlignMask<Ty, VS, DS, N>();
1162+
constexpr unsigned MASK = loadstoreAlignMask<Ty, VS, DS, N>();
11631163
constexpr int ChanlCount = __ESIMD_EDNS::to_int<VS>();
11641164

11651165
int ByteDistance = 0;
@@ -1636,7 +1636,7 @@ __esimd_lsc_xatomic_stateless_0(__ESIMD_DNS::simd_mask_storage_t<N> pred,
16361636
continue;
16371637
}
16381638

1639-
constexpr uint MASK = loadstoreAlignMask<Ty, VS, DS, N>();
1639+
constexpr unsigned MASK = loadstoreAlignMask<Ty, VS, DS, N>();
16401640
constexpr int ChanlCount = __ESIMD_EDNS::to_int<VS>();
16411641

16421642
int ByteDistance = 0;
@@ -1709,7 +1709,7 @@ __esimd_lsc_xatomic_stateless_1(
17091709
continue;
17101710
}
17111711

1712-
constexpr uint MASK = loadstoreAlignMask<Ty, VS, DS, N>();
1712+
constexpr unsigned MASK = loadstoreAlignMask<Ty, VS, DS, N>();
17131713
constexpr int ChanlCount = __ESIMD_EDNS::to_int<VS>();
17141714

17151715
int ByteDistance = 0;
@@ -1834,7 +1834,7 @@ __esimd_lsc_xatomic_stateless_2(
18341834
continue;
18351835
}
18361836

1837-
constexpr uint MASK = loadstoreAlignMask<Ty, VS, DS, N>();
1837+
constexpr unsigned MASK = loadstoreAlignMask<Ty, VS, DS, N>();
18381838
constexpr int ChanlCount = __ESIMD_EDNS::to_int<VS>();
18391839

18401840
int ByteDistance = 0;
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
//==------- Windows_build_test.cpp - DPC++ ESIMD build test ---------==//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
// REQUIRES: windows
9+
// RUN: %clangxx -fsycl -fsycl-device-only -fsyntax-only -Xclang -verify %s -I %sycl_include
10+
// expected-no-diagnostics
11+
12+
// The tests validates an ability to build ESIMD code on windows platform
13+
14+
#include <iostream>
15+
#include <CL/sycl.hpp>
16+
#include <sycl/ext/intel/esimd.hpp>
17+
#include <sycl/ext/intel/experimental/esimd/memory.hpp>
18+
19+
class Kernel;
20+
21+
int main()
22+
{
23+
sycl::queue q;
24+
sycl::device dev = q.get_device();
25+
sycl::context ctx = q.get_context();
26+
std::cout << "Device: " << dev.get_info<sycl::info::device::name>() << std::endl;
27+
28+
int* buffer = (int*)sycl::aligned_alloc_device(128, 1024, q);
29+
30+
q.parallel_for<Kernel>(
31+
1,
32+
[=](sycl::item<1> it) SYCL_ESIMD_KERNEL {
33+
using namespace sycl::ext::intel::esimd;
34+
using namespace sycl::ext::intel::experimental::esimd;
35+
36+
simd<int, 32> blk;
37+
lsc_block_store<int, 32>(buffer, blk);
38+
});
39+
40+
q.wait();
41+
sycl::free(buffer, q);
42+
std::cout << "Done" << std::endl;
43+
return 0;
44+
}

0 commit comments

Comments
 (0)