Skip to content

Commit 8979657

Browse files
daniel-manigcbot
authored andcommitted
[Autobackout][FuncReg]Revert of change: ceb8220
Adds vISA option to enable JSON shader dump. Adds vISA option to enable JSON shader dump.
1 parent a746105 commit 8979657

File tree

2 files changed

+2
-21
lines changed

2 files changed

+2
-21
lines changed

visa/BinaryEncodingIGA.cpp

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,14 @@ SPDX-License-Identifier: MIT
99
#include "BinaryEncodingIGA.h"
1010
#include "GTGPU_RT_ASM_Interface.h"
1111
#include "iga/IGALibrary/api/igaEncoderWrapper.hpp"
12-
#include "iga/IGALibrary/Frontend/FormatterJSON.hpp"
1312
#include "Timer.h"
1413
#include "BuildIR.h"
1514
#include "Common_ISA_framework.h"
1615

17-
#include <fstream>
1816
#include <map>
1917
#include <utility>
2018

19+
2120
using namespace iga;
2221
using namespace vISA;
2322

@@ -46,8 +45,6 @@ class BinaryEncodingIGA
4645
// translates and encodes (formerly "DoAll")
4746
void Encode();
4847

49-
void EmitJSON(int dumpJSON);
50-
5148
///////////////////////////////////////////////////////////////////////////
5249
// these function translate G4 IR to IGA IR
5350
Instruction *translateInstruction(G4_INST *g4inst, Block*& bbNew);
@@ -1037,19 +1034,6 @@ void BinaryEncodingIGA::Encode()
10371034
kernel.fg.builder->getJitInfo()->offsetToSkipSetFFIDGP1 =
10381035
kernel.getComputeFFIDGP1NextOff();
10391036
}
1040-
1041-
int dumpJSON = kernel.fg.builder->getuint32Option(vISA_dumpIgaJson);
1042-
if (dumpJSON) {
1043-
EmitJSON(dumpJSON);
1044-
}
1045-
}
1046-
1047-
void BinaryEncodingIGA::EmitJSON(int dumpJSON) {
1048-
std::string jsonFileName = fileName + ".json";
1049-
std::ofstream ofs(jsonFileName, std::ofstream::out);
1050-
FormatOpts fos(*platformModel);
1051-
fos.printJson = true;
1052-
FormatJSON(ofs, fos, *IGAKernel, nullptr);
10531037
}
10541038

10551039
Instruction *BinaryEncodingIGA::translateInstruction(
@@ -2007,3 +1991,4 @@ bool vISA::InstSupportsSrcModifierIGA(TARGET_PLATFORM p, const G4_INST &i, const
20071991
return false;
20081992
}
20091993
}
1994+

visa/include/VISAOptionsDefs.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,10 +295,6 @@ DEF_VISA_OPTION(vISA_encoderFile, ET_CSTR, "-encoderStatisticsFile", "USAG
295295
DEF_VISA_OPTION(vISA_CISAbinary, ET_CSTR, "-CISAbinary", "USAGE: File Name with isaasm paths. ", NULL)
296296
DEF_VISA_OPTION(vISA_DumpRegInfo, ET_BOOL, "-dumpRegInfo", UNUSED, false)
297297
DEF_VISA_OPTION(vISA_PrintHexFloatInAsm, ET_BOOL, "-printHexFloatInAsm", UNUSED, false)
298-
DEF_VISA_OPTION(vISA_dumpIgaJson, ET_INT32, "-dumpIgaJson",
299-
"Emits a .json file (peer to .asm) with final IGA output in JSON format; "
300-
"1 enables basic output, 2 enables with def/use dataflow information "
301-
"(may increase compile time significantly for large shaders)", 0)
302298

303299
//=== misc options ===
304300
DEF_VISA_OPTION(vISA_PlatformSet, ET_INT32, NULLSTR, UNUSED, -1 /*GENX_NONE*/)

0 commit comments

Comments
 (0)