File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
third_party/xla/xla/hlo/builder Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,7 @@ cc_library(
163
163
"//xla/service:shape_inference" ,
164
164
"//xla/tsl/lib/core:bitmap" ,
165
165
"@com_google_absl//absl/algorithm:container" ,
166
+ "@com_google_absl//absl/base:nullability" ,
166
167
"@com_google_absl//absl/container:flat_hash_map" ,
167
168
"@com_google_absl//absl/container:flat_hash_set" ,
168
169
"@com_google_absl//absl/container:inlined_vector" ,
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ limitations under the License.
28
28
#include < utility>
29
29
#include < vector>
30
30
31
+ #include " absl/base/nullability.h"
31
32
#include " absl/container/flat_hash_map.h"
32
33
#include " absl/container/flat_hash_set.h"
33
34
#include " absl/functional/function_ref.h"
@@ -454,7 +455,7 @@ class XlaBuilder {
454
455
absl::StatusOr<Shape> GetShape (XlaOp op) const ;
455
456
456
457
// Returns the shape of the given op.
457
- virtual absl::StatusOr<const Shape*> GetShapePtr (XlaOp op) const ;
458
+ virtual absl::StatusOr<const Shape* absl_nonnull > GetShapePtr (XlaOp op) const ;
458
459
459
460
// Returns the OpSharding of the given op. If "op" has no sharding, return
460
461
// std::nullopt.
@@ -1246,7 +1247,7 @@ class XlaBuilder {
1246
1247
std::deque<HloInstructionProto> instructions_;
1247
1248
// A cache for the HloInstructionProto shapes, to avoid recreating Shape
1248
1249
// objects from protos and to support the GetShapePtr() API.
1249
- std::vector<std::unique_ptr<Shape>> instruction_shapes_;
1250
+ std::vector<absl_nonnull std::unique_ptr<Shape>> instruction_shapes_;
1250
1251
1251
1252
// Dynamic parameter configuration of this computation.
1252
1253
DynamicParameterBinding dynamic_parameter_binding_;
You can’t perform that action at this time.
0 commit comments