-
Notifications
You must be signed in to change notification settings - Fork 1.1k
xe: jit: fix shr usage #4146
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
base: main
Are you sure you want to change the base?
xe: jit: fix shr usage #4146
Conversation
make test |
mach(1, _qot, _x, m); | ||
shr<uint32_t>(1, _qot, _qot, p - 32); | ||
// qot = (x * m) >> p | ||
bool use_mach = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: const
to prevent a coverity complaint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable is updated in embargo code so it has to be non-const. Can I add // NOLINT
comment to ignore that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can just dismiss the coverity hit later.
src/gpu/intel/jit/codegen/kernel.hpp
Outdated
template <typename DT = void> | ||
void eshr(const ngen::InstructionModifier &mod, ngen::RegData dst, | ||
ngen::RegData src0, ngen::RegData src1) { | ||
bool is_q = ngen_is_qw(src0.getType()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed.
9946bac
to
4eef761
Compare
PR switches
shr
(bitwise right shift) usage toeshr
(emulated bitwise right shift) to ensure that signed types are properly dispatched toasr
(arithmetic right shift).