Home
last modified time | relevance | path

Searched refs:tensor_attr (Results 1 – 9 of 9) sorted by relevance

/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/
Dinitialize_variables_in_session_init.cc44 ElementsAttr tensor_attr = tensor_attr_or.ValueOrDie(); in InitializeVariable() local
50 session_init_func.getLoc(), tensor_attr.getType(), tensor_attr); in InitializeVariable()
Dlift_variables.cc137 ElementsAttr tensor_attr = tensor_attr_or.ValueOrDie(); in LiftVariablesFromSession() local
141 builder.getStringAttr(name), tensor_attr, in LiftVariablesFromSession()
142 TypeAttr::get(tensor_attr.getType()), builder.getUnitAttr()); in LiftVariablesFromSession()
/external/pytorch/test/cpp/jit/
Dtest_module_api.cpp193 auto tensor_attr = "tensor_attr"; in TEST() local
197 cls->addAttribute(tensor_attr, TensorType::get()); in TEST()
203 m.setattr(tensor_attr, at::randn(5)); in TEST()
230 at::Tensor t1 = m.attr(tensor_attr).toTensor(); in TEST()
232 m2.attr(tensor_attr).toTensor(); // deepcopy will copy the Tensor in TEST()
234 m3.attr(tensor_attr).toTensor(); // copy will not copy the Tensor in TEST()
/external/pytorch/torch/_prims/
Dcontext.py66 tensor_attr = getattr(torch.Tensor, s, None) or getattr(torch, s)
67 r[tensor_attr] = torch._refs._conversions.__dict__.get(s)
/external/tensorflow/tensorflow/core/ir/importexport/
Dconvert_tensor.cc401 if (auto tensor_attr = attr.dyn_cast<mlir::tf_type::TensorProtoAttr>()) in ConvertToTensorProto() local
402 return ConvertTensorProtoAttr(tensor_attr, output); in ConvertToTensorProto()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/utils/
Dconvert_tensor.cc402 if (auto tensor_attr = attr.dyn_cast<mlir::TF::TensorProtoAttr>()) in ConvertToTensorProto() local
403 return ConvertTensorProtoAttr(tensor_attr, output); in ConvertToTensorProto()
/external/tensorflow/tensorflow/compiler/tf2tensorrt/convert/
Dconvert_nodes_test.cc2410 TensorProto* tensor_attr = in TestConvertConst() local
2412 tensor_attr->Clear(); in TestConvertConst()
2415 tensor.AsProtoTensorContent(tensor_attr); in TestConvertConst()
2417 tensor.shape().AsProto(tensor_attr->mutable_tensor_shape()); in TestConvertConst()
2418 tensor_attr->set_dtype(tensor.dtype()); in TestConvertConst()
2421 CopyTensorElements<float>(tensor, tensor_attr->mutable_float_val()); in TestConvertConst()
2423 CopyTensorElements<int32>(tensor, tensor_attr->mutable_int_val()); in TestConvertConst()
2425 tensor.AsProtoField(tensor_attr); in TestConvertConst()
2497 TensorProto* tensor_attr = in TEST_F() local
2499 tensor_attr->Clear(); in TEST_F()
[all …]
/external/tensorflow/tensorflow/compiler/mlir/lite/
Dflatbuffer_export.cc905 auto tensor_attr = inst->getAttr("value").cast<mlir::TypedAttr>(); in BuildTensor() local
907 tensor_attr.getType().cast<TensorType>().getShape(); in BuildTensor()
/external/tensorflow/tensorflow/core/grappler/optimizers/
Dconstant_folding.cc2068 AttrValue tensor_attr; in ReplaceOperationWithConstant() local
2069 Status s = CreateConstantTensorAttrValue(dtype, value, shape, &tensor_attr); in ReplaceOperationWithConstant()
2077 return ReplaceOperationWithConstantTensor(dtype, tensor_attr.mutable_tensor(), in ReplaceOperationWithConstant()