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

Function CountCopies

tensorflow/compiler/xla/service/copy_insertion_test.cc:42–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40using ::testing::UnorderedElementsAre;
41
42int64 CountCopies(const HloComputation& computation) {
43 int64 count = 0;
44 for (const auto& instruction : computation.instructions()) {
45 if (instruction->opcode() == HloOpcode::kCopy) {
46 count++;
47 }
48 }
49 return count;
50}
51
52int64 CountCopies(const HloModule& module) {
53 int64 count = 0;

Callers 3

TEST_FFunction · 0.70
BM_SequentialWhilesFunction · 0.70
BM_ParallelWhilesFunction · 0.70

Calls 3

instructionsMethod · 0.80
opcodeMethod · 0.80
computationsMethod · 0.80

Tested by

no test coverage detected