Skip to content

Commit 0f62c8b

Browse files
authored
Merge branch 'intel:sycl' into work_group_memory_tests
2 parents 82cc19d + 89c2503 commit 0f62c8b

File tree

57 files changed

+1458
-539
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1458
-539
lines changed

.github/workflows/scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ jobs:
5757

5858
# Upload the results to GitHub's code scanning dashboard.
5959
- name: "Upload to code-scanning"
60-
uses: github/codeql-action/upload-sarif@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10
60+
uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
6161
with:
6262
sarif_file: results.sarif

.github/workflows/sycl-macos-build-and-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ permissions: read-all
2424
jobs:
2525
build:
2626
name: Build
27-
runs-on: macos-12
27+
runs-on: macos-13
2828
env:
2929
CCACHE_DIR: $GITHUB_WORKSPACE/build_cache_${{ inputs.build_cache_suffix }}
3030
CCACHE_MAXSIZE: ${{ inputs.build_cache_size }}

.github/workflows/sycl-nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ jobs:
198198
echo "TAG=$(date +'%Y-%m-%d')-${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT"
199199
fi
200200
- name: Upload binaries
201-
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191
201+
uses: softprops/action-gh-release@e7a8f85e1c67a31e6ed99a94b41bd0b71bbee6b8
202202
with:
203203
files: |
204204
sycl_linux.tar.gz

clang/lib/Frontend/InitPreprocessor.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1513,7 +1513,8 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
15131513
const llvm::Triple::SubArchType DeviceSubArch = DeviceTriple.getSubArch();
15141514
if (DeviceTriple.isNVPTX() || DeviceTriple.isAMDGPU() ||
15151515
(DeviceTriple.isSPIR() &&
1516-
DeviceSubArch != llvm::Triple::SPIRSubArch_fpga))
1516+
DeviceSubArch != llvm::Triple::SPIRSubArch_fpga) ||
1517+
LangOpts.SYCLIsNativeCPU)
15171518
Builder.defineMacro("SYCL_USE_NATIVE_FP_ATOMICS");
15181519
// Enable generation of USM address spaces for FPGA.
15191520
if (DeviceSubArch == llvm::Triple::SPIRSubArch_fpga) {

clang/test/Preprocessor/sycl-macro-target-specific.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
// RUN: | FileCheck --check-prefix=CHECK-SYCL-FP-ATOMICS %s
4343
// RUN: %clang_cc1 %s -fsycl-is-device -triple amdgcn-amdhsa-amdhsa -E -dM \
4444
// RUN: | FileCheck --check-prefix=CHECK-SYCL-FP-ATOMICS %s
45+
// RUN: %clang_cc1 %s -fsycl-is-device -triple x86_64-unknown-linux-gnu -fsycl-is-native-cpu \
46+
// RUN: -E -dM | FileCheck --check-prefix=CHECK-SYCL-FP-ATOMICS %s
4547
// CHECK-SYCL-FP-ATOMICS: #define SYCL_USE_NATIVE_FP_ATOMICS
4648
// CHECK-SYCL-FP-ATOMICS-NEG-NOT: #define SYCL_USE_NATIVE_FP_ATOMICS
4749

devops/cts_exclude_filter_L0_GPU

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,3 @@ kernel_bundle
33
marray
44
# fix: https://github.com/KhronosGroup/SYCL-CTS/pull/964
55
accessor_legacy
6-
# CMPLRLLVM-62822
7-
multi_ptr

devops/cts_exclude_filter_OCL_CPU

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,3 @@ math_builtin_api
77
hierarchical
88
# fix: https://github.com/KhronosGroup/SYCL-CTS/pull/964
99
accessor_legacy
10-
# CMPLRLLVM-62822
11-
multi_ptr

libdevice/sanitizer_utils.cpp

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -668,10 +668,10 @@ constexpr size_t AlignMask(size_t n) { return n - 1; }
668668
/// ASAN Load/Store Report Built-ins
669669
///
670670

671-
#define ASAN_REPORT_ERROR(type, is_write, size) \
672-
DEVICE_EXTERN_C_NOINLINE void __asan_##type##size( \
673-
uptr addr, uint32_t as, const char __SYCL_CONSTANT__ *file, \
674-
uint32_t line, const char __SYCL_CONSTANT__ *func) { \
671+
#define ASAN_REPORT_ERROR_BASE(type, is_write, size, as) \
672+
DEVICE_EXTERN_C_NOINLINE void __asan_##type##size##_as##as( \
673+
uptr addr, const char __SYCL_CONSTANT__ *file, uint32_t line, \
674+
const char __SYCL_CONSTANT__ *func) { \
675675
if (addr & AlignMask(size)) { \
676676
__asan_report_misalign_error(addr, as, size, is_write, addr, file, line, \
677677
func); \
@@ -681,9 +681,9 @@ constexpr size_t AlignMask(size_t n) { return n - 1; }
681681
func); \
682682
} \
683683
} \
684-
DEVICE_EXTERN_C_NOINLINE void __asan_##type##size##_noabort( \
685-
uptr addr, uint32_t as, const char __SYCL_CONSTANT__ *file, \
686-
uint32_t line, const char __SYCL_CONSTANT__ *func) { \
684+
DEVICE_EXTERN_C_NOINLINE void __asan_##type##size##_as##as##_noabort( \
685+
uptr addr, const char __SYCL_CONSTANT__ *file, uint32_t line, \
686+
const char __SYCL_CONSTANT__ *func) { \
687687
if (addr & AlignMask(size)) { \
688688
__asan_report_misalign_error(addr, as, size, is_write, addr, file, line, \
689689
func, true); \
@@ -694,6 +694,13 @@ constexpr size_t AlignMask(size_t n) { return n - 1; }
694694
} \
695695
}
696696

