Skip to content

Commit ad977d0

Browse files
author
Hugh Delaney
committed
Changes for device_globals and enable tests
1 parent 7bd51c6 commit ad977d0

11 files changed

+30
-34
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10224,7 +10224,7 @@ void SYCLPostLink::ConstructJob(Compilation &C, const JobAction &JA,
1022410224
if (!(T.isAMDGCN()))
1022510225
addArgs(CmdArgs, TCArgs, {"-emit-param-info"});
1022610226
// Enable PI program metadata
10227-
if (T.isNVPTX())
10227+
if (T.isNVPTX() || T.isAMDGCN())
1022810228
addArgs(CmdArgs, TCArgs, {"-emit-program-metadata"});
1022910229
if (SYCLPostLink->getTrueType() == types::TY_LLVM_BC) {
1023010230
// single file output requested - this means only perform necessary IR

clang/lib/Driver/ToolChains/HIPAMD.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,8 @@ void HIPAMDToolChain::addClangTargetOptions(
269269
// supported for the foreseeable future.
270270
if (!DriverArgs.hasArg(options::OPT_fvisibility_EQ,
271271
options::OPT_fvisibility_ms_compat)) {
272-
CC1Args.append({"-fvisibility=hidden"});
272+
if (DeviceOffloadingKind != Action::OFK_SYCL)
273+
CC1Args.append({"-fvisibility=hidden"});
273274
CC1Args.push_back("-fapply-global-visibility-to-externs");
274275
}
275276

sycl/plugins/unified_runtime/CMakeLists.txt

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,9 @@ endif()
5656
if(SYCL_PI_UR_USE_FETCH_CONTENT)
5757
include(FetchContent)
5858

59-
set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git")
60-
# commit 69a56ea6d1369a6bde5fce97c85fc7dbda49252f
61-
# Merge: b25bb64d b78f541d
62-
# Author: Kenneth Benzie (Benie) <[email protected]>
63-
# Date: Mon Dec 11 12:30:24 2023 +0000
64-
# Merge pull request #1123 from aarongreig/aaron/usmLocationProps
65-
# [OpenCL] Add ur_usm_alloc_location_desc struct and handle it in the CL adapter.
66-
set(UNIFIED_RUNTIME_TAG 69a56ea6d1369a6bde5fce97c85fc7dbda49252f)
59+
# DO NOT MERGE
60+
set(UNIFIED_RUNTIME_REPO https://github.com/hdelan/unified-runtime.git)
61+
set(UNIFIED_RUNTIME_TAG device-global-hip)
6762

6863
if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO)
6964
set(UNIFIED_RUNTIME_REPO "${SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO}")

sycl/test-e2e/DeviceGlobal/device_global_arrow.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// RUN: %{build} -o %t.out
22
// RUN: %{run} %t.out
33
//
4-
// The HIP and OpenCL GPU backends do not currently support device_global
5-
// backend calls.
6-
// UNSUPPORTED: hip || (opencl && gpu)
4+
// The OpenCL GPU backends do not currently support device_global backend
5+
// calls.
6+
// UNSUPPORTED: opencl && gpu
77
//
88
// Tests operator-> on device_global.
99

sycl/test-e2e/DeviceGlobal/device_global_arrow_dis.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// RUN: %{build} -fsycl-device-code-split=per_source -DUSE_DEVICE_IMAGE_SCOPE -o %t.out
22
// RUN: %{run} %t.out
33
//
4-
// The HIP and OpenCL GPU backends do not currently support device_global
5-
// backend calls.
6-
// UNSUPPORTED: hip || (opencl && gpu)
4+
// The OpenCL GPU backends do not currently support device_global backend
5+
// calls.
6+
// UNSUPPORTED: opencl && gpu
77
//
88
// Tests operator-> on device_global with device_image_scope.
99
// NOTE: USE_DEVICE_IMAGE_SCOPE needs both kernels to be in the same image so

sycl/test-e2e/DeviceGlobal/device_global_device_only.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// RUN: %{build} -o %t.out
22
// RUN: %{run} %t.out
33
//
4-
// The HIP and OpenCL GPU backends do not currently support device_global
5-
// backend calls.
6-
// UNSUPPORTED: hip || (opencl && gpu)
4+
// The OpenCL GPU backends do not currently support device_global backend
5+
// calls.
6+
// UNSUPPORTED: opencl && gpu
77
//
88
// Tests basic device_global access through device kernels.
99

sycl/test-e2e/DeviceGlobal/device_global_device_only_dis.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// RUN: %{build} -fsycl-device-code-split=per_source -DUSE_DEVICE_IMAGE_SCOPE -o %t.out
22
// RUN: %{run} %t.out
33
//
4-
// The HIP and OpenCL GPU backends do not currently support device_global
5-
// backend calls.
6-
// UNSUPPORTED: hip || (opencl && gpu)
4+
// The OpenCL GPU backends do not currently support device_global backend
5+
// calls.
6+
// UNSUPPORTED: opencl && gpu
77
//
88
// Tests basic device_global with device_image_scope access through device
99
// kernels.

sycl/test-e2e/DeviceGlobal/device_global_operator_passthrough.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// RUN: %{build} -o %t.out
22
// RUN: %{run} %t.out
33
//
4-
// The HIP and OpenCL GPU backends do not currently support device_global
5-
// backend calls.
6-
// UNSUPPORTED: hip || (opencl && gpu)
4+
// The OpenCL GPU backends do not currently support device_global backend
5+
// calls.
6+
// UNSUPPORTED: opencl && gpu
77
//
88
// Tests the passthrough of operators on device_global.
99

sycl/test-e2e/DeviceGlobal/device_global_operator_passthrough_dis.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// RUN: %{build} -fsycl-device-code-split=per_source -DUSE_DEVICE_IMAGE_SCOPE -o %t.out
22
// RUN: %{run} %t.out
33
//
4-
// The HIP and OpenCL GPU backends do not currently support device_global
5-
// backend calls.
6-
// UNSUPPORTED: hip || (opencl && gpu)
4+
// The OpenCL GPU backends do not currently support device_global backend
5+
// calls.
6+
// UNSUPPORTED: opencl && gpu
77
//
88
// Tests the passthrough of operators on device_global with device_image_scope.
99
// NOTE: USE_DEVICE_IMAGE_SCOPE needs both kernels to be in the same image so

sycl/test-e2e/DeviceGlobal/device_global_subscript.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// RUN: %{build} -o %t.out
22
// RUN: %{run} %t.out
33
//
4-
// The HIP and OpenCL GPU backends do not currently support device_global
5-
// backend calls.
6-
// UNSUPPORTED: hip || (opencl && gpu)
4+
// The OpenCL GPU backends do not currently support device_global backend
5+
// calls.
6+
// UNSUPPORTED: opencl && gpu
77
//
88
// Tests operator[] on device_global.
99

sycl/test-e2e/DeviceGlobal/device_global_subscript_dis.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// RUN: %{build} -fsycl-device-code-split=per_source -DUSE_DEVICE_IMAGE_SCOPE -o %t.out
22
// RUN: %{run} %t.out
33
//
4-
// The HIP and OpenCL GPU backends do not currently support device_global
5-
// backend calls.
6-
// UNSUPPORTED: hip || (opencl && gpu)
4+
// The OpenCL GPU backends do not currently support device_global backend
5+
// calls.
6+
// UNSUPPORTED: opencl && gpu
77
//
88
// Tests operator[] on device_global with device_image_scope.
99
// NOTE: USE_DEVICE_IMAGE_SCOPE needs both kernels to be in the same image so

0 commit comments

Comments
 (0)