Skip to content
Closed
119 changes: 57 additions & 62 deletions aten/src/ATen/Declarations.cwrap

Large diffs are not rendered by default.

215 changes: 142 additions & 73 deletions aten/src/ATen/core/Tensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@ class CAFFE2_API Tensor {
//Tensor * add(Tensor & b);
int64_t _th_storage_offset() const;
int64_t _th_ndimension() const;
Tensor & _th_resize_(IntList size);
Tensor & _th_set_(Storage source);
Tensor & _th_set_(Storage source, int64_t storage_offset, IntList size, IntList stride={});
Tensor & _th_set_(const Tensor & source);
Expand All @@ -271,19 +270,19 @@ class CAFFE2_API Tensor {
Tensor & _th_masked_fill_(const Tensor & mask, Scalar value);
Tensor & _th_masked_fill_(const Tensor & mask, const Tensor & value);
Tensor & _th_masked_scatter_(const Tensor & mask, const Tensor & source);
Tensor masked_select(const Tensor & mask) const;
Tensor nonzero() const;
Tensor _th_masked_select(const Tensor & mask) const;
Tensor _th_nonzero() const;
Tensor _th_view(IntList size) const;
Tensor index_select(int64_t dim, const Tensor & index) const;
Tensor take(const Tensor & index) const;
Tensor & put_(const Tensor & index, const Tensor & source, bool accumulate=false);
Tensor & index_add_(int64_t dim, const Tensor & index, const Tensor & source);
Tensor & index_fill_(int64_t dim, const Tensor & index, Scalar value);
Tensor & index_fill_(int64_t dim, const Tensor & index, const Tensor & value);
Tensor _th_index_select(int64_t dim, const Tensor & index) const;
Tensor _th_take(const Tensor & index) const;
Tensor & _th_put_(const Tensor & index, const Tensor & source, bool accumulate=false);
Tensor & _th_index_add_(int64_t dim, const Tensor & index, const Tensor & source);
Tensor & _th_index_fill_(int64_t dim, const Tensor & index, Scalar value);
Tensor & _th_index_fill_(int64_t dim, const Tensor & index, const Tensor & value);
Tensor unfold(int64_t dimension, int64_t size, int64_t step) const;
Tensor & scatter_(int64_t dim, const Tensor & index, const Tensor & src);
Tensor & scatter_(int64_t dim, const Tensor & index, Scalar value);
Tensor & scatter_add_(int64_t dim, const Tensor & index, const Tensor & src);
Tensor & _th_scatter_(int64_t dim, const Tensor & index, const Tensor & src);
Tensor & _th_scatter_(int64_t dim, const Tensor & index, Scalar value);
Tensor & _th_scatter_add_(int64_t dim, const Tensor & index, const Tensor & src);
Tensor gather(int64_t dim, const Tensor & index) const;
void* data_ptr() const;
bool equal(const Tensor & other) const;
Expand All @@ -307,30 +306,30 @@ class CAFFE2_API Tensor {
Tensor __rshift__(const Tensor & other) const;
Tensor & __irshift__(Scalar other);
Tensor & __irshift__(const Tensor & other);
Tensor lt(Scalar other) const;
Tensor lt(const Tensor & other) const;
Tensor & lt_(Scalar other);
Tensor & lt_(const Tensor & other);
Tensor gt(Scalar other) const;
Tensor gt(const Tensor & other) const;
Tensor & gt_(Scalar other);
Tensor & gt_(const Tensor & other);
Tensor le(Scalar other) const;
Tensor le(const Tensor & other) const;
Tensor & le_(Scalar other);
Tensor & le_(const Tensor & other);
Tensor ge(Scalar other) const;
Tensor ge(const Tensor & other) const;
Tensor & ge_(Scalar other);
Tensor & ge_(const Tensor & other);
Tensor eq(Scalar other) const;
Tensor eq(const Tensor & other) const;
Tensor & eq_(Scalar other);
Tensor & eq_(const Tensor & other);
Tensor ne(Scalar other) const;
Tensor ne(const Tensor & other) const;
Tensor & ne_(Scalar other);
Tensor & ne_(const Tensor & other);
Tensor _th_lt(Scalar other) const;
Tensor _th_lt(const Tensor & other) const;
Tensor & _th_lt_(Scalar other);
Tensor & _th_lt_(const Tensor & other);
Tensor _th_gt(Scalar other) const;
Tensor _th_gt(const Tensor & other) const;
Tensor & _th_gt_(Scalar other);
Tensor & _th_gt_(const Tensor & other);
Tensor _th_le(Scalar other) const;
Tensor _th_le(const Tensor & other) const;
Tensor & _th_le_(Scalar other);
Tensor & _th_le_(const Tensor & other);
Tensor _th_ge(Scalar other) const;
Tensor _th_ge(const Tensor & other) const;
Tensor & _th_ge_(Scalar other);
Tensor & _th_ge_(const Tensor & other);
Tensor _th_eq(Scalar other) const;
Tensor _th_eq(const Tensor & other) const;
Tensor & _th_eq_(Scalar other);
Tensor & _th_eq_(const Tensor & other);
Tensor _th_ne(Scalar other) const;
Tensor _th_ne(const Tensor & other) const;
Tensor & _th_ne_(Scalar other);
Tensor & _th_ne_(const Tensor & other);
Tensor min(const Tensor & other) const;
Tensor min() const;
Tensor max(const Tensor & other) const;
Expand All @@ -341,53 +340,53 @@ class CAFFE2_API Tensor {
Tensor all() const;
Tensor any() const;
Tensor lgamma() const;
Tensor & lgamma_();
Tensor & _th_lgamma_();
Tensor digamma() const;
Tensor & digamma_();
Tensor & _th_digamma_();
Tensor polygamma(int64_t n) const;
Tensor & polygamma_(int64_t n);
Tensor & erfinv_();
Tensor & _th_polygamma_(int64_t n);
Tensor & _th_erfinv_();
Tensor erfinv() const;
Tensor & frac_();
Tensor & _th_frac_();
Tensor frac() const;
Tensor renorm(Scalar p, int64_t dim, Scalar maxnorm) const;
Tensor & renorm_(Scalar p, int64_t dim, Scalar maxnorm);
Tensor & _th_renorm_(Scalar p, int64_t dim, Scalar maxnorm);
Tensor dist(const Tensor & other, Scalar p=2) const;
Tensor reciprocal() const;
Tensor & reciprocal_();
Tensor & _th_reciprocal_();
Tensor neg() const;
Tensor & neg_();
Tensor & _th_neg_();
Tensor atan2(const Tensor & other) const;
Tensor & atan2_(const Tensor & other);
Tensor & _th_atan2_(const Tensor & other);
Tensor pow(const Tensor & exponent) const;
Tensor & pow_(Scalar exponent);
Tensor & pow_(const Tensor & exponent);
Tensor & _th_pow_(Scalar exponent);
Tensor & _th_pow_(const Tensor & exponent);
Tensor lerp(const Tensor & end, Scalar weight) const;
Tensor & lerp_(const Tensor & end, Scalar weight);
Tensor & _th_lerp_(const Tensor & end, Scalar weight);
Tensor histc(int64_t bins=100, Scalar min=0, Scalar max=0) const;
Tensor sign() const;
Tensor & sign_();
Tensor trace() const;
Tensor & _th_sign_();
Tensor _th_trace() const;
Tensor fmod(Scalar other) const;
Tensor fmod(const Tensor & other) const;
Tensor & fmod_(Scalar other);
Tensor & fmod_(const Tensor & other);
Tensor & _th_fmod_(Scalar other);
Tensor & _th_fmod_(const Tensor & other);
Tensor remainder(Scalar other) const;
Tensor remainder(const Tensor & other) const;
Tensor & remainder_(Scalar other);
Tensor & remainder_(const Tensor & other);
Tensor tril(int64_t diagonal=0) const;
Tensor & tril_(int64_t diagonal=0);
Tensor triu(int64_t diagonal=0) const;
Tensor & triu_(int64_t diagonal=0);
Tensor cross(const Tensor & other, int64_t dim=-1) const;
Tensor diag(int64_t diagonal=0) const;
Tensor & _th_remainder_(Scalar other);
Tensor & _th_remainder_(const Tensor & other);
Tensor _th_tril(int64_t diagonal=0) const;
Tensor & _th_tril_(int64_t diagonal=0);
Tensor _th_triu(int64_t diagonal=0) const;
Tensor & _th_triu_(int64_t diagonal=0);
Tensor _th_cross(const Tensor & other, int64_t dim=-1) const;
Tensor _th_diag(int64_t diagonal=0) const;
Tensor addbmm(const Tensor & batch1, const Tensor & batch2, Scalar beta=1, Scalar alpha=1) const;
Tensor & addbmm_(const Tensor & batch1, const Tensor & batch2, Scalar beta=1, Scalar alpha=1);
Tensor & _th_addbmm_(const Tensor & batch1, const Tensor & batch2, Scalar beta=1, Scalar alpha=1);
Tensor addcmul(const Tensor & tensor1, const Tensor & tensor2, Scalar value=1) const;
Tensor & addcmul_(const Tensor & tensor1, const Tensor & tensor2, Scalar value=1);
Tensor & _th_addcmul_(const Tensor & tensor1, const Tensor & tensor2, Scalar value=1);
Tensor addcdiv(const Tensor & tensor1, const Tensor & tensor2, Scalar value=1) const;
Tensor & addcdiv_(const Tensor & tensor1, const Tensor & tensor2, Scalar value=1);
Tensor & _th_addcdiv_(const Tensor & tensor1, const Tensor & tensor2, Scalar value=1);
std::tuple<Tensor,Tensor> gels(const Tensor & A) const;
std::tuple<Tensor,Tensor> trtrs(const Tensor & A, bool upper=true, bool transpose=false, bool unitriangular=false) const;
std::tuple<Tensor,Tensor> symeig(bool eigenvectors=false, bool upper=true) const;
Expand All @@ -404,16 +403,16 @@ class CAFFE2_API Tensor {
std::tuple<Tensor,Tensor> btrifact(bool pivot=true) const;
std::tuple<Tensor,Tensor,Tensor> btrifact_with_info(bool pivot=true) const;
Tensor btrisolve(const Tensor & LU_data, const Tensor & LU_pivots) const;
Tensor & random_(int64_t from, int64_t to, Generator * generator=nullptr);
Tensor & random_(int64_t to, Generator * generator=nullptr);
Tensor & random_(Generator * generator=nullptr);
Tensor & _th_random_(int64_t from, int64_t to, Generator * generator=nullptr);
Tensor & _th_random_(int64_t to, Generator * generator=nullptr);
Tensor & _th_random_(Generator * generator=nullptr);
Tensor multinomial(int64_t num_samples, bool replacement=false, Generator * generator=nullptr) const;
Tensor & uniform_(double from=0, double to=1, Generator * generator=nullptr);
Tensor & normal_(double mean=0, double std=1, Generator * generator=nullptr);
Tensor & cauchy_(double median=0, double sigma=1, Generator * generator=nullptr);
Tensor & log_normal_(double mean=1, double std=2, Generator * generator=nullptr);
Tensor & exponential_(double lambd=1, Generator * generator=nullptr);
Tensor & geometric_(double p, Generator * generator=nullptr);
Tensor & _th_uniform_(double from=0, double to=1, Generator * generator=nullptr);
Tensor & _th_normal_(double mean=0, double std=1, Generator * generator=nullptr);
Tensor & _th_cauchy_(double median=0, double sigma=1, Generator * generator=nullptr);
Tensor & _th_log_normal_(double mean=1, double std=2, Generator * generator=nullptr);
Tensor & _th_exponential_(double lambd=1, Generator * generator=nullptr);
Tensor & _th_geometric_(double p, Generator * generator=nullptr);
Tensor alias() const;
Tensor abs() const;
Tensor & abs_();
Expand Down Expand Up @@ -655,7 +654,6 @@ class CAFFE2_API Tensor {
Tensor to(const Tensor & other, bool non_blocking=false, bool copy=false) const;
Scalar _local_scalar() const;
int64_t storage_offset() const;
Tensor & resize_(IntList size);
Tensor & set_(Storage source);
Tensor & set_(Storage source, int64_t storage_offset, IntList size, IntList stride={});
Tensor & set_(const Tensor & source);
Expand All @@ -666,6 +664,77 @@ class CAFFE2_API Tensor {
Tensor & masked_fill_(const Tensor & mask, const Tensor & value);
Tensor & masked_scatter_(const Tensor & mask, const Tensor & source);
Tensor view(IntList size) const;
Tensor & put_(const Tensor & index, const Tensor & source, bool accumulate=false);
Tensor & index_add_(int64_t dim, const Tensor & index, const Tensor & source);
Tensor & index_fill_(int64_t dim, const Tensor & index, Scalar value);
Tensor & index_fill_(int64_t dim, const Tensor & index, const Tensor & value);
Tensor & scatter_(int64_t dim, const Tensor & index, const Tensor & src);
Tensor & scatter_(int64_t dim, const Tensor & index, Scalar value);
Tensor & scatter_add_(int64_t dim, const Tensor & index, const Tensor & src);
Tensor & lt_(Scalar other);
Tensor & lt_(const Tensor & other);
Tensor & gt_(Scalar other);
Tensor & gt_(const Tensor & other);
Tensor & le_(Scalar other);
Tensor & le_(const Tensor & other);
Tensor & ge_(Scalar other);
Tensor & ge_(const Tensor & other);
Tensor & eq_(Scalar other);
Tensor & eq_(const Tensor & other);
Tensor & ne_(Scalar other);
Tensor & ne_(const Tensor & other);
Tensor & lgamma_();
Tensor & atan2_(const Tensor & other);
Tensor & tril_(int64_t diagonal=0);
Tensor & triu_(int64_t diagonal=0);
Tensor & digamma_();
Tensor & polygamma_(int64_t n);
Tensor & erfinv_();
Tensor & frac_();
Tensor & renorm_(Scalar p, int64_t dim, Scalar maxnorm);
Tensor & reciprocal_();
Tensor & neg_();
Tensor & pow_(Scalar exponent);
Tensor & pow_(const Tensor & exponent);
Tensor & lerp_(const Tensor & end, Scalar weight);
Tensor & sign_();
Tensor & fmod_(Scalar other);
Tensor & fmod_(const Tensor & other);
Tensor & remainder_(Scalar other);
Tensor & remainder_(const Tensor & other);
Tensor & addbmm_(const Tensor & batch1, const Tensor & batch2, Scalar beta=1, Scalar alpha=1);
Tensor & addcmul_(const Tensor & tensor1, const Tensor & tensor2, Scalar value=1);
Tensor & addcdiv_(const Tensor & tensor1, const Tensor & tensor2, Scalar value=1);
Tensor & random_(int64_t from, int64_t to, Generator * generator=nullptr);
Tensor & random_(int64_t to, Generator * generator=nullptr);
Tensor & random_(Generator * generator=nullptr);
Tensor & uniform_(double from=0, double to=1, Generator * generator=nullptr);
Tensor & normal_(double mean=0, double std=1, Generator * generator=nullptr);
Tensor & cauchy_(double median=0, double sigma=1, Generator * generator=nullptr);
Tensor & log_normal_(double mean=1, double std=2, Generator * generator=nullptr);
Tensor & exponential_(double lambd=1, Generator * generator=nullptr);
Tensor & geometric_(double p, Generator * generator=nullptr);
Tensor diag(int64_t diagonal=0) const;
Tensor cross(const Tensor & other, int64_t dim=-1) const;
Tensor triu(int64_t diagonal=0) const;
Tensor tril(int64_t diagonal=0) const;
Tensor trace() const;
Tensor ne(Scalar other) const;
Tensor ne(const Tensor & other) const;
Tensor eq(Scalar other) const;
Tensor eq(const Tensor & other) const;
Tensor ge(Scalar other) const;
Tensor ge(const Tensor & other) const;
Tensor le(Scalar other) const;
Tensor le(const Tensor & other) const;
Tensor gt(Scalar other) const;
Tensor gt(const Tensor & other) const;
Tensor lt(Scalar other) const;
Tensor lt(const Tensor & other) const;
Tensor take(const Tensor & index) const;
Tensor index_select(int64_t dim, const Tensor & index) const;
Tensor masked_select(const Tensor & mask) const;
Tensor nonzero() const;

template <typename F, typename... Args>
auto m(F func, Args&&... params) const -> decltype(func(*this, std::forward<Args>(params)...)) {
Expand Down
Loading