- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for add_tensor (0.38 sec)
-
tensorflow/compiler/mlir/tensorflow/utils/export_utils.cc
} } else if (auto attr = mlir::dyn_cast<mlir::ElementsAttr>(a)) { TensorProto tensor; TF_RETURN_IF_ERROR(ConvertToTensorProto(attr, &tensor)); *list->add_tensor() = tensor; } else if (auto attr = mlir::dyn_cast<mlir::FlatSymbolRefAttr>(a)) { AttrValue attr_val; TF_RETURN_IF_ERROR(ConvertAttribute(attr, &attr_val)); *list->add_func() = attr_val.func();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 17:58:54 UTC 2024 - 19.7K bytes - Viewed (0) -
tensorflow/c/kernels_test.cc
return static_cast<void*>(s); }; AttrValue v; ::tensorflow::TensorProto* tensor_proto1 = v.mutable_list()->add_tensor(); *tensor_proto1 = TensorProtoHelpers::GenerateTensorProto1(); ::tensorflow::TensorProto* tensor_proto2 = v.mutable_list()->add_tensor(); *tensor_proto2 = TensorProtoHelpers::GenerateTensorProto2(); CreateAndCallKernelWithAttr(my_create_func, "TestKernelAttrTensorList", v);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Sep 06 19:12:29 UTC 2023 - 50.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/experimental/remat/rematerializer.cc
for (const int old_tensor : std::vector<int>(operations_[iop].tensors)) { const auto new_tensor = std::lower_bound(new_tensors.begin(), new_tensors.end(), std::make_pair(old_tensor, 0)); if (new_tensor != new_tensors.end() && new_tensor->first == old_tensor) { DelUse(iop, old_tensor); AddUse(iop, new_tensor->second); } }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Mar 14 20:57:44 UTC 2023 - 13.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/experimental/remat/rematerializer_test.cc
r_.AddUse(/*ioperation=*/r_.AddOperation(/*is_stateful=*/false), /*itensor=*/r_.AddTensor(100)); r_.AddUse(/*ioperation=*/r_.AddOperation(/*is_stateful=*/false), /*itensor=*/r_.AddTensor(1)); r_.AddUse(/*ioperation=*/r_.AddOperation(/*is_stateful=*/false), /*itensor=*/r_.AddTensor(100)); ASSERT_THAT(r_.GetMemProfile(), ElementsAreArray({100, 1, 100}));
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Mar 14 20:57:44 UTC 2023 - 19.1K bytes - Viewed (0) -
tensorflow/c/eager/dlpack.cc
return nullptr; } TF_DataType dtype; Status s = TfDataTypeFormDlDataType(dl_tensor->dtype, &dtype); if (!s.ok()) { status->status = std::move(s); return nullptr; } int num_dims = dl_tensor->ndim; const int64_t* dims = dl_tensor->shape; void* data = dl_tensor->data; if (dl_tensor->byte_offset != 0) { status->status = tensorflow::errors::InvalidArgument(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Feb 15 09:49:45 UTC 2024 - 12.8K bytes - Viewed (0) -
tensorflow/c/experimental/next_pluggable_device/tensor_pjrt_buffer_util.cc
tensorflow::AsyncValueTensor* av_tensor = tensorflow::AsyncValueTensor::FromTensor(tensor); if (av_tensor == nullptr || av_tensor->GetBuffer() == nullptr) { return absl::InternalError("Input tensor does not have PjRtBuffer."); } auto* c_api_buffer = dynamic_cast<xla::PjRtCApiBuffer*>(av_tensor->GetBuffer().get()); if (c_api_buffer == nullptr) { return absl::InternalError(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Apr 22 05:48:24 UTC 2024 - 3.7K bytes - Viewed (0) -
tensorflow/c/experimental/next_pluggable_device/tensor_pjrt_buffer_util_test.cc
xla::PjRtClient::HostBufferSemantics::kImmutableOnlyDuringCall, nullptr, pjrt_client->addressable_devices()[0])); tensorflow::AsyncValueTensor* av_tensor = tensorflow::AsyncValueTensor::FromTensor(&tensor); av_tensor->SetBuffer(std::move(buffer)); EXPECT_THAT( GetPjRtCBufferFromTensor(&tensor), StatusIs( error::INTERNAL, HasSubstr(absl::StrCat(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Apr 01 16:29:40 UTC 2024 - 7.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/experimental/remat/rematerializer.h
// The arguments must be valid indices (i.e., obtained with // `AddOperation`/`AddTensor`). void AddUse(int ioperation, int itensor); // Undoes an AddUse(ioperation, itensor). NoOp if there was no prior `AddUse`. // The arguments must be valid indices (i.e., obtained with // `AddOperation`/`AddTensor`). void DelUse(int ioperation, int itensor); private:
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Mar 14 20:57:44 UTC 2023 - 12K bytes - Viewed (0) -
tensorflow/c/eager/dlpack_test.cc
num_elements *= shape[i]; } std::vector<float> data(num_elements); for (size_t j = 0; j < num_elements; ++j) { data[j] = j; } DLManagedTensor dlm_in = {}; DLTensor* dltensor_in = &dlm_in.dl_tensor; dltensor_in->data = data.data(); dltensor_in->device = {kDLCPU, 0}; dltensor_in->ndim = static_cast<int32_t>(shape.size()); dltensor_in->dtype = {kDLFloat, 32, 1}; dltensor_in->shape = shape.data();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Jun 30 03:04:46 UTC 2023 - 4.4K bytes - Viewed (0) -
tensorflow/c/experimental/next_pluggable_device/c_api.cc
TF_Status* status) { auto* cc_ctx = reinterpret_cast<tensorflow::OpKernelContext*>(ctx); const tensorflow::Tensor& arg_tensor = cc_ctx->input(index); absl::Status cc_status; if (arg_tensor.dtype() != tensorflow::DT_RESOURCE) { cc_status = absl::InvalidArgumentError( absl::StrCat("Trying to obtain resource handle from Input[", index,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Apr 22 05:48:24 UTC 2024 - 13.9K bytes - Viewed (0)