mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Add tensor.{adjoint(),H,mT,mH} methods and properties (#64179)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/64179 This PR follows the discussion in https://github.com/pytorch/pytorch/issues/45063#issuecomment-904431478 Fixes https://github.com/pytorch/pytorch/issues/45063 cc ezyang anjali411 dylanbespalko mruberry Lezcano nikitaved rgommers pmeier asmeurer leofang AnirudhDagar asi1024 emcastillo kmaehashi heitorschueroff Test Plan: Imported from OSS Reviewed By: bertmaher Differential Revision: D30730483 Pulled By: anjali411 fbshipit-source-id: 821d25083f5f682450f6812bf852dc96a1cdf9f2
This commit is contained in:
committed by
Facebook GitHub Bot
parent
87df043f63
commit
82a216c45b
@ -108,18 +108,33 @@ std::shared_ptr<SugaredValue> SimpleValue::attr(
|
||||
}},
|
||||
{TypeKind::TensorType,
|
||||
{
|
||||
{"dtype", "prim"}, {"device", "prim"},
|
||||
{"grad", "prim"}, {"data", "prim"},
|
||||
{"shape", "prim"}, {"is_cuda", "prim"},
|
||||
{"is_xpu", "prim"}, {"is_sparse", "prim"},
|
||||
{"is_sparse_csr", "prim"}, {"is_mkldnn", "prim"},
|
||||
{"is_mlc", "prim"}, {"is_quantized", "prim"},
|
||||
{"is_vulkan", "prim"}, {"is_meta", "prim"},
|
||||
{"is_leaf", "aten"}, {"requires_grad", "prim"},
|
||||
{"layout", "prim"}, {"T", "prim"},
|
||||
{"ndim", "prim"}, {"name", "prim"},
|
||||
{"real", "aten"}, {"imag", "aten"},
|
||||
{"retains_grad", "aten"}, {"is_ort", "prim"},
|
||||
{"dtype", "prim"},
|
||||
{"device", "prim"},
|
||||
{"grad", "prim"},
|
||||
{"data", "prim"},
|
||||
{"shape", "prim"},
|
||||
{"is_cuda", "prim"},
|
||||
{"is_xpu", "prim"},
|
||||
{"is_sparse", "prim"},
|
||||
{"is_sparse_csr", "prim"},
|
||||
{"is_mkldnn", "prim"},
|
||||
{"is_mlc", "prim"},
|
||||
{"is_quantized", "prim"},
|
||||
{"is_vulkan", "prim"},
|
||||
{"is_meta", "prim"},
|
||||
{"is_leaf", "aten"},
|
||||
{"requires_grad", "prim"},
|
||||
{"layout", "prim"},
|
||||
{"T", "prim"},
|
||||
{"H", "prim"},
|
||||
{"mT", "aten"},
|
||||
{"mH", "aten"},
|
||||
{"is_ort", "prim"},
|
||||
{"ndim", "prim"},
|
||||
{"name", "prim"},
|
||||
{"real", "aten"},
|
||||
{"imag", "aten"},
|
||||
{"retains_grad", "aten"},
|
||||
}},
|
||||
{TypeKind::DeviceObjType, {{"type", "prim"}, {"index", "prim"}}}};
|
||||
auto kind = value_->type()->kind();
|
||||
|
Reference in New Issue
Block a user