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

Function TestAxisTensorHandle

tensorflow/c/eager/c_api_test_util.cc:175–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173}
174
175TFE_TensorHandle* TestAxisTensorHandle() {
176 int64_t dims[] = {1};
177 int data[] = {1};
178 TF_Tensor* t = TF_AllocateTensor(
179 TF_INT32, &dims[0], sizeof(dims) / sizeof(int64_t), sizeof(data));
180 memcpy(TF_TensorData(t), &data[0], TF_TensorByteSize(t));
181 TF_Status* status = TF_NewStatus();
182 TFE_TensorHandle* th = TFE_NewTensorHandle(t, status);
183 CHECK_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
184 TF_DeleteTensor(t);
185 TF_DeleteStatus(status);
186 return th;
187}
188
189TFE_Op* MinOp(TFE_Context* ctx, TFE_TensorHandle* input,
190 TFE_TensorHandle* axis) {

Callers 3

TEST_FFunction · 0.85
TESTFunction · 0.85
Execute_Min_XLA_CPUFunction · 0.85

Calls 9

TF_AllocateTensorFunction · 0.85
TF_TensorDataFunction · 0.85
TF_TensorByteSizeFunction · 0.85
TF_NewStatusFunction · 0.85
TFE_NewTensorHandleFunction · 0.85
TF_GetCodeFunction · 0.85
TF_MessageFunction · 0.85
TF_DeleteTensorFunction · 0.85
TF_DeleteStatusFunction · 0.85

Tested by

no test coverage detected