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

Function SetOutputAttrs

tensorflow/core/kernels/ops_testutil.h:54–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52namespace test {
53
54inline void SetOutputAttrs(OpKernelContext::Params* params,
55 std::vector<AllocatorAttributes>* attrs) {
56 attrs->clear();
57 for (int index = 0; index < params->op_kernel->num_outputs(); index++) {
58 AllocatorAttributes attr;
59 const bool on_host =
60 (params->op_kernel->output_memory_types()[index] == HOST_MEMORY);
61 attr.set_on_host(on_host);
62 attrs->push_back(attr);
63 }
64 params->output_attr_array = gtl::vector_as_array(attrs);
65}
66
67} // namespace test
68

Callers 15

PrepOpKernelMethod · 0.85
BM_SegmentReductionFunction · 0.85
CheckCollectMethod · 0.85
BM_SegmentReductionFunction · 0.85
BM_BiasGradFloatFunction · 0.85
BM_BiasGradHalfFunction · 0.85
RunOpKernelMethod · 0.85
BM_SparseToDenseFunction · 0.85
RunTestMethod · 0.85
BM_LRNFloatFunction · 0.85
BM_AvgPoolFunction · 0.85

Calls 5

vector_as_arrayFunction · 0.85
set_on_hostMethod · 0.80
clearMethod · 0.45
num_outputsMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected