Skip to content

[HIP] Changes for device_globals and enable tests #12165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/Clang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10230,7 +10230,7 @@ void SYCLPostLink::ConstructJob(Compilation &C, const JobAction &JA,
if (!(T.isAMDGCN()))
addArgs(CmdArgs, TCArgs, {"-emit-param-info"});
// Enable PI program metadata
if (T.isNVPTX())
if (T.isNVPTX() || T.isAMDGCN())
addArgs(CmdArgs, TCArgs, {"-emit-program-metadata"});
if (SYCLPostLink->getTrueType() == types::TY_LLVM_BC) {
// single file output requested - this means only perform necessary IR
Expand Down
3 changes: 2 additions & 1 deletion clang/lib/Driver/ToolChains/HIPAMD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,8 @@ void HIPAMDToolChain::addClangTargetOptions(
// supported for the foreseeable future.
if (!DriverArgs.hasArg(options::OPT_fvisibility_EQ,
options::OPT_fvisibility_ms_compat)) {
CC1Args.append({"-fvisibility=hidden"});
if (DeviceOffloadingKind != Action::OFK_SYCL)
CC1Args.append({"-fvisibility=hidden"});
CC1Args.push_back("-fapply-global-visibility-to-externs");
}

Expand Down
11 changes: 3 additions & 8 deletions sycl/plugins/unified_runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,9 @@ endif()
if(SYCL_PI_UR_USE_FETCH_CONTENT)
include(FetchContent)

set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git")
# commit f8fc936d9cf174ad455da84ea3904a8111a590dc
# Merge: 20b9a83e 42104338
# Author: Kenneth Benzie (Benie) <[email protected]>
# Date: Wed Dec 13 12:06:14 2023 +0000
# Merge pull request #1179 from pbalcer/coverity-issues
# [L0] coverity fixes
set(UNIFIED_RUNTIME_TAG f8fc936d9cf174ad455da84ea3904a8111a590dc)
# DO NOT MERGE
set(UNIFIED_RUNTIME_REPO https://github.com/hdelan/unified-runtime.git)
set(UNIFIED_RUNTIME_TAG device-global-hip)

if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO)
set(UNIFIED_RUNTIME_REPO "${SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO}")
Expand Down
6 changes: 3 additions & 3 deletions sycl/test-e2e/DeviceGlobal/device_global_arrow.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// RUN: %{build} -o %t.out
// RUN: %{run} %t.out
//
// The HIP and OpenCL GPU backends do not currently support device_global
// backend calls.
// UNSUPPORTED: hip || (opencl && gpu)
// The OpenCL GPU backends do not currently support device_global backend
// calls.
// UNSUPPORTED: opencl && gpu
//
// Tests operator-> on device_global.

Expand Down
6 changes: 3 additions & 3 deletions sycl/test-e2e/DeviceGlobal/device_global_arrow_dis.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// RUN: %{build} -fsycl-device-code-split=per_source -DUSE_DEVICE_IMAGE_SCOPE -o %t.out
// RUN: %{run} %t.out
//
// The HIP and OpenCL GPU backends do not currently support device_global
// backend calls.
// UNSUPPORTED: hip || (opencl && gpu)
// The OpenCL GPU backends do not currently support device_global backend
// calls.
// UNSUPPORTED: opencl && gpu
//
// Tests operator-> on device_global with device_image_scope.
// NOTE: USE_DEVICE_IMAGE_SCOPE needs both kernels to be in the same image so
Expand Down
6 changes: 3 additions & 3 deletions sycl/test-e2e/DeviceGlobal/device_global_device_only.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// RUN: %{build} -o %t.out
// RUN: %{run} %t.out
//
// The HIP and OpenCL GPU backends do not currently support device_global
// backend calls.
// UNSUPPORTED: hip || (opencl && gpu)
// The OpenCL GPU backends do not currently support device_global backend
// calls.
// UNSUPPORTED: opencl && gpu
//
// Tests basic device_global access through device kernels.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// RUN: %{build} -fsycl-device-code-split=per_source -DUSE_DEVICE_IMAGE_SCOPE -o %t.out
// RUN: %{run} %t.out
//
// The HIP and OpenCL GPU backends do not currently support device_global
// backend calls.
// UNSUPPORTED: hip || (opencl && gpu)
// The OpenCL GPU backends do not currently support device_global backend
// calls.
// UNSUPPORTED: opencl && gpu
//
// Tests basic device_global with device_image_scope access through device
// kernels.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// RUN: %{build} -o %t.out
// RUN: %{run} %t.out
//
// The HIP and OpenCL GPU backends do not currently support device_global
// backend calls.
// UNSUPPORTED: hip || (opencl && gpu)
// The OpenCL GPU backends do not currently support device_global backend
// calls.
// UNSUPPORTED: opencl && gpu
//
// Tests the passthrough of operators on device_global.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// RUN: %{build} -fsycl-device-code-split=per_source -DUSE_DEVICE_IMAGE_SCOPE -o %t.out
// RUN: %{run} %t.out
//
// The HIP and OpenCL GPU backends do not currently support device_global
// backend calls.
// UNSUPPORTED: hip || (opencl && gpu)
// The OpenCL GPU backends do not currently support device_global backend
// calls.
// UNSUPPORTED: opencl && gpu
//
// Tests the passthrough of operators on device_global with device_image_scope.
// NOTE: USE_DEVICE_IMAGE_SCOPE needs both kernels to be in the same image so
Expand Down
6 changes: 3 additions & 3 deletions sycl/test-e2e/DeviceGlobal/device_global_subscript.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// RUN: %{build} -o %t.out
// RUN: %{run} %t.out
//
// The HIP and OpenCL GPU backends do not currently support device_global
// backend calls.
// UNSUPPORTED: hip || (opencl && gpu)
// The OpenCL GPU backends do not currently support device_global backend
// calls.
// UNSUPPORTED: opencl && gpu
//
// Tests operator[] on device_global.

Expand Down
6 changes: 3 additions & 3 deletions sycl/test-e2e/DeviceGlobal/device_global_subscript_dis.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// RUN: %{build} -fsycl-device-code-split=per_source -DUSE_DEVICE_IMAGE_SCOPE -o %t.out
// RUN: %{run} %t.out
//
// The HIP and OpenCL GPU backends do not currently support device_global
// backend calls.
// UNSUPPORTED: hip || (opencl && gpu)
// The OpenCL GPU backends do not currently support device_global backend
// calls.
// UNSUPPORTED: opencl && gpu
//
// Tests operator[] on device_global with device_image_scope.
// NOTE: USE_DEVICE_IMAGE_SCOPE needs both kernels to be in the same image so
Expand Down