Skip to content

[SYCL][UR][L0] Fix some CI errors #9628

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 1 commit into from
May 26, 2023
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
4 changes: 2 additions & 2 deletions sycl/plugins/unified_runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
if (NOT DEFINED UNIFIED_RUNTIME_LIBRARY OR NOT DEFINED UNIFIED_RUNTIME_INCLUDE_DIR)
include(FetchContent)

set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git")
set(UNIFIED_RUNTIME_TAG 620ddb1e8bb1f5ef6cc775edf79ba4674057fe2e)
set(UNIFIED_RUNTIME_REPO "https://github.com/jandres742/unified-runtime.git")
set(UNIFIED_RUNTIME_TAG c4570a25e3493454ab6c4cd0192f270962f77a3c)

message(STATUS "Will fetch Unified Runtime from ${UNIFIED_RUNTIME_REPO}")
FetchContent_Declare(unified-runtime
Expand Down
10 changes: 8 additions & 2 deletions sycl/plugins/unified_runtime/pi2ur.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1137,6 +1137,9 @@ inline pi_result piContextCreate(const pi_context_properties *Properties,
const void *PrivateInfo,
size_t CB, void *UserData),
void *UserData, pi_context *RetContext) {
std::ignore = Properties;
std::ignore = PFnNotify;
std::ignore = UserData;
auto UrDevices = reinterpret_cast<const ur_device_handle_t *>(Devices);

ur_context_handle_t *UrContext =
Expand Down Expand Up @@ -1213,8 +1216,8 @@ inline pi_result piContextGetInfo(pi_context Context, pi_context_info ParamName,
ContextInfoType = UR_CONTEXT_INFO_REFERENCE_COUNT;
break;
}
case PI_EXT_ONEAPI_CONTEXT_INFO_USM_FILL2D_SUPPORT: {
case PI_EXT_ONEAPI_CONTEXT_INFO_USM_MEMSET2D_SUPPORT:
case PI_EXT_ONEAPI_CONTEXT_INFO_USM_FILL2D_SUPPORT:
case PI_EXT_ONEAPI_CONTEXT_INFO_USM_MEMSET2D_SUPPORT: {
ContextInfoType = UR_CONTEXT_INFO_USM_FILL2D_SUPPORT;
break;
}
Expand Down Expand Up @@ -2337,6 +2340,7 @@ inline pi_result piextUSMHostAlloc(void **ResultPtr, pi_context Context,
pi_usm_mem_properties *Properties,
size_t Size, pi_uint32 Alignment) {

std::ignore = Properties;
ur_context_handle_t UrContext =
reinterpret_cast<ur_context_handle_t>(Context);
ur_usm_desc_t USMDesc{};
Expand Down Expand Up @@ -2744,6 +2748,7 @@ inline pi_result piextUSMDeviceAlloc(void **ResultPtr, pi_context Context,
pi_usm_mem_properties *Properties,
size_t Size, pi_uint32 Alignment) {

std::ignore = Properties;
ur_context_handle_t UrContext =
reinterpret_cast<ur_context_handle_t>(Context);
auto UrDevice = reinterpret_cast<ur_device_handle_t>(Device);
Expand All @@ -2762,6 +2767,7 @@ inline pi_result piextUSMSharedAlloc(void **ResultPtr, pi_context Context,
pi_usm_mem_properties *Properties,
size_t Size, pi_uint32 Alignment) {

std::ignore = Properties;
if (Properties && *Properties != 0) {
PI_ASSERT(*(Properties) == PI_MEM_ALLOC_FLAGS && *(Properties + 2) == 0,
PI_ERROR_INVALID_VALUE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceSelectBinary(
///< array of binaries. If a suitable binary was not
///< found the function returns ${X}_INVALID_BINARY.
) {
std::ignore = Device;
// TODO: this is a bare-bones implementation for choosing a device image
// that would be compatible with the targeted device. An AOT-compiled
// image is preferred over SPIR-V for known devices (i.e. Intel devices)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1236,6 +1236,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueUSMPrefetch(
*OutEvent ///< [in,out][optional] return an event object that identifies
///< this particular command instance.
) {
std::ignore = Flags;
// Lock automatically releases when this goes out of scope.
std::scoped_lock<ur_shared_mutex> lock(Queue->Mutex);

Expand Down Expand Up @@ -1826,6 +1827,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urMemBufferPartition(
ur_mem_handle_t
*RetMem ///< [out] pointer to the handle of sub buffer created
) {
std::ignore = BufferCreateType;
UR_ASSERT(Buffer && !Buffer->isImage() &&
!(static_cast<_ur_buffer *>(Buffer))->isSubBuffer(),
UR_RESULT_ERROR_INVALID_MEM_OBJECT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPlatformGetApiVersion(
ur_platform_handle_t Driver, ///< [in] handle of the platform
ur_api_version_t *Version ///< [out] api version
) {
std::ignore = Driver;
*Version = UR_API_VERSION_0_6;
return UR_RESULT_SUCCESS;
}
Expand Down Expand Up @@ -550,6 +551,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urPlatformGetBackendOption(
*PlatformOption ///< [out] returns the correct platform specific
///< compiler option based on the frontend option.
) {
std::ignore = Platform;
using namespace std::literals;
if (FrontendOption == nullptr) {
return UR_RESULT_SUCCESS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urProgramCreateWithIL(
ur_program_handle_t
*Program ///< [out] pointer to handle of program object created.
) {
std::ignore = Properties;
try {
ur_program_handle_t_ *UrProgram =
new ur_program_handle_t_(ur_program_handle_t_::IL, Context, IL, Length);
Expand All @@ -78,6 +79,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urProgramCreateWithBinary(
ur_program_handle_t
*Program ///< [out] pointer to handle of Program object created.
) {
std::ignore = Device;
std::ignore = Properties;
// In OpenCL, clCreateProgramWithBinary() can be used to load any of the
// following: "program executable", "compiled program", or "library of
// compiled programs". In addition, the loaded program can be either
Expand Down Expand Up @@ -191,7 +194,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urProgramCompile(
const char *Options ///< [in][optional] pointer to build options
///< null-terminated string.
) {

std::ignore = Context;
std::scoped_lock<ur_shared_mutex> Guard(Program->Mutex);

// It's only valid to compile a program created from IL (we don't support
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,7 @@ ur_result_t USMDeviceAllocImpl(void **ResultPtr, ur_context_handle_t Context,
ur_device_handle_t Device,
ur_usm_device_mem_flags_t *Flags, size_t Size,
uint32_t Alignment) {
std::ignore = Flags;
// TODO: translate PI properties to Level Zero flags
ZeStruct<ze_device_mem_alloc_desc_t> ZeDesc;
ZeDesc.flags = 0;
Expand Down Expand Up @@ -693,6 +694,7 @@ ur_result_t USMSharedAllocImpl(void **ResultPtr, ur_context_handle_t Context,
ur_result_t USMHostAllocImpl(void **ResultPtr, ur_context_handle_t Context,
ur_usm_host_mem_flags_t *Flags, size_t Size,
uint32_t Alignment) {
std::ignore = Flags;
// TODO: translate PI properties to Level Zero flags
ZeStruct<ze_host_mem_alloc_desc_t> ZeHostDesc;
ZeHostDesc.flags = 0;
Expand Down