File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
source/adapters/level_zero Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -433,8 +433,7 @@ ur_result_t ur_platform_handle_t_::populateDeviceCacheIfNeeded() {
433
433
// Returns plugin specific backend option.
434
434
// Current support is only for optimization options.
435
435
// Return '-ze-opt-disable' for frontend_option = -O0.
436
- // Return '-ze-opt-level=1' for frontend_option = -O1 or -O2.
437
- // Return '-ze-opt-level=2' for frontend_option = -O3.
436
+ // Return '-ze-opt-level=2' for frontend_option = -O1, -O2 or -O3.
438
437
// Return '-igc_opts 'PartitionUnit=1,SubroutineThreshold=50000'' for
439
438
// frontend_option=-ftarget-compile-fast.
440
439
UR_APIEXPORT ur_result_t UR_APICALL urPlatformGetBackendOption (
@@ -457,11 +456,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urPlatformGetBackendOption(
457
456
*PlatformOption = " -ze-opt-disable" ;
458
457
return UR_RESULT_SUCCESS;
459
458
}
460
- if (FrontendOption == " -O1" sv || FrontendOption == " -O2" sv) {
461
- *PlatformOption = " -ze-opt-level=1" ;
462
- return UR_RESULT_SUCCESS;
463
- }
464
- if (FrontendOption == " -O3" sv) {
459
+ if (FrontendOption == " -O1" sv || FrontendOption == " -O2" sv ||
460
+ FrontendOption == " -O3" sv) {
465
461
*PlatformOption = " -ze-opt-level=2" ;
466
462
return UR_RESULT_SUCCESS;
467
463
}
You can’t perform that action at this time.
0 commit comments