Summary:
Sorry for not sending these fixes in a single PR. I found this compiler warning when I was working on something else, and I just go to GitHub and modify the file directly for convenience...
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18406
Differential Revision:
D14594180
Pulled By: soumith
fbshipit-source-id:
92f48513bc62fbe2c67c759d68830a973296e43b
}
auto tmp_values = self.clone().view(-1);
auto result = at::empty({1}, self.options());
- AT_DISPATCH_ALL_TYPES(self.type(), "median", [&] {
+ AT_DISPATCH_ALL_TYPES(self.scalar_type(), "median", [&] {
// note, quick_select is 0 based while kthvalue is not
int64_t k = (tmp_values.size(0) - 1) / 2;
auto val_accessor = tmp_values.accessor<scalar_t, 1>();