-
Notifications
You must be signed in to change notification settings - Fork 22.6k
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
Enable fast pass tensor_fill for single element complex tensors #50383
Conversation
[ghstack-poisoned]
ghstack-source-id: 6bda69d05f384b92f4914abdd8a5c70a890206f3 Pull Request resolved: #50383
💊 CI failures summary and remediationsAs of commit 2fbe2cb (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions to the (internal) Dr. CI Users group. This comment has been revised 3 times. |
@@ -18,7 +18,7 @@ Tensor& fill_out(Tensor& self, Scalar value) { | |||
self.copy_(out); | |||
return self; | |||
} | |||
if (self.device() == at::kCPU && self.numel() == 1 && !self.is_complex() && !value.isComplex()) { | |||
if (self.device() == at::kCPU && self.numel() == 1) { |
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.
Is this path actually tested somewhere?
The code changes look good -- is this path actually tested, though? I was looking through test_tensor_creation_ops.py and this may need to add a test for filling tensors with scalars of different dtypes. |
@anjali411 merged this pull request in 5834438. |
Stack from ghstack:
Differential Revision: D25879881