- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for reinterpret_cast (0.23 sec)
-
tensorflow/c/eager/parallel_device/parallel_device.cc
void ParallelTensorDeallocator(void* data) { delete reinterpret_cast<ParallelTensor*>(data); } // Used as an argument to TFE_NewCustomDeviceTensorHandle, for computing the // number of dimensions of a parallel tensor. int ParallelTensorNumDims(void* data, TF_Status* status) { const std::vector<int64_t>* shape; absl::Status s = reinterpret_cast<ParallelTensor*>(data)->Shape(&shape); if (!s.ok()) {
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Mon Oct 21 04:14:14 UTC 2024 - 18.3K bytes - Viewed (0) -
tensorflow/c/eager/c_api_unified_experimental_graph.cc
if (num_dims == kUnknownRank) { return absl::OkStatus(); } std::vector<int64_t> dims(num_dims, kUnknownDim); TF_GraphGetTensorShape(graph_, output_, reinterpret_cast<int64_t*>(dims.data()), num_dims, &status); TF_RETURN_IF_ERROR(StatusFromTF_Status(&status)); TF_RETURN_IF_ERROR(tensorflow::TensorShapeUtils::MakeShape(dims, shape));
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 15.7K bytes - Viewed (0) -
tensorflow/c/eager/c_api_experimental_test.cc
TF_Buffer* result1 = TF_NewBuffer(); TFE_MonitoringSamplerCellValue(cell1, result1); tensorflow::HistogramProto histogram1; EXPECT_TRUE(histogram1.ParseFromString( {reinterpret_cast<const char*>(result1->data), result1->length})); EXPECT_EQ(histogram1.sum(), 3.0); TF_DeleteBuffer(result1); TFE_MonitoringDeleteSampler1(sampler1);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Thu Aug 03 03:14:26 UTC 2023 - 31.5K bytes - Viewed (0) -
tensorflow/c/eager/c_api.cc
methods_.summarize(data_, &c_status), TF_DeleteBuffer); if (!c_status.status.ok()) { return c_status.status; } summary = std::string(reinterpret_cast<const char*>(summary_buffer->data), summary_buffer->length); return absl::OkStatus(); } private: void* const data_; const TFE_CustomDeviceTensorHandleMethods methods_;
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 43.9K bytes - Viewed (0) -
tensorflow/c/eager/c_api_unified_experimental.cc
} tensorflow::PartialTensorShape partial_shape; if (shape.num_dims != -1) { DCHECK(shape.dim_sizes != nullptr); Status status = tensorflow::PartialTensorShape::MakePartialShape( reinterpret_cast<int64_t*>(shape.dim_sizes), shape.num_dims, &partial_shape); if (!status.ok()) { tsl::Set_TF_Status_from_Status(s, status); return nullptr; } }
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 9K bytes - Viewed (0) -
tensorflow/c/eager/abstract_operation.h
lengths.reserve(values.size()); for (const auto& s : values) { raw_strs.emplace_back(s.data()); lengths.emplace_back(s.size()); } return SetAttrStringList(attr_name, reinterpret_cast<const void**>(raw_strs.data()), lengths.data(), values.size()); } namespace internal { struct AbstractOperationDeleter { void operator()(AbstractOperation* p) const {
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 7.3K bytes - Viewed (0) -
tensorflow/c/eager/gradients.cc
// may lead to collisions. Introduce another way to get a unique id for this // tensor. int64_t ToId(const AbstractTensorHandle* t) { return static_cast<int64_t>(reinterpret_cast<uintptr_t>(t)); } absl::Status ZerosLike(AbstractContext* ctx, AbstractTensorHandle* t, AbstractTensorHandle** result) { AbstractOperationPtr op(ctx->CreateOperation());
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 19.7K bytes - Viewed (0) -
tensorflow/c/c_api_test.cc
TF_DeleteStatus(s); } void Deallocator(void* data, size_t, void* arg) { tensorflow::cpu_allocator()->DeallocateRaw(data); *reinterpret_cast<bool*>(arg) = true; } TEST(CAPI, Tensor) { const int num_bytes = 6 * sizeof(float); float* values = reinterpret_cast<float*>(tensorflow::cpu_allocator()->AllocateRaw( TF_TensorDefaultAlignment(), num_bytes)); int64_t dims[] = {2, 3};
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 16:27:48 UTC 2024 - 97K bytes - Viewed (0) -
tensorflow/c/c_api_experimental.cc
auto iter = builder->attr_names.insert(attr_name).first; builder->Set(*iter, tensorflow::gtl::ArraySlice<const tensorflow::DataType>( reinterpret_cast<const tensorflow::DataType*>(values), num_values)); } void TF_AttrBuilderCheckCanRunOnDevice(TF_AttrBuilder* builder, const char* device_type,
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 16:27:48 UTC 2024 - 29.5K bytes - Viewed (0) -
tensorflow/c/c_api.cc
dims.push_back(shape.dim_size(i)); nelems *= shape.dim_size(i); } CHECK_EQ(nelems, 0); return TF_NewTensor( dtype, reinterpret_cast<const int64_t*>(dims.data()), shape.dims(), reinterpret_cast<void*>(&empty), 0, [](void*, size_t, void*) {}, nullptr); } static void TF_Run_Helper( Session* session, const char* handle, const TF_Buffer* run_options,
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 16:27:48 UTC 2024 - 102.3K bytes - Viewed (0)