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

Method builder

tensorflow/compiler/xla/client/xla_builder.h:69–72  ·  view source on GitHub ↗

Precondition: !IsUninitialized(). It's very common to do foo.builder()->bar(). Without this precondition, if foo.builder() is null, the call to bar will segfault at some point possibly deep in the callstack when we finally dereference `this`. The precondition lets us avoid this tricky-to-debug problem.

Source from the content-addressed store, hash-verified

67 // deep in the callstack when we finally dereference `this`. The precondition
68 // lets us avoid this tricky-to-debug problem.
69 XlaBuilder* builder() const {
70 CHECK(builder_ != nullptr);
71 return builder_;
72 }
73
74 // Returns true if the XlaOp represents valid, non-erroneous value.
75 bool valid() const { return handle_ >= 0; }

Callers 15

operator>>Function · 0.45
CheckOpBuilderMethod · 0.45
AsyncOutSendFunction · 0.45
BroadcastFunction · 0.45
BroadcastInDimFunction · 0.45
CopyFunction · 0.45
PadFunction · 0.45
ReshapeFunction · 0.45
CollapseFunction · 0.45
SliceFunction · 0.45
SliceInDimFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected