tensor_compat.h 4.0 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/* Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */

#pragma once

17
#include "paddle/phi/api/include/api.h"
18
#include "paddle/phi/api/include/tensor.h"
19 20 21 22 23 24

// Note(chenweihang): In order to be compatible with the original custom
// operator Tensor interface, only available to external users, the file
// cannot be includeed in paddle

namespace paddle {
25 26
using Tensor = experimental::Tensor;
// using several Tensor initialize functions in paddle namespace
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
using experimental::abs;
using experimental::acos;
using experimental::acosh;
using experimental::add;
using experimental::allclose;
using experimental::argsort;
using experimental::asin;
using experimental::asinh;
using experimental::atan;
using experimental::atan2;
using experimental::atanh;
using experimental::bernoulli;
using experimental::ceil;
using experimental::cholesky;
using experimental::cholesky_solve;
using experimental::clip;
using experimental::concat;
using experimental::conj;
using experimental::cos;
using experimental::cosh;
using experimental::cross;
using experimental::det;
using experimental::diag;
using experimental::diagonal;
using experimental::digamma;
using experimental::dist;
using experimental::divide;
using experimental::dot;
using experimental::elu;
56
using experimental::empty;
57 58 59 60 61 62 63 64 65 66 67
using experimental::empty_like;
using experimental::equal_all;
using experimental::erf;
using experimental::erfinv;
using experimental::exp;
using experimental::expand;
using experimental::expm1;
using experimental::flatten;
using experimental::flip;
using experimental::floor;
using experimental::floor_divide;
68
using experimental::full;
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
using experimental::gather;
using experimental::gather_nd;
using experimental::gelu;
using experimental::gumbel_softmax;
using experimental::imag;
using experimental::increment;
using experimental::index_sample;
using experimental::is_empty;
using experimental::isclose;
using experimental::isfinite;
using experimental::isinf;
using experimental::isnan;
using experimental::kron;
using experimental::kthvalue;
using experimental::label_smooth;
using experimental::lerp;
using experimental::lgamma;
using experimental::log;
using experimental::log10;
using experimental::log1p;
using experimental::log2;
using experimental::logit;
using experimental::masked_select;
using experimental::matmul;
using experimental::matrix_power;
using experimental::maximum;
using experimental::maxout;
using experimental::minimum;
using experimental::mode;
using experimental::multi_dot;
using experimental::multinomial;
using experimental::multiply;
using experimental::mv;
using experimental::nll_loss;
using experimental::one_hot;
using experimental::pixel_shuffle;
using experimental::poisson;
using experimental::qr;
using experimental::real;
using experimental::reciprocal;
using experimental::relu;
using experimental::reshape;
using experimental::roll;
using experimental::round;
using experimental::rsqrt;
using experimental::scatter;
using experimental::scatter_nd_add;
using experimental::selu;
using experimental::sign;
using experimental::silu;
using experimental::sin;
using experimental::sinh;
using experimental::split;
using experimental::sqrt;
using experimental::square;
using experimental::stack;
using experimental::strided_slice;
using experimental::subtract;
using experimental::tanh;
using experimental::thresholded_relu;
using experimental::tile;
using experimental::trace;
using experimental::triangular_solve;
using experimental::unbind;
using experimental::unique;
using experimental::unsqueeze;
using experimental::where;

137
}  // namespace paddle