mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
[10/N] Fix Wextra-semi warning (#140880)
Fixes #ISSUE_NUMBER Pull Request resolved: https://github.com/pytorch/pytorch/pull/140880 Approved by: https://github.com/ezyang
This commit is contained in:
@ -339,18 +339,18 @@ class Vectorized<c10::BFloat16> : public Vectorized16<at_bfloat16x8_t, c10::BFlo
|
||||
return map2_bitmask_with_vec_float_method(other, &Vectorized<float>::name); \
|
||||
}
|
||||
|
||||
DEFINE_UNARY_ELEMENTWISE_FUNC_VIA_FLOAT_METHOD(abs);
|
||||
DEFINE_UNARY_ELEMENTWISE_FUNC_VIA_FLOAT_METHOD(abs)
|
||||
Vectorized frac() const;
|
||||
DEFINE_UNARY_ELEMENTWISE_FUNC_VIA_FLOAT_METHOD(neg);
|
||||
DEFINE_UNARY_ELEMENTWISE_FUNC_VIA_FLOAT_METHOD(trunc);
|
||||
DEFINE_UNARY_ELEMENTWISE_FUNC_VIA_FLOAT_METHOD(sqrt);
|
||||
DEFINE_UNARY_ELEMENTWISE_FUNC_VIA_FLOAT_METHOD(reciprocal);
|
||||
DEFINE_BINARY_COMPARISON_OPERATOR_VIA_FLOAT_METHOD(operator==);
|
||||
DEFINE_BINARY_COMPARISON_OPERATOR_VIA_FLOAT_METHOD(operator!=);
|
||||
DEFINE_BINARY_COMPARISON_OPERATOR_VIA_FLOAT_METHOD(operator<);
|
||||
DEFINE_BINARY_COMPARISON_OPERATOR_VIA_FLOAT_METHOD(operator<=);
|
||||
DEFINE_BINARY_COMPARISON_OPERATOR_VIA_FLOAT_METHOD(operator>);
|
||||
DEFINE_BINARY_COMPARISON_OPERATOR_VIA_FLOAT_METHOD(operator>=);
|
||||
DEFINE_UNARY_ELEMENTWISE_FUNC_VIA_FLOAT_METHOD(neg)
|
||||
DEFINE_UNARY_ELEMENTWISE_FUNC_VIA_FLOAT_METHOD(trunc)
|
||||
DEFINE_UNARY_ELEMENTWISE_FUNC_VIA_FLOAT_METHOD(sqrt)
|
||||
DEFINE_UNARY_ELEMENTWISE_FUNC_VIA_FLOAT_METHOD(reciprocal)
|
||||
DEFINE_BINARY_COMPARISON_OPERATOR_VIA_FLOAT_METHOD(operator==)
|
||||
DEFINE_BINARY_COMPARISON_OPERATOR_VIA_FLOAT_METHOD(operator!=)
|
||||
DEFINE_BINARY_COMPARISON_OPERATOR_VIA_FLOAT_METHOD(operator<)
|
||||
DEFINE_BINARY_COMPARISON_OPERATOR_VIA_FLOAT_METHOD(operator<=)
|
||||
DEFINE_BINARY_COMPARISON_OPERATOR_VIA_FLOAT_METHOD(operator>)
|
||||
DEFINE_BINARY_COMPARISON_OPERATOR_VIA_FLOAT_METHOD(operator>=)
|
||||
|
||||
#undef DEFINE_UNARY_ELEMENTWISE_FUNC_VIA_FLOAT_METHOD
|
||||
#undef DEFINE_BINARY_ELEMENTWISE_FUNC_VIA_FLOAT_METHOD
|
||||
|
@ -303,8 +303,8 @@ public:
|
||||
Vectorized<float> exp_u20() const {
|
||||
return exp();
|
||||
}
|
||||
DEFINE_SLEEF_COMPATIBLE_BINARY_ELEMENTWISE_FUNC_WITH_SLEEF_NAME(fmod, Sleef_fmodf4);
|
||||
DEFINE_SLEEF_COMPATIBLE_BINARY_ELEMENTWISE_FUNC_WITH_SLEEF_NAME(hypot, Sleef_hypotf4_u05);
|
||||
DEFINE_SLEEF_COMPATIBLE_BINARY_ELEMENTWISE_FUNC_WITH_SLEEF_NAME(fmod, Sleef_fmodf4)
|
||||
DEFINE_SLEEF_COMPATIBLE_BINARY_ELEMENTWISE_FUNC_WITH_SLEEF_NAME(hypot, Sleef_hypotf4_u05)
|
||||
Vectorized<float> i0() const {
|
||||
return map(calc_i0);
|
||||
}
|
||||
|
@ -234,7 +234,7 @@ class Vectorized<c10::Half> : public Vectorized16<float16x8_t, c10::Half, BlendH
|
||||
}
|
||||
return loadu(res);
|
||||
#endif
|
||||
};
|
||||
}
|
||||
bool has_inf_nan() const {
|
||||
__at_align__ c10::Half tmp[size()];
|
||||
store(tmp);
|
||||
|
@ -38,8 +38,8 @@ CAFFE_KNOWN_TYPE(c10::intrusive_ptr<LinearPackedParamsBase>)
|
||||
#ifdef USE_FBGEMM
|
||||
namespace caffe2 {
|
||||
// Required for cpp_custom_type_hack to work
|
||||
CAFFE_KNOWN_TYPE(fbgemm::PackBMatrix<int8_t>);
|
||||
CAFFE_KNOWN_TYPE(c10::intrusive_ptr<PackedLinearWeightFp16>);
|
||||
CAFFE_KNOWN_TYPE(fbgemm::PackBMatrix<int8_t>)
|
||||
CAFFE_KNOWN_TYPE(c10::intrusive_ptr<PackedLinearWeightFp16>)
|
||||
} // namespace caffe2
|
||||
#endif // USE_FBGEMM
|
||||
|
||||
|
@ -313,7 +313,7 @@ AT_DISPATCH_CASE(at::ScalarType::{dtype},
|
||||
{ufunctors}
|
||||
|
||||
{stub_sig.type_defn()};
|
||||
{stub_sig.dispatch_decl()};
|
||||
{stub_sig.dispatch_decl()}
|
||||
|
||||
{stub_sig.kernel_defn()} {{
|
||||
AT_DISPATCH_SWITCH(iter.common_dtype(), "{sig.name}",
|
||||
@ -386,7 +386,7 @@ def compute_ufunc_cpu(g: NativeFunctionsGroup) -> str:
|
||||
|
||||
return f"""
|
||||
{stub_sig.type_defn()};
|
||||
{stub_sig.dispatch_decl()};
|
||||
{stub_sig.dispatch_decl()}
|
||||
{stub_sig.dispatch_defn()};
|
||||
|
||||
{sig.defn()} {{
|
||||
@ -546,6 +546,6 @@ namespace {{
|
||||
}} // anonymous namespace
|
||||
|
||||
{stub_sig.type_defn()};
|
||||
{stub_sig.dispatch_decl()};
|
||||
{stub_sig.dispatch_decl()}
|
||||
REGISTER_DISPATCH({stub_sig.name}, &{stub_sig.kernel_name})
|
||||
"""
|
||||
|
Reference in New Issue
Block a user