Skip to content

xbyak: allow repeated assignment of the same opmask index #3407

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

asztukow
Copy link
Contributor

@asztukow asztukow commented Jun 9, 2025

This change relaxes the opmask assignment check in setOpmaskIdx to allow setting the same opmask index multiple times on a Xbyak register, instead of throwing an exception on any repeated assignment.
Previously, assigning an opmask index that was already set would always result in a runtime error. With this update, an exception is only thrown if a different opmask index is assigned.

This behavior was problematic in scenarios where the same opmask might be set more than once during JIT code generation, such as when handling binary post-ops with tail processing and comparison operations.

Addresses MFDNN-7033

The change has been upstreamed to Xbyak: herumi/xbyak#209

@asztukow asztukow requested a review from a team as a code owner June 9, 2025 17:34
Copy link
Contributor

@densamoilov densamoilov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I added a note about the change having been upstreamed, for posterity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants