Skip to content

Commit

Permalink
Added generated proto
Browse files Browse the repository at this point in the history
  • Loading branch information
9Tempest committed Nov 18, 2023
1 parent 47d8723 commit dd6a176
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions gematria/datasets/bhive_importer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ absl::StatusOr<BasicBlockProto> BHiveImporter::BasicBlockProtoFromMBBName(

// Assert MI cannot be a CALL instruction
assert(!MI.isCall() && "MI is a CALL instruction, bad dataset");
canonicalizer_.InstructionFromMachineInstr(MI);
// TODO: Add this to the basic block proto
*basic_block_proto.add_canonicalized_instructions() = ProtoFromInstruction(
canonicalizer_.InstructionFromMachineInstr(MI));
}

// for (DisassembledInstruction& instruction : *instructions) {
Expand Down Expand Up @@ -241,6 +241,7 @@ absl::StatusOr<BasicBlockWithThroughputProto> BHiveImporter::ParseMIRCsvLine(
throughput.set_source(source_name);
throughput.add_inverse_throughput_cycles(throughput_cycles *
throughput_scaling);
LOG(proto.DebugString());

return proto;
}
Expand Down
2 changes: 1 addition & 1 deletion gematria/datasets/bhive_importer_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ TEST_F(BHiveImporterTest, NonStandardColumns) {
}

TEST_F(BHiveImporterTest, MIRDatasetBasicTest) {
EXPECT_THAT(x86_bhive_importer_->LoadMIRModule("/granlte/sample_dataset/data.mir"),
EXPECT_THAT(x86_bhive_importer_->LoadMIRModule("sample_dataset/data.mir"),
IsOk());
EXPECT_THAT(x86_bhive_importer_->ParseMIRCsvLine(kSourceName, "a,b,BB_13,2.37", 2,
3, kScaling),
Expand Down

0 comments on commit dd6a176

Please sign in to comment.