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

Function TEST_F

tensorflow/compiler/xla/tests/hlo_metadata_test.cc:41–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39};
40
41TEST_F(HloMetadataTest, MetadataPropagation) {
42 XlaBuilder builder("add");
43 builder.SetOpMetadata(metadata_);
44 BuildAddComputation(&builder);
45 builder.ClearOpMetadata();
46
47 Shape argument_layout = ShapeUtil::MakeShape(F32, {});
48 TF_ASSERT_OK_AND_ASSIGN(
49 auto executables,
50 local_client_->Compile(builder.Build().ValueOrDie(),
51 {&argument_layout, &argument_layout},
52 ExecutableBuildOptions()));
53
54 auto instruction = executables[0]
55 ->executable()
56 ->module()
57 .entry_computation()
58 ->root_instruction();
59 EXPECT_EQ("add", instruction->metadata().op_type());
60 EXPECT_EQ("my_sum_op", instruction->metadata().op_name());
61}
62
63TEST_F(HloMetadataTest, MetadataClearing) {
64 XlaBuilder builder("add");

Callers

nothing calls this directly

Calls 10

MakeShapeFunction · 0.85
SetOpMetadataMethod · 0.80
ClearOpMetadataMethod · 0.80
root_instructionMethod · 0.80
entry_computationMethod · 0.80
metadataMethod · 0.80
moduleMethod · 0.45
executableMethod · 0.45
op_typeMethod · 0.45
op_nameMethod · 0.45

Tested by

no test coverage detected