MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TF_TensorBitcastFrom

Function TF_TensorBitcastFrom

tensorflow/c/tf_tensor.cc:192–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190}
191
192void TF_TensorBitcastFrom(const TF_Tensor* from, TF_DataType type,
193 TF_Tensor* to, const int64_t* new_dims,
194 int num_new_dims, TF_Status* status) {
195 TF_SetStatus(status, TF_OK, "");
196 tensorflow::TensorShape s;
197 for (int i = 0; i < num_new_dims; ++i) {
198 s.AddDim(new_dims[i]);
199 }
200 Status cc_status(to->tensor.BitcastFrom(
201 from->tensor, static_cast<tensorflow::DataType>(type), s));
202 Set_TF_Status_from_Status(status, cc_status);
203}
204
205// --------------------------------------------------------------------------
206size_t TF_StringEncode(const char* src, size_t src_len, char* dst,

Callers 2

TESTFunction · 0.85
BitcastOp_ComputeFunction · 0.85

Calls 4

TF_SetStatusFunction · 0.85
BitcastFromMethod · 0.80
AddDimMethod · 0.45

Tested by 1

TESTFunction · 0.68