File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
src/plugins/intel_gpu/src/graph/common_utils Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -220,17 +220,14 @@ inline JitTerm operator/(const JitTerm& lhs, const JitTerm& rhs) {
220220 return JitTerm{" (" + lhs.str () + " / " + rhs.str () + " )" };
221221}
222222inline JitTerm operator %(const JitTerm& lhs, const JitTerm& rhs) {
223- OPENVINO_ASSERT (rhs.str () != " 0" );
224- if (rhs.str () == " 1" || rhs.str () == " -1" ) {
225- return JitTerm{" 0" };
226- }
227-
228223 if (is_number (lhs) && is_number (rhs)) {
229224 auto rhs_val = as_number<int64_t >(rhs);
230225 OPENVINO_ASSERT (rhs_val != 0 , " Modulo by zero detected in operator%" );
226+ if (rhs_val == 1 || rhs_val == -1 ) {
227+ return JitTerm{" 0" };
228+ }
231229 return JitTerm{std::to_string (as_number<int64_t >(lhs) % rhs_val)};
232230 }
233-
234231 return JitTerm{" (" + lhs.str () + " % " + rhs.str () + " )" };
235232}
236233inline JitTerm operator ++(JitTerm& t, int ) {
You can’t perform that action at this time.
0 commit comments