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

Function ConstantsVector

tensorflow/compiler/jit/kernels/xla_ops.cc:420–427  ·  view source on GitHub ↗

Helper static functions to construct parameters for XlaLocalLaunchBase constructor from OpKernelConstruction.

Source from the content-addressed store, hash-verified

418// Helper static functions to construct parameters for
419// XlaLocalLaunchBase constructor from OpKernelConstruction.
420std::vector<int> ConstantsVector(OpKernelConstruction* ctx) {
421 DataTypeVector constant_types;
422 OP_REQUIRES_OK_RETURN(ctx, std::vector<int>(),
423 ctx->GetAttr("Tconstants", &constant_types));
424 std::vector<int> constants(constant_types.size());
425 std::iota(constants.begin(), constants.end(), 0);
426 return constants;
427}
428
429std::vector<int> ResourcesVector(OpKernelConstruction* ctx) {
430 DataTypeVector constant_types;

Callers 2

XlaLocalLaunchOpMethod · 0.85
XlaCompileOpMethod · 0.85

Calls 4

GetAttrMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected