Skip to content

Commit ffcf873

Browse files
committed
Windows workaround
1 parent 9ab1113 commit ffcf873

Some content is hidden

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

64 files changed

+354
-335
lines changed

unified-runtime/source/adapters/cuda/common.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ void checkErrorUR(CUresult Result, const char *Function, int Line,
7171
<< "\n\tDescription: " << ErrorString
7272
<< "\n\tFunction: " << Function << "\n\tSource Location: " << File
7373
<< ":" << Line << "\n";
74-
UR_LOG(ERROR, "{}", SS.str());
74+
UR_LOG(ERR, "{}", SS.str());
7575

7676
if (std::getenv("PI_CUDA_ABORT") != nullptr ||
7777
std::getenv("UR_CUDA_ABORT") != nullptr) {
@@ -95,7 +95,7 @@ void checkErrorUR(nvmlReturn_t Result, const char *Function, int Line,
9595
<< "\n\tDescription: " << ErrorString
9696
<< "\n\tFunction: " << Function << "\n\tSource Location: " << File
9797
<< ":" << Line << "\n";
98-
UR_LOG(ERROR, "{}", SS.str());
98+
UR_LOG(ERR, "{}", SS.str());
9999

100100
if (std::getenv("PI_CUDA_ABORT") != nullptr ||
101101
std::getenv("UR_CUDA_ABORT") != nullptr) {
@@ -115,7 +115,7 @@ void checkErrorUR(ur_result_t Result, const char *Function, int Line,
115115
SS << "\nUR ERROR:"
116116
<< "\n\tValue: " << Result << "\n\tFunction: " << Function
117117
<< "\n\tSource Location: " << File << ":" << Line << "\n";
118-
UR_LOG(ERROR, "{}", SS.str());
118+
UR_LOG(ERR, "{}", SS.str());
119119

120120
if (std::getenv("PI_CUDA_ABORT") != nullptr) {
121121
std::abort();

unified-runtime/source/adapters/cuda/image.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urBindlessImagesImageCopyExp(
803803

804804
// we don't support copying between different image types.
805805
if (pSrcImageDesc->type != pDstImageDesc->type) {
806-
UR_LOG(ERROR,
806+
UR_LOG(ERR,
807807
"Unsupported copy operation between different type of images");
808808
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
809809
}

unified-runtime/source/adapters/hip/common.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ void checkErrorUR(amd_comgr_status_t Result, const char *Function, int Line,
8686
<< "\n\tDescription: " << ErrorString
8787
<< "\n\tFunction: " << Function << "\n\tSource Location: " << File
8888
<< ":" << Line << "\n";
89-
UR_LOG(ERROR, "{}", SS.str());
89+
UR_LOG(ERR, "{}", SS.str());
9090

9191
if (std::getenv("PI_HIP_ABORT") != nullptr ||
9292
std::getenv("UR_HIP_ABORT") != nullptr) {
@@ -113,7 +113,7 @@ void checkErrorUR(hipError_t Result, const char *Function, int Line,
113113
<< "\n\tDescription: " << ErrorString
114114
<< "\n\tFunction: " << Function << "\n\tSource Location: " << File
115115
<< ":" << Line << "\n";
116-
UR_LOG(ERROR, "{}", SS.str());
116+
UR_LOG(ERR, "{}", SS.str());
117117

118118
if (std::getenv("PI_HIP_ABORT") != nullptr ||
119119
std::getenv("UR_HIP_ABORT") != nullptr) {
@@ -133,7 +133,7 @@ void checkErrorUR(ur_result_t Result, const char *Function, int Line,
133133
SS << "\nUR HIP ERROR:"
134134
<< "\n\tValue: " << Result << "\n\tFunction: " << Function
135135
<< "\n\tSource Location: " << File << ":" << Line << "\n";
136-
UR_LOG(ERROR, "{}", SS.str());
136+
UR_LOG(ERR, "{}", SS.str());
137137

138138
if (std::getenv("PI_HIP_ABORT") != nullptr ||
139139
std::getenv("UR_HIP_ABORT") != nullptr) {

unified-runtime/source/adapters/hip/image.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urBindlessImagesImageCopyExp(
822822

823823
// we don't support copying between different image types.
824824
if (pSrcImageDesc->type != pDstImageDesc->type) {
825-
UR_LOG(ERROR,
825+
UR_LOG(ERR,
826826
"Unsupported copy operation between different type of images");
827827
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
828828
}

unified-runtime/source/adapters/level_zero/adapter.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ ur_result_t initPlatforms(PlatformVec &platforms,
163163
ZE2UR_CALL(zeDriverGet, (&ZeDriverGetCount, ZeDriverGetHandles.data()));
164164
}
165165
if (ZeDriverGetCount == 0 && GlobalAdapter->ZeInitDriversCount == 0) {
166-
UR_LOG(ERROR, "\nNo Valid L0 Drivers found.\n");
166+
UR_LOG(ERR, "\nNo Valid L0 Drivers found.\n");
167167
return UR_RESULT_SUCCESS;
168168
}
169169

@@ -389,7 +389,7 @@ ur_adapter_handle_t_::ur_adapter_handle_t_()
389389
if (GlobalAdapter->ZeInitResult != ZE_RESULT_SUCCESS) {
390390
const char *ErrorString = "Unknown";
391391
zeParseError(GlobalAdapter->ZeInitResult, ErrorString);
392-
UR_LOG(ERROR, "\nzeInit failed with {}\n", ErrorString);
392+
UR_LOG(ERR, "\nzeInit failed with {}\n", ErrorString);
393393
}
394394

395395
bool useInitDrivers = false;
@@ -441,7 +441,7 @@ ur_adapter_handle_t_::ur_adapter_handle_t_()
441441
} else {
442442
const char *ErrorString = "Unknown";
443443
zeParseError(GlobalAdapter->ZeInitDriversResult, ErrorString);
444-
UR_LOG(ERROR, "\nzeInitDrivers failed with {}\n", ErrorString);
444+
UR_LOG(ERR, "\nzeInitDrivers failed with {}\n", ErrorString);
445445
}
446446
}
447447
}
@@ -459,12 +459,12 @@ ur_adapter_handle_t_::ur_adapter_handle_t_()
459459

460460
// Absorb the ZE_RESULT_ERROR_UNINITIALIZED and just return 0 Platforms.
461461
if (*GlobalAdapter->ZeResult == ZE_RESULT_ERROR_UNINITIALIZED) {
462-
UR_LOG(ERROR, "Level Zero Uninitialized\n");
462+
UR_LOG(ERR, "Level Zero Uninitialized\n");
463463
result = std::move(platforms);
464464
return;
465465
}
466466
if (*GlobalAdapter->ZeResult != ZE_RESULT_SUCCESS) {
467-
UR_LOG(ERROR, "Level Zero initialization failure\n");
467+
UR_LOG(ERR, "Level Zero initialization failure\n");
468468
result = ze2urResult(*GlobalAdapter->ZeResult);
469469

470470
return;

unified-runtime/source/adapters/level_zero/async_alloc.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ static ur_result_t enqueueUSMAllocHelper(
9292
CommandType = UR_COMMAND_ENQUEUE_USM_SHARED_ALLOC_EXP;
9393
break;
9494
default:
95-
UR_LOG(ERROR, "enqueueUSMAllocHelper: unsupported USM type");
95+
UR_LOG(ERR, "enqueueUSMAllocHelper: unsupported USM type");
9696
throw UR_RESULT_ERROR_UNKNOWN;
9797
}
9898
UR_CALL(createEventAndAssociateQueue(Queue, Event, CommandType, CommandList,

unified-runtime/source/adapters/level_zero/command_buffer.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ bool checkImmediateAppendSupport(ur_context_handle_t Context,
4444
const bool EnableAppendPath = std::atoi(UrRet) == 1;
4545

4646
if (EnableAppendPath && !Device->ImmCommandListUsed) {
47-
UR_LOG(ERROR,
47+
UR_LOG(ERR,
4848
"{} is set but immediate command-lists are currently "
4949
"disabled. Immediate command-lists are "
5050
"required to use the immediate append path.",
5151
AppendEnvVarName);
5252
std::abort();
5353
}
5454
if (EnableAppendPath && !DriverSupportsImmediateAppend) {
55-
UR_LOG(ERROR,
55+
UR_LOG(ERR,
5656
"{} is set but the current driver does not support the "
5757
"zeCommandListImmediateAppendCommandListsExp entrypoint.",
5858
AppendEnvVarName);
@@ -1876,7 +1876,7 @@ ur_result_t validateCommandDesc(
18761876
if (NewGlobalWorkOffset) {
18771877
if (!CommandBuffer->Context->getPlatform()
18781878
->ZeDriverGlobalOffsetExtensionFound) {
1879-
UR_LOG(ERROR, "No global offset extension found on this driver");
1879+
UR_LOG(ERR, "No global offset extension found on this driver");
18801880
return UR_RESULT_ERROR_INVALID_VALUE;
18811881
}
18821882
}

unified-runtime/source/adapters/level_zero/common.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ ze_result_t ZeCall::doCall(ze_result_t ZeResult, const char *ZeName,
151151
if (TraceError) {
152152
const char *ErrorString = "Unknown";
153153
zeParseError(ZeResult, ErrorString);
154-
UR_LOG(ERROR, "Error ({}) in {}", ErrorString, ZeName);
154+
UR_LOG(ERR, "Error ({}) in {}", ErrorString, ZeName);
155155
}
156156
return ZeResult;
157157
}

unified-runtime/source/adapters/level_zero/context.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ ur_result_t urContextSetExtendedDeleter(
167167
ur_context_extended_deleter_t /*Deleter*/,
168168
/// [in][out][optional] pointer to data to be passed to callback.
169169
void * /*UserData*/) {
170-
UR_LOG_LEGACY(ERROR,
170+
UR_LOG_LEGACY(ERR,
171171
logger::LegacyMessage("[UR][L0] {} function not implemented!"),
172172
"{} function not implemented!", __FUNCTION__);
173173
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;

unified-runtime/source/adapters/level_zero/device.cpp

+11-11
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ getRangeOfAllowedCopyEngines(const ur_device_handle_t &Device) {
5252
int UpperCopyEngineIndex = std::stoi(CopyEngineRange.substr(pos + 1));
5353
if ((LowerCopyEngineIndex > UpperCopyEngineIndex) ||
5454
(LowerCopyEngineIndex < -1) || (UpperCopyEngineIndex < -1)) {
55-
UR_LOG(ERROR, "UR_L0_LEVEL_ZERO_USE_COPY_ENGINE: invalid value provided, "
56-
"default set.");
55+
UR_LOG(ERR, "UR_L0_LEVEL_ZERO_USE_COPY_ENGINE: invalid value provided, "
56+
"default set.");
5757
LowerCopyEngineIndex = 0;
5858
UpperCopyEngineIndex = INT_MAX;
5959
}
@@ -194,8 +194,8 @@ static std::tuple<zes_device_handle_t, ur_zes_device_handle_data_t, ur_result_t>
194194
getZesDeviceData(ur_device_handle_t Device) {
195195
bool SysManEnv = getenv_tobool("ZES_ENABLE_SYSMAN", false);
196196
if ((Device->Platform->ZedeviceToZesDeviceMap.size() == 0) && !SysManEnv) {
197-
UR_LOG(ERROR, "SysMan support is unavailable on this system. Please "
198-
"check your level zero driver installation.");
197+
UR_LOG(ERR, "SysMan support is unavailable on this system. Please "
198+
"check your level zero driver installation.");
199199
return {nullptr, {}, UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION};
200200
}
201201

@@ -250,7 +250,7 @@ ur_result_t urDeviceGetInfo(
250250
case ZE_DEVICE_TYPE_FPGA:
251251
return ReturnValue(UR_DEVICE_TYPE_FPGA);
252252
default:
253-
UR_LOG(ERROR, "This device type is not supported");
253+
UR_LOG(ERR, "This device type is not supported");
254254
return UR_RESULT_ERROR_INVALID_VALUE;
255255
}
256256
}
@@ -1107,8 +1107,8 @@ ur_result_t urDeviceGetInfo(
11071107
case UR_DEVICE_INFO_MAX_IMAGE_LINEAR_WIDTH_EXP:
11081108
case UR_DEVICE_INFO_MAX_IMAGE_LINEAR_HEIGHT_EXP:
11091109
case UR_DEVICE_INFO_MAX_IMAGE_LINEAR_PITCH_EXP:
1110-
UR_LOG(ERROR, "Unsupported ParamName in urGetDeviceInfo");
1111-
UR_LOG(ERROR, "ParamName=%{}(0x{})", ParamName, logger::toHex(ParamName));
1110+
UR_LOG(ERR, "Unsupported ParamName in urGetDeviceInfo");
1111+
UR_LOG(ERR, "ParamName=%{}(0x{})", ParamName, logger::toHex(ParamName));
11121112
return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;
11131113
case UR_DEVICE_INFO_MIPMAP_SUPPORT_EXP: {
11141114
// L0 does not support mipmaps.
@@ -1119,8 +1119,8 @@ ur_result_t urDeviceGetInfo(
11191119
return ReturnValue(false);
11201120
}
11211121
case UR_DEVICE_INFO_MIPMAP_MAX_ANISOTROPY_EXP:
1122-
UR_LOG(ERROR, "Unsupported ParamName in urGetDeviceInfo");
1123-
UR_LOG(ERROR, "ParamName=%{}(0x{})", ParamName, logger::toHex(ParamName));
1122+
UR_LOG(ERR, "Unsupported ParamName in urGetDeviceInfo");
1123+
UR_LOG(ERR, "ParamName=%{}(0x{})", ParamName, logger::toHex(ParamName));
11241124
return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;
11251125
case UR_DEVICE_INFO_MIPMAP_LEVEL_REFERENCE_SUPPORT_EXP: {
11261126
// L0 does not support creation of images from individual mipmap levels.
@@ -1338,8 +1338,8 @@ ur_result_t urDeviceGetInfo(
13381338
}
13391339
}
13401340
default:
1341-
UR_LOG(ERROR, "Unsupported ParamName in urGetDeviceInfo");
1342-
UR_LOG(ERROR, "ParamNameParamName={}(0x{})", ParamName,
1341+
UR_LOG(ERR, "Unsupported ParamName in urGetDeviceInfo");
1342+
UR_LOG(ERR, "ParamNameParamName={}(0x{})", ParamName,
13431343
logger::toHex(ParamName));
13441344
return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;
13451345
}

unified-runtime/source/adapters/level_zero/event.cpp

+11-11
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ ur_result_t urEventGetInfo(
510510
return ReturnValue(Event->RefCount.load());
511511
}
512512
default:
513-
UR_LOG(ERROR, "Unsupported ParamName in urEventGetInfo: ParamName={}(0x{})",
513+
UR_LOG(ERR, "Unsupported ParamName in urEventGetInfo: ParamName={}(0x{})",
514514
PropName, logger::toHex(PropName));
515515
return UR_RESULT_ERROR_INVALID_VALUE;
516516
}
@@ -596,11 +596,11 @@ ur_result_t urEventGetProfilingInfo(
596596
return ReturnValue(ContextEndTime);
597597
}
598598
case UR_PROFILING_INFO_COMMAND_COMPLETE:
599-
UR_LOG(ERROR, "urEventGetProfilingInfo: "
600-
"UR_PROFILING_INFO_COMMAND_COMPLETE not supported");
599+
UR_LOG(ERR, "urEventGetProfilingInfo: "
600+
"UR_PROFILING_INFO_COMMAND_COMPLETE not supported");
601601
return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;
602602
default:
603-
UR_LOG(ERROR, "urEventGetProfilingInfo: not supported ParamName");
603+
UR_LOG(ERR, "urEventGetProfilingInfo: not supported ParamName");
604604
return UR_RESULT_ERROR_INVALID_VALUE;
605605
}
606606
}
@@ -663,11 +663,11 @@ ur_result_t urEventGetProfilingInfo(
663663
return ReturnValue(ContextEndTime);
664664
}
665665
case UR_PROFILING_INFO_COMMAND_COMPLETE:
666-
UR_LOG(ERROR, "urEventGetProfilingInfo: "
667-
"UR_PROFILING_INFO_COMMAND_COMPLETE not supported");
666+
UR_LOG(ERR, "urEventGetProfilingInfo: "
667+
"UR_PROFILING_INFO_COMMAND_COMPLETE not supported");
668668
return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;
669669
default:
670-
UR_LOG(ERROR, "urEventGetProfilingInfo: not supported ParamName");
670+
UR_LOG(ERR, "urEventGetProfilingInfo: not supported ParamName");
671671
return UR_RESULT_ERROR_INVALID_VALUE;
672672
}
673673
} else {
@@ -710,11 +710,11 @@ ur_result_t urEventGetProfilingInfo(
710710
//
711711
return ReturnValue(uint64_t{0});
712712
case UR_PROFILING_INFO_COMMAND_COMPLETE:
713-
UR_LOG(ERROR, "urEventGetProfilingInfo: UR_PROFILING_INFO_COMMAND_COMPLETE "
714-
"not supported");
713+
UR_LOG(ERR, "urEventGetProfilingInfo: UR_PROFILING_INFO_COMMAND_COMPLETE "
714+
"not supported");
715715
return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;
716716
default:
717-
UR_LOG(ERROR, "urEventGetProfilingInfo: not supported ParamName");
717+
UR_LOG(ERR, "urEventGetProfilingInfo: not supported ParamName");
718718
return UR_RESULT_ERROR_INVALID_VALUE;
719719
}
720720

@@ -1009,7 +1009,7 @@ ur_result_t urEventSetCallback(
10091009
ur_event_callback_t /*Notify*/,
10101010
/// [in][out][optional] pointer to data to be passed to callback.
10111011
void * /*UserData*/) {
1012-
UR_LOG_LEGACY(ERROR,
1012+
UR_LOG_LEGACY(ERR,
10131013
logger::LegacyMessage("[UR][L0] {} function not implemented!"),
10141014
"{} function not implemented!", __FUNCTION__);
10151015
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;

0 commit comments

Comments
 (0)