-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
fix scalar-tensor issue with CrossEntropyLoss label smoothing, symintify #98848
Conversation
[ghstack-poisoned]
ghstack-source-id: ca62bba285fce2d500ed8f369da79949d32bb212 Pull Request resolved: #98848
This PR needs a labelIf your changes are user facing and intended to be a part of release notes, please use a label starting with If not, please add the To add a label, you can comment to pytorchbot, for example For more information, see |
@@ -369,8 +369,7 @@ static inline Tensor scalarToTensor( | |||
const TensorOptions& options, | |||
const at::Device& self_device) { | |||
if (self_device == at::kCPU) { | |||
return at::detail::scalar_tensor_static( | |||
v, options.dtype_opt()->toScalarType(), self_device); | |||
return at::scalar_tensor(v, options.device(self_device)); |
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.
seems like you've lost the dtype here
Everything else looks good, but you need to fix ci |
…ing, symintify" Fixes the fake tensor (and symint) issues with #98571. In particular, `at::detail::scalar_tensor_static()` seems like a footgun when used in code that needs to be traceable, so we may want to audit its usages more carefully. cc soumith voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx desertfire [ghstack-poisoned]
ghstack-source-id: 5b17d54a9e6a509bb5c354205d7f4135b93dc284 Pull Request resolved: #98848
…ing, symintify" Fixes the fake tensor (and symint) issues with #98571. In particular, `at::detail::scalar_tensor_static()` seems like a footgun when used in code that needs to be traceable, so we may want to audit its usages more carefully. cc soumith voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx desertfire [ghstack-poisoned]
ghstack-source-id: 2f848b3e484e3b6cca1ba1b70808ec0fd31922c3 Pull Request resolved: #98848
…ing, symintify" Fixes the fake tensor (and symint) issues with #98571. In particular, `at::detail::scalar_tensor_static()` seems like a footgun when used in code that needs to be traceable, so we may want to audit its usages more carefully. cc soumith voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx desertfire [ghstack-poisoned]
ghstack-source-id: 0139f6fc215458862d6be830628052020843612c Pull Request resolved: #98848
…ing, symintify" Fixes the fake tensor (and symint) issues with #98571. In particular, `at::detail::scalar_tensor_static()` seems like a footgun when used in code that needs to be traceable, so we may want to audit its usages more carefully. cc soumith voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx desertfire [ghstack-poisoned]
ghstack-source-id: 4dfba505f766e5a43dcbdd93106b0978cd2988d1 Pull Request resolved: #98848
…ing, symintify" Fixes the fake tensor (and symint) issues with #98571. In particular, `at::detail::scalar_tensor_static()` seems like a footgun when used in code that needs to be traceable, so we may want to audit its usages more carefully. cc soumith voznesenskym penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx desertfire [ghstack-poisoned]
ghstack-source-id: 0980f1bd53adf7b8fae9f06f9666d9fc5d8e03e7 Pull Request resolved: #98848
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
Fixes the fake tensor (and symint) issues with #98571.
In particular,
at::detail::scalar_tensor_static()
seems like a footgun when used in code that needs to be traceable, so we may want to audit its usages more carefully.Stack from ghstack (oldest at bottom):
cc @voznesenskym @penguinwu @anijain2305 @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @ipiszy @soumith @desertfire