8000 try to fix failures · pytorch/pytorch@4f91955 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4f91955

Browse files
committed
try to fix failures
1 parent 65a038f commit 4f91955

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

aten/src/ATen/native/cuda/UnaryFractionKernels.cu

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,18 +104,18 @@ void reciprocal_kernel_cuda(TensorIteratorBase& iter) {
104104
#if AT_USE_JITERATOR()
105105
static const auto reciprocal_string = jiterator_stringify(
106106
template <typename T>
107-
T reciprocal_kernel(c10::complex<T> v) {
107+
T reciprocal_kernel(T v) {
108108
// Handle extreme cases for numpy compatibility
109109
auto both_inf = [](T real, T imag) {
110-
return ::isinf(real) && ::isinf(imag);
110+
return std::isinf(real) && std::isinf(imag);
111111
};
112112

113113
auto either_inf = [](T real, T imag) {
114-
return ::isinf(real) || ::isinf(imag);
114+
return std::isinf(real) || std::isinf(imag);
115115
};
116116

117117
auto either_nan = [](T real, T imag) {
118-
return ::isnan(real) || ::isnan(imag);
118+
return std::isnan(real) || std::isnan(imag);
119119
};
120120

121121
if (either_nan(v.real(), v.imag()) || both_inf(v.real(), v.imag())) {
@@ -138,7 +138,7 @@ void reciprocal_kernel_cuda(TensorIteratorBase& iter) {
138138
});
139139
#else
140140
AT_DISPATCH_COMPLEX_TYPES(dtype, "reciprocal_cuda", [&]() {
141-
gpu_kernel(iter, []GPU_LAMBDA(scalar_t a) {
141+
gpu_kernel(iter, []GPU_LAMBDA(scalar_t a) -> scalar_t {
142142
return reciprocal_wrapper(a);
143143
});
144144
});

0 commit comments

Comments
 (0)
0