Skip to content

[SYCL][AMD] Propagate metadata in createURProgram #14831

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 5 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 5 additions & 0 deletions sycl/source/detail/device_binary_image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ void RTDeviceBinaryImage::init(sycl_device_binary Bin) {
KernelParamOptInfo.init(Bin, __SYCL_PROPERTY_SET_KERNEL_PARAM_OPT_INFO);
AssertUsed.init(Bin, __SYCL_PROPERTY_SET_SYCL_ASSERT_USED);
ProgramMetadata.init(Bin, __SYCL_PROPERTY_SET_PROGRAM_METADATA);
// Convert ProgramMetadata into the UR format
for (const auto &Prop : ProgramMetadata) {
ProgramMetadataUR.push_back(
ur::mapDeviceBinaryPropertyToProgramMetadata(Prop));
}
ExportedSymbols.init(Bin, __SYCL_PROPERTY_SET_SYCL_EXPORTED_SYMBOLS);
ImportedSymbols.init(Bin, __SYCL_PROPERTY_SET_SYCL_IMPORTED_SYMBOLS);
DeviceGlobals.init(Bin, __SYCL_PROPERTY_SET_SYCL_DEVICE_GLOBALS);
Expand Down
8 changes: 3 additions & 5 deletions sycl/source/detail/program_manager/program_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,11 +500,9 @@ std::pair<ur_program_handle_t, bool> ProgramManager::getOrCreateURProgram(
// Get program metadata from properties
std::vector<ur_program_metadata_t> ProgMetadataVector;
for (const RTDeviceBinaryImage *Img : AllImages) {
auto ProgMetadata = Img->getProgramMetadata();
for (const auto &Prop : ProgMetadata) {
ProgMetadataVector.push_back(
ur::mapDeviceBinaryPropertyToProgramMetadata(Prop));
}
auto &ImgProgMetadata = Img->getProgramMetadataUR();
ProgMetadataVector.insert(ProgMetadataVector.end(),
ImgProgMetadata.begin(), ImgProgMetadata.end());
}
// TODO: Build for multiple devices once supported by program manager
NativePrg = createBinaryProgram(getSyclObjImpl(Context), Device,
Expand Down
3 changes: 0 additions & 3 deletions sycl/test-e2e/Basic/reqd_work_group_size.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// RUN: %{build} -o %t.out
// RUN: %{run} %t.out

// TODO: Reenable, see https://github.com/intel/llvm/issues/14598
// UNSUPPORTED: linux, windows

#include <sycl/detail/core.hpp>

#include <iostream>
Expand Down
3 changes: 1 addition & 2 deletions sycl/test-e2e/DeviceGlobal/device_global_arrow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
//
// The OpenCL GPU backends do not currently support device_global backend
// calls.
// TODO: Reenable linux/windows, see https://github.com/intel/llvm/issues/14598
// UNSUPPORTED: opencl && gpu, linux, windows
// UNSUPPORTED: opencl && gpu
//
// Tests operator-> on device_global.

Expand Down
3 changes: 1 addition & 2 deletions sycl/test-e2e/DeviceGlobal/device_global_device_only.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
//
// The OpenCL GPU backends do not currently support device_global backend
// calls.
// TODO: Reenable linux/windows, see https://github.com/intel/llvm/issues/14598
// UNSUPPORTED: opencl && gpu, linux, windows
// UNSUPPORTED: opencl && gpu
//
// Tests basic device_global access through device kernels.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
//
// The OpenCL GPU backends do not currently support device_global backend
// calls.
// TODO: Reenable linux/windows, see https://github.com/intel/llvm/issues/14598
// UNSUPPORTED: opencl && gpu, linux, windows
// UNSUPPORTED: opencl && gpu
//
// Tests the passthrough of operators on device_global.

Expand Down
3 changes: 1 addition & 2 deletions sycl/test-e2e/DeviceGlobal/device_global_subscript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
//
// The OpenCL GPU backends do not currently support device_global backend
// calls.
// TODO: Reenable linux/windows, see https://github.com/intel/llvm/issues/14598
// UNSUPPORTED: opencl && gpu, linux, windows
// UNSUPPORTED: opencl && gpu
//
// Tests operator[] on device_global.

Expand Down
3 changes: 1 addition & 2 deletions sycl/test-e2e/KernelFusion/lit.local.cfg
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import platform

config.required_features += ['fusion']
# TODO: Reenable hip, see https://github.com/intel/llvm/issues/14598
config.unsupported_features += ['accelerator', 'hip']
config.unsupported_features += ['accelerator']

# TODO: enable on Windows once kernel fusion is supported on Windows.
if platform.system() != "Linux":
Expand Down
2 changes: 0 additions & 2 deletions sycl/test-e2e/NewOffloadDriver/diamond_shape.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// REQUIRES: fusion
// TODO: Reenable, see https://github.com/intel/llvm/issues/14598
// UNSUPPORTED: hip

// RUN: %{build} %{embed-ir} -O2 --offload-new-driver -o %t.out
// RUN: %{run} %t.out
Expand Down
Loading