-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Move masked_select broadcasting from codegen layer to native layer. #37543
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
Conversation
[ghstack-poisoned]
💊 Build failures summary and remediationsAs of commit fb23d3f (more details on the Dr. CI page):
🕵️ 1 new failure recognized by patternsThe following build failures do not appear to be due to upstream breakages:
|
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.
Haven't followed it thru the codegen but I'm assuming removal of the broadcast
attribute in Declarations.cwrap eliminates the expand_outplace
logic below... if so, does the codegen just generate a one-liner that returns s__th_masked_select(self, mask)
now?
Tensor _th_masked_select(const Tensor & self, const Tensor & mask) {
// DeviceGuard omitted
Tensor b_self, b_mask;
std::tie(b_self, b_mask) = expand_outplace(self, mask, "_th_masked_select");
return s__th_masked_select(b_self, b_mask);
}
that's basically correct except s__th_masked_select doesn't get generated anymore since it's not needed (the "s_" is for same size) -- so s__th_masked_select just becomes _th_masked_select and the old _th_masked_select moves to native. |
Even better :) BTW, what's the ONNX failure? |
looks flaky. |
Stack from ghstack:
Differential Revision: D21315038