Skip to content

Commit f008d20

Browse files
aus-inteligcbot
authored andcommitted
Refactor GRFWidth getter in subtarget
Refactor GRFWidth getter in subtarget
1 parent 4895d1c commit f008d20

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

IGC/VectorCompiler/lib/GenXCodeGen/GenXSubtarget.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ class GenXSubtarget final : public GenXGenSubtargetInfo {
8585

8686
// Only generate warning when callable is used in the middle of the kernel
8787
bool WarnCallable = false;
88+
89+
// Size of one general register in bytes.
90+
unsigned GRFByteSize = 32;
8891
// Some targets do not support i64 ops natively, we have an option to emulate
8992
bool EmulateLongLong = false;
9093

@@ -126,7 +129,8 @@ class GenXSubtarget final : public GenXGenSubtargetInfo {
126129
GenXSubtarget(const Triple &TT, const std::string &CPU,
127130
const std::string &FS);
128131

129-
unsigned getGRFByteSize() const { return 32; }
132+
// GRF size in bytes.
133+
unsigned getGRFByteSize() const { return GRFByteSize; }
130134

131135
bool isOCLRuntime() const { return OCLRuntime; }
132136

0 commit comments

Comments
 (0)