You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.0 KiB
34 lines
1.0 KiB
#if !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)
|
|
// Ternary and higher-order pointwise operations
|
|
#pragma once
|
|
|
|
#include <ATen/native/DispatchStub.h>
|
|
|
|
namespace c10 {
|
|
class Scalar;
|
|
}
|
|
|
|
namespace at {
|
|
|
|
struct TensorIterator;
|
|
struct TensorIteratorBase;
|
|
|
|
namespace native {
|
|
|
|
using pointwise_fn = void (*)(TensorIterator&, const Scalar& scalar);
|
|
using structured_pointwise_fn = void (*)(TensorIteratorBase&, const Scalar& scalar);
|
|
using pointwise_fn_double = void (*)(TensorIterator&, const Scalar&, double);
|
|
|
|
DECLARE_DISPATCH(structured_pointwise_fn, addcmul_stub)
|
|
DECLARE_DISPATCH(structured_pointwise_fn, addcdiv_stub)
|
|
DECLARE_DISPATCH(pointwise_fn_double, smooth_l1_backward_stub)
|
|
DECLARE_DISPATCH(pointwise_fn_double, huber_backward_stub)
|
|
DECLARE_DISPATCH(pointwise_fn, mse_backward_stub)
|
|
|
|
} // namespace native
|
|
} // namespace at
|
|
|
|
#else
|
|
#error "This file should not be included when either TORCH_STABLE_ONLY or TORCH_TARGET_VERSION is defined."
|
|
#endif // !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)
|