Skip to content

Commit

Permalink
Enabled where for bool tensor on CUDA (#26430)
Browse files Browse the repository at this point in the history
Summary:
Enabled "where_cuda" for bool tensors on CUDA
Fixing pytorch/pytorch#26247
Tested via unit tests
Pull Request resolved: pytorch/pytorch#26430

Differential Revision: D17464181

Pulled By: izdeby

fbshipit-source-id: cbb09925753b2e6f35e7400da3243d4d3fc86b69
  • Loading branch information
izdeby authored and facebook-github-bot committed Sep 19, 2019
1 parent 1a626f1 commit d525d8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aten/src/ATen/native/cuda/TensorCompare.cu
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Tensor _s_where_cuda(
const Tensor& self,
const Tensor& other) {
Tensor ret = at::empty(self.sizes(), self.options());
AT_DISPATCH_ALL_TYPES_AND(at::ScalarType::Half, ret.scalar_type(), "where_cuda", [&] {
AT_DISPATCH_ALL_TYPES_AND2(at::ScalarType::Half, at::ScalarType::Bool, ret.scalar_type(), "where_cuda", [&] {
where_cuda<scalar_t>(ret, condition, self, other);
});
return ret;
Expand Down

0 comments on commit d525d8c

Please sign in to comment.