Skip to content

Commit 8f4369f

Browse files
petechouigcbot
authored andcommitted
vISA: Remove the support to emit visa binary to the output std::ostream ptr of CISA_IR_Builder::Compile().
The change is part of work to deprecate visa binary support. The output std::ostream pointer of CISA_IR_Builder::Compile() is deprecated and expected to be null. The next change would be removing the parameter from the API.
1 parent 07ae4d2 commit 8f4369f

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

visa/BuildCISAIRImpl.cpp

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,6 +1531,8 @@ int CISA_IR_Builder::ParseVISAText(const std::string &visaFile) {
15311531
// default size of the kernel mem manager in bytes
15321532
int CISA_IR_Builder::Compile(const char *nameInput, std::ostream *os,
15331533
bool emit_visa_only) {
1534+
vISA_ASSERT(!os, "std::ostream * parameter is deprecated and expected to be "
1535+
"null.");
15341536
stopTimer(
15351537
TimerID::BUILDER); // TIMER_BUILDER is started when builder is created
15361538
int status = VISA_SUCCESS;
@@ -1603,9 +1605,6 @@ int CISA_IR_Builder::Compile(const char *nameInput, std::ostream *os,
16031605
status = m_cisaBinary->dumpToFile(name);
16041606
}
16051607

1606-
if (os)
1607-
status = m_cisaBinary->dumpToStream(os);
1608-
16091608
// Early return if emit_visa_only is true.
16101609
if (emit_visa_only)
16111610
return status;
@@ -2035,12 +2034,8 @@ int CISA_IR_Builder::Compile(const char *nameInput, std::ostream *os,
20352034
}
20362035
}
20372036

2038-
if (os) {
2039-
status = m_cisaBinary->dumpToStream(os);
2040-
} else {
2041-
if (CisaFramework::allowDump(m_options, name))
2042-
status = m_cisaBinary->dumpToFile(name);
2043-
}
2037+
if (CisaFramework::allowDump(m_options, name))
2038+
status = m_cisaBinary->dumpToFile(name);
20442039
}
20452040

20462041
stopTimer(TimerID::TOTAL); // have to record total time before dump the timer

0 commit comments

Comments
 (0)