Skip to content

Commit 8dc3d2b

Browse files
committed
fix logical error
Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
1 parent 61aa63e commit 8dc3d2b

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

source/adapters/level_zero/platform.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,8 @@ ur_result_t urPlatformGetBackendOption(
196196
*PlatformOption = "-igc_opts 'PartitionUnit=1,SubroutineThreshold=50000'";
197197
return UR_RESULT_SUCCESS;
198198
}
199-
if (FrontendOption == "-foffload-fp32-prec-div"sv) {
200-
*PlatformOption = "-ze-fp32-correctly-rounded-divide-div";
201-
return UR_RESULT_SUCCESS;
202-
}
203-
if (FrontendOption == "-foffload-fp32-prec-sqrt"sv) {
199+
if (FrontendOption == "-foffload-fp32-prec-div"sv ||
200+
FrontendOption == "-foffload-fp32-prec-sqrt"sv) {
204201
*PlatformOption = "-ze-fp32-correctly-rounded-divide-sqrt";
205202
return UR_RESULT_SUCCESS;
206203
}

source/adapters/opencl/platform.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,8 @@ urPlatformGetBackendOption(ur_platform_handle_t, const char *pFrontendOption,
144144
*ppPlatformOption = "-igc_opts 'PartitionUnit=1,SubroutineThreshold=50000'";
145145
return UR_RESULT_SUCCESS;
146146
}
147-
if (pFrontendOption == "-foffload-fp32-prec-div"sv) {
148-
*ppPlatformOption = "-cl-fp32-correctly-rounded-divide-div";
149-
return UR_RESULT_SUCCESS;
150-
}
151-
if (pFrontendOption == "-foffload-fp32-prec-sqrt"sv) {
147+
if (pFrontendOption == "-foffload-fp32-prec-div"sv ||
148+
pFrontendOption == "-foffload-fp32-prec-sqrt"sv) {
152149
*ppPlatformOption = "-cl-fp32-correctly-rounded-divide-sqrt";
153150
return UR_RESULT_SUCCESS;
154151
}

0 commit comments

Comments
 (0)