若API未标明支持情况,则代表该API的支持情况待验证。
API名称 |
是否支持 |
限制与说明 |
---|---|---|
torch.Tensor |
是 |
|
Tensor.T |
是 |
|
Tensor.new_tensor |
||
Tensor.new_full |
||
Tensor.new_empty |
||
Tensor.new_ones |
||
Tensor.new_zeros |
||
Tensor.grad |
是 |
|
Tensor.ndim |
是 |
|
Tensor.abs |
是 |
|
Tensor.abs_ |
||
Tensor.absolute |
||
Tensor.absolute_ |
||
Tensor.acos |
||
Tensor.acos_ |
||
Tensor.arccos |
||
Tensor.arccos_ |
||
Tensor.add |
否 |
|
Tensor.add_ |
否 |
|
Tensor.addbmm |
||
Tensor.addbmm_ |
||
Tensor.addcdiv |
||
Tensor.addcdiv_ |
||
Tensor.addcmul |
||
Tensor.addcmul_ |
||
Tensor.addmm |
||
Tensor.addmm_ |
||
Tensor.sspaddmm |
||
Tensor.addmv |
||
Tensor.addmv_ |
||
Tensor.addr |
||
Tensor.addr_ |
||
Tensor.adjoint |
否 |
|
Tensor.allclose |
||
Tensor.amax |
||
Tensor.amin |
||
Tensor.aminmax |
否 |
|
Tensor.angle |
否 |
|
Tensor.apply_ |
||
Tensor.argmax |
否 |
|
Tensor.argmin |
否 |
|
Tensor.argsort |
否 |
|
Tensor.argwhere |
||
Tensor.asin |
||
Tensor.asin_ |
||
Tensor.arcsin |
||
Tensor.arcsin_ |
||
Tensor.as_strided |
||
Tensor.atan |
||
Tensor.atan_ |
||
Tensor.arctan |
||
Tensor.arctan_ |
||
Tensor.atan2 |
||
Tensor.atan2_ |
||
Tensor.arctan2 |
||
Tensor.arctan2_ |
||
Tensor.all |
||
Tensor.any |
||
Tensor.backward |
是 |
|
Tensor.baddbmm |
||
Tensor.baddbmm_ |
||
Tensor.bernoulli |
||
Tensor.bernoulli_ |
||
Tensor.bfloat16 |
||
Tensor.bincount |
是 |
|
Tensor.bitwise_not |
||
Tensor.bitwise_not_ |
||
Tensor.bitwise_and |
||
Tensor.bitwise_and_ |
||
Tensor.bitwise_or |
||
Tensor.bitwise_or_ |
||
Tensor.bitwise_xor |
||
Tensor.bitwise_xor_ |
||
Tensor.bitwise_left_shift |
否 |
|
Tensor.bitwise_left_shift_ |
||
Tensor.bitwise_right_shift |
否 |
|
Tensor.bitwise_right_shift_ |
||
Tensor.bmm |
||
Tensor.bool |
是 |
|
Tensor.byte |
||
Tensor.broadcast_to |
||
Tensor.cauchy_ |
||
Tensor.ceil |
||
Tensor.ceil_ |
||
Tensor.char |
||
Tensor.cholesky |
否 |
|
Tensor.cholesky_inverse |
否 |
|
Tensor.cholesky_solve |
否 |
|
Tensor.chunk |
是 |
|
Tensor.clamp |
||
Tensor.clamp_ |
||
Tensor.clip |
||
Tensor.clip_ |
||
Tensor.clone |
是 |
|
Tensor.contiguous |
是 |
|
Tensor.copy_ |
是 |
|
Tensor.conj |
否 |
|
Tensor.conj_physical |
否 |
|
Tensor.conj_physical_ |
||
Tensor.resolve_conj |
否 |
|
Tensor.resolve_neg |
否 |
|
Tensor.copysign |
||
Tensor.copysign_ |
||
Tensor.cos |
||
Tensor.cos_ |
||
Tensor.cosh |
||
Tensor.cosh_ |
||
Tensor.corrcoef |
||
Tensor.count_nonzero |
||
Tensor.cov |
||
Tensor.acosh |
||
Tensor.acosh_ |
||
Tensor.arccosh |
||
Tensor.arccosh_ |
||
Tensor.cpu |
||
Tensor.cross |
||
Tensor.cuda |
||
Tensor.logcumsumexp |
否 |
|
Tensor.cummax |
||
Tensor.cummin |
||
Tensor.cumprod |
||
Tensor.cumprod_ |
||
Tensor.cumsum |
||
Tensor.cumsum_ |
||
Tensor.chalf |
否 |
|
Tensor.cfloat |
否 |
|
Tensor.cdouble |
否 |
|
Tensor.data_ptr |
是 |
|
Tensor.deg2rad |
||
Tensor.dequantize |
否 |
|
Tensor.det |
否 |
|
Tensor.dense_dim |
||
Tensor.detach |
是 |
|
Tensor.detach_ |
是 |
|
Tensor.diag |
||
Tensor.diag_embed |
||
Tensor.diagflat |
||
Tensor.diagonal |
是 |
|
Tensor.diagonal_scatter |
否 |
|
Tensor.fill_diagonal_ |
||
Tensor.fmax |
否 |
|
Tensor.fmin |
否 |
|
Tensor.diff |
||
Tensor.digamma |
否 |
|
Tensor.digamma_ |
||
Tensor.dim |
是 |
|
Tensor.dist |
||
Tensor.div |
||
Tensor.div_ |
||
Tensor.divide |
否 |
|
Tensor.divide_ |
||
Tensor.dot |
||
Tensor.double |
是 |
|
Tensor.dsplit |
是 |
|
Tensor.element_size |
是 |
|
Tensor.eq |
||
Tensor.eq_ |
||
Tensor.equal |
||
Tensor.erf |
||
Tensor.erf_ |
||
Tensor.erfc |
||
Tensor.erfc_ |
||
Tensor.erfinv |
||
Tensor.erfinv_ |
||
Tensor.exp |
||
Tensor.exp_ |
||
Tensor.expm1 |
||
Tensor.expm1_ |
||
Tensor.expand |
是 |
|
Tensor.expand_as |
是 |
|
Tensor.exponential_ |
否 |
|
Tensor.fix |
||
Tensor.fix_ |
||
Tensor.fill_ |
||
Tensor.flatten |
是 |
|
Tensor.flip |
是 |
|
Tensor.fliplr |
||
Tensor.flipud |
||
Tensor.float |
是 |
|
Tensor.float_power |
||
Tensor.float_power_ |
||
Tensor.floor |
||
Tensor.floor_ |
||
Tensor.floor_divide |
||
Tensor.floor_divide_ |
||
Tensor.fmod |
||
Tensor.fmod_ |
||
Tensor.frac |
||
Tensor.frac_ |
||
Tensor.frexp |
否 |
|
Tensor.gather |
是 |
|
Tensor.gcd |
否 |
|
Tensor.gcd_ |
||
Tensor.ge |
||
Tensor.ge_ |
||
Tensor.greater_equal |
||
Tensor.greater_equal_ |
||
Tensor.geometric_ |
否 |
|
Tensor.geqrf |
否 |
|
Tensor.ger |
||
Tensor.get_device |
否 |
|
Tensor.gt |
否 |
|
Tensor.gt_ |
否 |
|
Tensor.greater |
||
Tensor.greater_ |
||
Tensor.half |
是 |
|
Tensor.hardshrink |
||
Tensor.heaviside |
否 |
|
Tensor.histc |
||
Tensor.histogram |
否 |
|
Tensor.hsplit |
||
Tensor.hypot |
否 |
|
Tensor.hypot_ |
||
Tensor.i0 |
否 |
|
Tensor.i0_ |
||
Tensor.igamma |
否 |
|
Tensor.igamma_ |
||
Tensor.igammac |
否 |
|
Tensor.igammac_ |
||
Tensor.index_add_ |
是 |
支持fp16,fp32,fp64,int8,int16,int32,int64,uint8,bool。 |
Tensor.index_add |
是 |
支持fp16,fp32,fp64,int8,int16,int32,int64,uint8,bool。 |
Tensor.index_copy_ |
||
Tensor.index_copy |
||
Tensor.index_fill_ |
||
Tensor.index_fill |
||
Tensor.index_put_ |
||
Tensor.index_put |
||
Tensor.index_reduce_ |
否 |
|
Tensor.index_reduce |
否 |
|
Tensor.index_select |
否 |
|
Tensor.indices |
否 |
|
Tensor.inner |
||
Tensor.int |
是 |
|
Tensor.int_repr |
||
Tensor.inverse |
||
Tensor.isclose |
||
Tensor.isfinite |
是 |
|
Tensor.isinf |
||
Tensor.isposinf |
||
Tensor.isneginf |
||
Tensor.isnan |
是 |
|
Tensor.is_contiguous |
是 |
|
Tensor.is_complex |
||
Tensor.is_conj |
||
Tensor.is_floating_point |
是 |
|
Tensor.is_inference |
是 |
|
Tensor.is_pinned |
是 |
|
Tensor.is_set_to |
否 |
|
Tensor.is_shared |
否 |
|
Tensor.is_signed |
是 |
|
Tensor.is_sparse |
是 |
|
Tensor.istft |
否 |
|
Tensor.isreal |
||
Tensor.item |
是 |
|
Tensor.kthvalue |
否 |
|
Tensor.lcm |
否 |
|
Tensor.lcm_ |
||
Tensor.ldexp |
||
Tensor.ldexp_ |
||
Tensor.le |
||
Tensor.le_ |
||
Tensor.less_equal |
||
Tensor.less_equal_ |
||
Tensor.lerp |
||
Tensor.lerp_ |
||
Tensor.lgamma |
否 |
|
Tensor.lgamma_ |
||
Tensor.log |
||
Tensor.log_ |
||
Tensor.logdet |
否 |
|
Tensor.log10 |
||
Tensor.log10_ |
||
Tensor.log1p |
||
Tensor.log1p_ |
||
Tensor.log2 |
||
Tensor.log2_ |
||
Tensor.log_normal_ |
否 |
|
Tensor.logaddexp |
否 |
|
Tensor.logaddexp2 |
否 |
|
Tensor.logsumexp |
||
Tensor.logical_and |
||
Tensor.logical_and_ |
||
Tensor.logical_not |
||
Tensor.logical_not_ |
||
Tensor.logical_or |
||
Tensor.logical_or_ |
||
Tensor.logical_xor |
否 |
|
Tensor.logical_xor_ |
||
Tensor.logit |
否 |
|
Tensor.logit_ |
||
Tensor.long |
是 |
|
Tensor.lt |
否 |
|
Tensor.lt_ |
||
Tensor.less |
||
Tensor.less_ |
||
Tensor.lu |
否 |
|
Tensor.lu_solve |
否 |
|
Tensor.as_subclass |
||
Tensor.map_ |
是 |
只支持CPU,GPU/NPU不支持 |
Tensor.masked_scatter_ |
||
Tensor.masked_scatter |
||
Tensor.masked_fill_ |
是 |
|
Tensor.masked_fill |
是 |
|
Tensor.masked_select |
||
Tensor.matmul |
||
Tensor.matrix_power |
||
Tensor.matrix_exp |
否 |
|
Tensor.max |
||
Tensor.maximum |
||
Tensor.mean |
是 |
|
Tensor.nanmean |
否 |
|
Tensor.median |
||
Tensor.nanmedian |
否 |
|
Tensor.min |
||
Tensor.minimum |
||
Tensor.mm |
||
Tensor.smm |
||
Tensor.mode |
否 |
|
Tensor.movedim |
||
Tensor.moveaxis |
||
Tensor.msort |
否 |
|
Tensor.mul |
||
Tensor.mul_ |
||
Tensor.multiply |
||
Tensor.multiply_ |
||
Tensor.multinomial |
||
Tensor.mv |
||
Tensor.mvlgamma |
否 |
|
Tensor.mvlgamma_ |
||
Tensor.nansum |
否 |
|
Tensor.narrow |
||
Tensor.narrow_copy |
||
Tensor.ndimension |
是 |
|
Tensor.nan_to_num |
否 |
|
Tensor.nan_to_num_ |
||
Tensor.ne |
否 |
|
Tensor.ne_ |
||
Tensor.not_equal |
||
Tensor.not_equal_ |
||
Tensor.neg |
||
Tensor.neg_ |
||
Tensor.negative |
||
Tensor.negative_ |
||
Tensor.nelement |
是 |
|
Tensor.nextafter |
否 |
|
Tensor.nextafter_ |
||
Tensor.nonzero |
是 |
|
Tensor.norm |
||
Tensor.normal_ |
是 |
|
Tensor.numel |
是 |
|
Tensor.numpy |
||
Tensor.orgqr |
否 |
|
Tensor.ormqr |
否 |
|
Tensor.outer |
||
Tensor.permute |
是 |
|
Tensor.pin_memory |
||
Tensor.pinverse |
||
Tensor.polygamma |
否 |
|
Tensor.polygamma_ |
||
Tensor.positive |
||
Tensor.pow |
||
Tensor.pow_ |
||
Tensor.prod |
||
Tensor.put_ |
||
Tensor.qr |
||
Tensor.qscheme |
||
Tensor.quantile |
||
Tensor.nanquantile |
否 |
|
Tensor.q_scale |
||
Tensor.q_zero_point |
||
Tensor.q_per_channel_scales |
||
Tensor.q_per_channel_zero_points |
||
Tensor.q_per_channel_axis |
||
Tensor.rad2deg |
||
Tensor.random_ |
||
Tensor.ravel |
是 |
|
Tensor.reciprocal |
||
Tensor.reciprocal_ |
||
Tensor.record_stream |
||
Tensor.register_hook |
是 |
|
Tensor.remainder |
否 |
|
Tensor.remainder_ |
||
Tensor.renorm |
是 |
支持fp16,fp32。 |
Tensor.renorm_ |
是 |
支持fp16,fp32。 |
Tensor.repeat |
||
Tensor.repeat_interleave |
是 |
|
Tensor.requires_grad_ |
是 |
|
Tensor.reshape |
是 |
|
Tensor.reshape_as |
是 |
|
Tensor.resize_ |
是 |
|
Tensor.resize_as_ |
||
Tensor.retain_grad |
是 |
|
Tensor.retains_grad |
是 |
|
Tensor.roll |
||
Tensor.rot90 |
||
Tensor.round |
||
Tensor.round_ |
||
Tensor.rsqrt |
||
Tensor.rsqrt_ |
||
Tensor.scatter |
||
Tensor.scatter_ |
||
Tensor.scatter_add_ |
||
Tensor.scatter_add |
||
Tensor.scatter_reduce_ |
否 |
|
Tensor.scatter_reduce |
否 |
|
Tensor.select |
是 |
|
Tensor.select_scatter |
||
Tensor.set_ |
||
Tensor.share_memory_ |
否 |
|
Tensor.short |
||
Tensor.sigmoid |
||
Tensor.sigmoid_ |
||
Tensor.sign |
||
Tensor.sign_ |
||
Tensor.signbit |
否 |
|
Tensor.sgn |
否 |
|
Tensor.sgn_ |
||
Tensor.sin |
||
Tensor.sin_ |
||
Tensor.sinc |
否 |
|
Tensor.sinc_ |
||
Tensor.sinh |
||
Tensor.sinh_ |
||
Tensor.asinh |
||
Tensor.asinh_ |
||
Tensor.arcsinh |
||
Tensor.arcsinh_ |
||
Tensor.size |
是 |
|
Tensor.slogdet |
||
Tensor.slice_scatter |
||
Tensor.softmax |
否 |
|
Tensor.sort |
||
Tensor.split |
是 |
|
Tensor.sparse_mask |
||
Tensor.sparse_dim |
||
Tensor.sqrt |
||
Tensor.sqrt_ |
||
Tensor.square |
||
Tensor.square_ |
||
Tensor.squeeze |
是 |
|
Tensor.squeeze_ |
是 |
|
Tensor.std |
否 |
|
Tensor.stft |
否 |
|
Tensor.storage |
否 |
|
Tensor.untyped_storage |
否 |
|
Tensor.storage_offset |
是 |
|
Tensor.storage_type |
否 |
|
Tensor.stride |
是 |
|
Tensor.sub |
||
Tensor.sub_ |
||
Tensor.subtract |
||
Tensor.subtract_ |
||
Tensor.sum |
||
Tensor.sum_to_size |
||
Tensor.svd |
||
Tensor.swapaxes |
是 |
|
Tensor.swapdims |
||
Tensor.t |
是 |
|
Tensor.t_ |
是 |
|
Tensor.tensor_split |
是 |
|
Tensor.tile |
||
Tensor.to |
||
to |
||
torch.to |
||
torch.to |
||
Tensor.to_mkldnn |
||
Tensor.take |
||
Tensor.take_along_dim |
||
Tensor.tan |
||
Tensor.tan_ |
||
Tensor.tanh |
||
Tensor.tanh_ |
||
Tensor.atanh |
||
Tensor.atanh_ |
||
Tensor.arctanh |
||
Tensor.arctanh_ |
||
Tensor.tolist |
是 |
|
Tensor.topk |
否 |
|
Tensor.to_dense |
||
Tensor.to_sparse |
||
to_sparse |
否 |
|
Tensor.to_sparse_csr |
否 |
|
Tensor.to_sparse_csc |
否 |
|
Tensor.to_sparse_bsr |
否 |
|
Tensor.to_sparse_bsc |
否 |
|
Tensor.trace |
否 |
|
Tensor.transpose |
是 |
|
Tensor.transpose_ |
||
Tensor.triangular_solve |
||
Tensor.tril |
||
Tensor.tril_ |
||
Tensor.triu |
是 |
|
Tensor.triu_ |
是 |
|
Tensor.true_divide |
||
Tensor.true_divide_ |
||
Tensor.trunc |
||
Tensor.trunc_ |
||
Tensor.type |
||
Tensor.type_as |
是 |
|
Tensor.unbind |
是 |
|
Tensor.unflatten |
否 |
|
Tensor.unfold |
||
Tensor.uniform_ |
||
Tensor.unique |
||
Tensor.unique_consecutive |
||
Tensor.unsqueeze |
是 |
|
Tensor.unsqueeze_ |
是 |
|
Tensor.values |
||
Tensor.var |
否 |
|
Tensor.vdot |
否 |
|
Tensor.view |
是 |
|
view |
||
Tensor.view_as |
是 |
|
Tensor.vsplit |
||
Tensor.where |
||
Tensor.xlogy |
否 |
|
Tensor.xlogy_ |
||
Tensor.zero_ |