Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions aten/src/ATen/native/cuda/UnarySignKernels.cu
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ void logical_not_kernel_cuda(TensorIterator& iter) {

void neg_kernel_cuda(TensorIterator& iter) {
AT_DISPATCH_ALL_TYPES_AND_COMPLEX_AND2(ScalarType::Half, at::ScalarType::BFloat16, iter.dtype(), "neg_cuda", [&]() {
AT_SKIP_BFLOAT16_IF_NOT_ROCM(scalar_t, "neg_cuda", [&] {
gpu_kernel(iter, []GPU_LAMBDA(scalar_t a) -> scalar_t {
return -a;
});
gpu_kernel(iter, []GPU_LAMBDA(scalar_t a) -> scalar_t {
return -a;
});
});
}
Expand Down
2 changes: 1 addition & 1 deletion torch/testing/_internal/common_methods_invocations.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def sample_inputs(self, device, dtype, requires_grad=False):
ref=np.negative,
dtypes=all_types_and_complex_and(torch.half, torch.bfloat16),
dtypesIfCPU=all_types_and_complex_and(torch.half, torch.bfloat16),
dtypesIfCUDA=all_types_and_complex_and(torch.half)),
dtypesIfCUDA=all_types_and_complex_and(torch.half, torch.bfloat16)),
UnaryUfuncInfo('sin',
ref=np.sin,
handles_large_floats=False,
Expand Down