697+
#define ASAN_REPORT_ERROR(type, is_write, size) \
698+
ASAN_REPORT_ERROR_BASE(type, is_write, size, 0) \
699+
ASAN_REPORT_ERROR_BASE(type, is_write, size, 1) \
700+
ASAN_REPORT_ERROR_BASE(type, is_write, size, 2) \
701+
ASAN_REPORT_ERROR_BASE(type, is_write, size, 3) \
702+
ASAN_REPORT_ERROR_BASE(type, is_write, size, 4)
703+
697704
ASAN_REPORT_ERROR(load, false, 1)
698705
ASAN_REPORT_ERROR(load, false, 2)
699706
ASAN_REPORT_ERROR(load, false, 4)
@@ -705,24 +712,31 @@ ASAN_REPORT_ERROR(store, true, 4)
705712
ASAN_REPORT_ERROR(store, true, 8)
706713
ASAN_REPORT_ERROR(store, true, 16)
707714

708-
#define ASAN_REPORT_ERROR_N(type, is_write) \
709-
DEVICE_EXTERN_C_NOINLINE void __asan_##type##N( \
710-
uptr addr, size_t size, uint32_t as, const char __SYCL_CONSTANT__ *file, \
715+
#define ASAN_REPORT_ERROR_N_BASE(type, is_write, as) \
716+
DEVICE_EXTERN_C_NOINLINE void __asan_##type##N_as##as( \
717+
uptr addr, size_t size, const char __SYCL_CONSTANT__ *file, \
711718
uint32_t line, const char __SYCL_CONSTANT__ *func) { \
712719
if (auto poisoned_addr = __asan_region_is_poisoned(addr, as, size)) { \
713720
__asan_report_access_error(addr, as, size, is_write, poisoned_addr, \
714721
file, line, func); \
715722
} \
716723
} \
717-
DEVICE_EXTERN_C_NOINLINE void __asan_##type##N_noabort( \
718-
uptr addr, size_t size, uint32_t as, const char __SYCL_CONSTANT__ *file, \
724+
DEVICE_EXTERN_C_NOINLINE void __asan_##type##N_as##as##_noabort( \
725+
uptr addr, size_t size, const char __SYCL_CONSTANT__ *file, \
719726
uint32_t line, const char __SYCL_CONSTANT__ *func) { \
720727
if (auto poisoned_addr = __asan_region_is_poisoned(addr, as, size)) { \
721728
__asan_report_access_error(addr, as, size, is_write, poisoned_addr, \
722729
file, line, func, true); \
723730
} \
724731
}
725732

733+
#define ASAN_REPORT_ERROR_N(type, is_write) \
734+
ASAN_REPORT_ERROR_N_BASE(type, is_write, 0) \
735+
ASAN_REPORT_ERROR_N_BASE(type, is_write, 1) \
736+
ASAN_REPORT_ERROR_N_BASE(type, is_write, 2) \
737+
ASAN_REPORT_ERROR_N_BASE(type, is_write, 3) \
738+
ASAN_REPORT_ERROR_N_BASE(type, is_write, 4)
739+
726740
ASAN_REPORT_ERROR_N(load, false)
727741
ASAN_REPORT_ERROR_N(store, true)
728742

0 commit comments

Comments
 (0)