Skip to content

Commit 7711096

Browse files
committed
Merge branch 'sycl' into review/yang/restructure_asan
2 parents 5507bf0 + 5e61f8f commit 7711096

File tree

22 files changed

+210
-324
lines changed

22 files changed

+210
-324
lines changed

devops/dependencies.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,21 @@
2525
"root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu"
2626
},
2727
"tbb": {
28-
"github_tag": "v2021.12.0",
29-
"version": "2021.12.0",
30-
"url": "https://github.com/oneapi-src/oneTBB/releases/download/v2021.12.0/oneapi-tbb-2021.12.0-lin.tgz",
28+
"github_tag": "v2022.0.0",
29+
"version": "2022.0.0",
30+
"url": "https://github.com/oneapi-src/oneTBB/releases/download/v2022.0.0/oneapi-tbb-2022.0.0-lin.tgz",
3131
"root": "{DEPS_ROOT}/tbb/lin"
3232
},
3333
"oclcpu": {
34-
"github_tag": "2024-WW25",
35-
"version": "2024.18.6.0.02",
36-
"url": "https://github.com/intel/llvm/releases/download/2024-WW25/oclcpuexp-2024.18.6.0.02_rel.tar.gz",
34+
"github_tag": "2024-WW43",
35+
"version": "2024.18.10.0.08",
36+
"url": "https://github.com/intel/llvm/releases/download/2024-WW43/oclcpuexp-2024.18.10.0.08_rel.tar.gz",
3737
"root": "{DEPS_ROOT}/opencl/runtime/linux/oclcpu"
3838
},
3939
"fpgaemu": {
40-
"github_tag": "2024-WW25",
41-
"version": "2024.18.6.0.02",
42-
"url": "https://github.com/intel/llvm/releases/download/2024-WW25/fpgaemu-2024.18.6.0.02_rel.tar.gz",
40+
"github_tag": "2024-WW43",
41+
"version": "2024.18.10.0.08",
42+
"url": "https://github.com/intel/llvm/releases/download/2024-WW43/fpgaemu-2024.18.10.0.08_rel.tar.gz",
4343
"root": "{DEPS_ROOT}/opencl/runtime/linux/oclfpgaemu"
4444
},
4545
"fpga": {
@@ -53,21 +53,21 @@
5353
"root": ""
5454
},
5555
"tbb": {
56-
"github_tag": "v2021.12.0",
57-
"version": "2021.12.0",
58-
"url": "https://github.com/oneapi-src/oneTBB/releases/download/v2021.12.0/oneapi-tbb-2021.12.0-win.zip",
56+
"github_tag": "v2022.0.0",
57+
"version": "2022.0.0",
58+
"url": "https://github.com/oneapi-src/oneTBB/releases/download/v2022.0.0/oneapi-tbb-2022.0.0-win.zip",
5959
"root": "{DEPS_ROOT}/tbb/win"
6060
},
6161
"oclcpu": {
62-
"github_tag": "2024-WW25",
63-
"version": "2024.18.6.0.02",
64-
"url": "https://github.com/intel/llvm/releases/download/2024-WW25/win-oclcpuexp-2024.18.6.0.02_rel.zip",
62+
"github_tag": "2024-WW43",
63+
"version": "2024.18.10.0.08",
64+
"url": "https://github.com/intel/llvm/releases/download/2024-WW43/win-oclcpuexp-2024.18.10.0.08_rel.zip",
6565
"root": "{DEPS_ROOT}/opencl/runtime/linux/oclcpu"
6666
},
6767
"fpgaemu": {
68-
"github_tag": "2024-WW25",
69-
"version": "2024.18.6.0.02",
70-
"url": "https://github.com/intel/llvm/releases/download/2024-WW25/win-fpgaemu-2024.18.6.0.02_rel.zip",
68+
"github_tag": "2024-WW43",
69+
"version": "2024.18.10.0.08",
70+
"url": "https://github.com/intel/llvm/releases/download/2024-WW43/win-fpgaemu-2024.18.10.0.08_rel.zip",
7171
"root": "{DEPS_ROOT}/opencl/runtime/linux/oclfpgaemu"
7272
},
7373
"fpga": {

devops/scripts/install_drivers.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ InstallTBB () {
8181
if [ "$TBB_INSTALLED" = false ]; then
8282
mkdir -p $INSTALL_LOCATION
8383
cd $INSTALL_LOCATION
84+
if [ -d "$INSTALL_LOCATION/oneapi-tbb" ]; then
85+
echo "$INSTALL_LOCATION/oneapi-tbb exists and will be removed!"
86+
rm -Rf $INSTALL_LOCATION/oneapi-tbb;
87+
fi
8488
echo "Installing TBB..."
8589
echo "TBB version $TBB_TAG"
8690
get_release oneapi-src/onetbb $TBB_TAG \

llvm/lib/SYCLLowerIR/SYCLJointMatrixTransform.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ static constexpr char MATRIX_TYPE[] = "spirv.CooperativeMatrixKHR";
2626
// its users and operands to make LLVM IR more SPIR-V friendly.
2727
bool transformAccessChain(Function *F) {
2828
bool ModuleChanged = false;
29-
for (auto I : F->users()) {
30-
auto *CI = dyn_cast<CallInst>(I);
29+
for (auto I = F->user_begin(), E = F->user_end(); I != E;) {
30+
User *U = *I++;
31+
auto *CI = dyn_cast<CallInst>(U);
3132
if (!CI)
3233
continue;
3334

llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
#include "llvm/IR/Use.h"
6565
#include "llvm/IR/Value.h"
6666
#include "llvm/MC/MCSectionMachO.h"
67-
#include "llvm/SYCLLowerIR/DeviceGlobals.h"
6867
#include "llvm/Support/Casting.h"
6968
#include "llvm/Support/CommandLine.h"
7069
#include "llvm/Support/Debug.h"
@@ -1566,7 +1565,11 @@ static bool isUnsupportedDeviceGlobal(GlobalVariable *G) {
15661565
// Non image scope device globals are implemented by device USM, and the
15671566
// out-of-bounds check for them will be done by sanitizer USM part. So we
15681567
// exclude them here.
1569-
return (!isDeviceGlobalVariable(*G) || !hasDeviceImageScopeProperty(*G));
1568+
if (!G->hasAttribute("sycl-device-image-scope"))
1569+
return true;
1570+
1571+
Attribute Attr = G->getAttribute("sycl-device-image-scope");
1572+
return (!Attr.isStringAttribute() || Attr.getValueAsString() == "false");
15701573
}
15711574

15721575
static bool isUnsupportedSPIRAccess(Value *Addr, Instruction *Inst) {

llvm/lib/Transforms/Instrumentation/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ add_llvm_component_library(LLVMInstrumentation
3939
Core
4040
Demangle
4141
MC
42-
SYCLLowerIR
4342
Support
4443
TargetParser
4544
TransformUtils

sycl/include/sycl/ext/intel/experimental/grf_size_properties.hpp

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -56,29 +56,26 @@ template <typename Properties>
5656
struct ConflictingProperties<sycl::ext::intel::experimental::grf_size_key,
5757
Properties>
5858
: std::bool_constant<
59-
ContainsProperty<
60-
sycl::ext::intel::experimental::grf_size_automatic_key,
61-
Properties>::value ||
62-
ContainsProperty<sycl::detail::register_alloc_mode_key,
63-
Properties>::value> {};
59+
Properties::template has_property<
60+
sycl::ext::intel::experimental::grf_size_automatic_key>() ||
61+
Properties::template has_property<
62+
sycl::detail::register_alloc_mode_key>()> {};
6463

6564
template <typename Properties>
6665
struct ConflictingProperties<
6766
sycl::ext::intel::experimental::grf_size_automatic_key, Properties>
68-
: std::bool_constant<
69-
ContainsProperty<sycl::ext::intel::experimental::grf_size_key,
70-
Properties>::value ||
71-
ContainsProperty<sycl::detail::register_alloc_mode_key,
72-
Properties>::value> {};
67+
: std::bool_constant<Properties::template has_property<
68+
sycl::ext::intel::experimental::grf_size_key>() ||
69+
Properties::template has_property<
70+
sycl::detail::register_alloc_mode_key>()> {};
7371

7472
template <typename Properties>
7573
struct ConflictingProperties<sycl::detail::register_alloc_mode_key, Properties>
7674
: std::bool_constant<
77-
ContainsProperty<sycl::ext::intel::experimental::grf_size_key,
78-
Properties>::value ||
79-
ContainsProperty<
80-
sycl::ext::intel::experimental::grf_size_automatic_key,
81-
Properties>::value> {};
75+
Properties::template has_property<
76+
sycl::ext::intel::experimental::grf_size_key>() ||
77+
Properties::template has_property<
78+
sycl::ext::intel::experimental::grf_size_automatic_key>()> {};
8279

8380
} // namespace ext::oneapi::experimental::detail
8481
} // namespace _V1

sycl/include/sycl/ext/intel/experimental/pipes.hpp

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -376,21 +376,29 @@ class pipe : public pipe_base {
376376
static constexpr int32_t m_Capacity = _min_capacity;
377377

378378
static constexpr int32_t m_ready_latency =
379-
oneapi::experimental::detail::ValueOrDefault<
380-
_propertiesT, ready_latency_key>::template get<int32_t>(0);
379+
oneapi::experimental::detail::get_property_or<ready_latency_key,
380+
_propertiesT>(
381+
ready_latency<0>)
382+
.value;
383+
381384
static constexpr int32_t m_bits_per_symbol =
382-
oneapi::experimental::detail::ValueOrDefault<
383-
_propertiesT, bits_per_symbol_key>::template get<int32_t>(8);
385+
oneapi::experimental::detail::get_property_or<bits_per_symbol_key,
386+
_propertiesT>(
387+
bits_per_symbol<8>)
388+
.value;
384389
static constexpr bool m_uses_valid =
385-
oneapi::experimental::detail::ValueOrDefault<
386-
_propertiesT, uses_valid_key>::template get<bool>(true);
390+
oneapi::experimental::detail::get_property_or<uses_valid_key,
391+
_propertiesT>(uses_valid_on)
392+
.value;
387393
static constexpr bool m_first_symbol_in_high_order_bits =
388-
oneapi::experimental::detail::ValueOrDefault<
389-
_propertiesT,
390-
first_symbol_in_high_order_bits_key>::template get<int32_t>(0);
391-
static constexpr protocol_name m_protocol = oneapi::experimental::detail::
392-
ValueOrDefault<_propertiesT, protocol_key>::template get<protocol_name>(
393-
protocol_name::avalon_streaming_uses_ready);
394+
oneapi::experimental::detail::get_property_or<
395+
first_symbol_in_high_order_bits_key, _propertiesT>(
396+
first_symbol_in_high_order_bits_off)
397+
.value;
398+
static constexpr protocol_name m_protocol =
399+
oneapi::experimental::detail::get_property_or<protocol_key, _propertiesT>(
400+
protocol_avalon_streaming_uses_ready)
401+
.value;
394402

395403
public:
396404
static constexpr struct ConstantPipeStorageExp m_Storage = {

sycl/include/sycl/ext/intel/experimental/task_sequence.hpp

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -109,23 +109,28 @@ class task_sequence<
109109
__spv::__spirv_TaskSequenceINTEL *taskSequence;
110110
#endif
111111
static constexpr int32_t pipelined =
112-
oneapi::experimental::detail::ValueOrDefault<
113-
property_list_t, pipelined_key>::template get<int32_t>(-1);
114-
static constexpr int32_t fpga_cluster =
115-
has_property<fpga_cluster_key>()
116-
? static_cast<
117-
typename std::underlying_type<fpga_cluster_options_enum>::type>(
118-
oneapi::experimental::detail::ValueOrDefault<property_list_t,
119-
fpga_cluster_key>::
120-
template get<fpga_cluster_options_enum>(
121-
fpga_cluster_options_enum::stall_free))
122-
: -1;
112+
oneapi::experimental::detail::get_property_or<pipelined_key,
113+
property_list_t>(
114+
intel::experimental::pipelined<-1>)
115+
.value;
116+
static constexpr int32_t fpga_cluster = []() constexpr {
117+
if constexpr (has_property<fpga_cluster_key>())
118+
return static_cast<
119+
typename std::underlying_type<fpga_cluster_options_enum>::type>(
120+
get_property<fpga_cluster_key>().value);
121+
else
122+
return -1;
123+
}();
123124
static constexpr uint32_t response_capacity =
124-
oneapi::experimental::detail::ValueOrDefault<
125-
property_list_t, response_capacity_key>::template get<uint32_t>(0);
125+
oneapi::experimental::detail::get_property_or<response_capacity_key,
126+
property_list_t>(
127+
intel::experimental::response_capacity<0>)
128+
.value;
126129
static constexpr uint32_t invocation_capacity =
127-
oneapi::experimental::detail::ValueOrDefault<
128-
property_list_t, invocation_capacity_key>::template get<uint32_t>(0);
130+
oneapi::experimental::detail::get_property_or<invocation_capacity_key,
131+
property_list_t>(
132+
intel::experimental::invocation_capacity<0>)
133+
.value;
129134
};
130135

131136
} // namespace ext::intel::experimental

sycl/include/sycl/ext/oneapi/experimental/annotated_usm/alloc_base.hpp

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,8 @@ template <typename propertyListA = empty_properties_t,
4141
std::enable_if_t<
4242
detail::CheckTAndPropLists<void, propertyListA, propertyListB>::value,
4343
annotated_ptr<void, propertyListB>>
44-
aligned_alloc_annotated(size_t alignment, size_t numBytes,
45-
const device &syclDevice, const context &syclContext,
46-
sycl::usm::alloc kind,
44+
aligned_alloc_annotated(size_t align, size_t numBytes, const device &syclDevice,
45+
const context &syclContext, sycl::usm::alloc kind,
4746
const propertyListA &propList = propertyListA{}) {
4847
detail::ValidAllocPropertyList<void, propertyListA>::value;
4948

@@ -53,12 +52,12 @@ aligned_alloc_annotated(size_t alignment, size_t numBytes,
5352
static_cast<void>(propList);
5453

5554
constexpr size_t alignFromPropList =
56-
detail::GetAlignFromPropList<propertyListA>::value;
55+
detail::get_property_or<alignment_key, propertyListA>(alignment<0>).value;
5756
const property_list &usmPropList = get_usm_property_list<propertyListA>();
5857

59-
if constexpr (detail::HasUsmKind<propertyListA>::value) {
58+
if constexpr (propertyListA::template has_property<usm_kind_key>()) {
6059
constexpr sycl::usm::alloc usmKind =
61-
detail::GetUsmKindFromPropList<propertyListA>::value;
60+
propertyListA::template get_property<usm_kind_key>().value;
6261
if (usmKind != kind) {
6362
throw sycl::exception(
6463
sycl::make_error_code(sycl::errc::invalid),
@@ -72,7 +71,7 @@ aligned_alloc_annotated(size_t alignment, size_t numBytes,
7271
"Unknown USM allocation kind was specified.");
7372

7473
void *rawPtr =
75-
sycl::aligned_alloc(combine_align(alignment, alignFromPropList), numBytes,
74+
sycl::aligned_alloc(combine_align(align, alignFromPropList), numBytes,
7675
syclDevice, syclContext, kind, usmPropList);
7776
return annotated_ptr<void, propertyListB>(rawPtr);
7877
}
@@ -83,9 +82,8 @@ template <typename T, typename propertyListA = empty_properties_t,
8382
std::enable_if_t<
8483
detail::CheckTAndPropLists<T, propertyListA, propertyListB>::value,
8584
annotated_ptr<T, propertyListB>>
86-
aligned_alloc_annotated(size_t alignment, size_t count,
87-
const device &syclDevice, const context &syclContext,
88-
sycl::usm::alloc kind,
85+
aligned_alloc_annotated(size_t align, size_t count, const device &syclDevice,
86+
const context &syclContext, sycl::usm::alloc kind,
8987
const propertyListA &propList = propertyListA{}) {
9088
detail::ValidAllocPropertyList<T, propertyListA>::value;
9189

@@ -95,12 +93,12 @@ aligned_alloc_annotated(size_t alignment, size_t count,
9593
static_cast<void>(propList);
9694

9795
constexpr size_t alignFromPropList =
98-
detail::GetAlignFromPropList<propertyListA>::value;
96+
detail::get_property_or<alignment_key, propertyListA>(alignment<0>).value;
9997
const property_list &usmPropList = get_usm_property_list<propertyListA>();
10098

101-
if constexpr (detail::HasUsmKind<propertyListA>::value) {
99+
if constexpr (propertyListA::template has_property<usm_kind_key>()) {
102100
constexpr sycl::usm::alloc usmKind =
103-
detail::GetUsmKindFromPropList<propertyListA>::value;
101+
propertyListA::template get_property<usm_kind_key>().value;
104102
if (usmKind != kind) {
105103
throw sycl::exception(
106104
sycl::make_error_code(sycl::errc::invalid),
@@ -113,7 +111,7 @@ aligned_alloc_annotated(size_t alignment, size_t count,
113111
throw sycl::exception(sycl::make_error_code(sycl::errc::invalid),
114112
"Unknown USM allocation kind was specified.");
115113

116-
size_t combinedAlign = combine_align(alignment, alignFromPropList);
114+
size_t combinedAlign = combine_align(align, alignFromPropList);
117115
T *rawPtr = sycl::aligned_alloc<T>(combinedAlign, count, syclDevice,
118116
syclContext, kind, usmPropList);
119117
return annotated_ptr<T, propertyListB>(rawPtr);
@@ -212,7 +210,9 @@ std::enable_if_t<
212210
malloc_annotated(size_t numBytes, const device &syclDevice,
213211
const context &syclContext, const propertyListA &propList) {
214212
constexpr sycl::usm::alloc usmKind =
215-
detail::GetUsmKindFromPropList<propertyListA>::value;
213+
detail::get_property_or<usm_kind_key, propertyListA>(
214+
usm_kind<sycl::usm::alloc::unknown>)
215+
.value;
216216
static_assert(usmKind != sycl::usm::alloc::unknown,
217217
"USM kind is not specified. Please specify it as an argument "
218218
"or in the input property list.");
@@ -228,7 +228,9 @@ std::enable_if_t<
228228
malloc_annotated(size_t count, const device &syclDevice,
229229
const context &syclContext, const propertyListA &propList) {
230230
constexpr sycl::usm::alloc usmKind =
231-
detail::GetUsmKindFromPropList<propertyListA>::value;
231+
detail::get_property_or<usm_kind_key, propertyListA>(
232+
usm_kind<sycl::usm::alloc::unknown>)
233+
.value;
232234
static_assert(usmKind != sycl::usm::alloc::unknown,
233235
"USM kind is not specified. Please specify it as an argument "
234236
"or in the input property list.");

0 commit comments

Comments
 (0)