@@ -563,7 +563,7 @@ int IR_Builder::translateVISAGatherInst(
563
563
if (eltSize == GATHER_SCATTER_WORD || IsSLMSurface (surface))
564
564
{
565
565
// For non-SLM surface, WORD gather/scatter has no hardware
566
- // supportr and must be translated into BYTE gather/scatter.
566
+ // support and must be translated into BYTE gather/scatter.
567
567
//
568
568
// SLM surface supports only BYTE gather/scatter
569
569
// support and also needs translating into BYTE gather/scatter.
@@ -1906,81 +1906,6 @@ static void BuildMH2_A32(IR_Builder *IRB, G4_Declare *header,
1906
1906
}
1907
1907
}
1908
1908
1909
-
1910
- int IR_Builder::translateVISASLMUntypedScaledInst (
1911
- bool isRead,
1912
- G4_Predicate *pred,
1913
- VISA_Exec_Size execSize,
1914
- VISA_EMask_Ctrl eMask,
1915
- ChannelMask chMask,
1916
- uint16_t scale,
1917
- G4_Operand *sideBand,
1918
- G4_SrcRegRegion *offsets,
1919
- G4_Operand *srcOrDst)
1920
- {
1921
- TIME_SCOPE (VISA_BUILDER_IR_CONSTRUCTION);
1922
-
1923
- G4_ExecSize exSize {Get_VISA_Exec_Size (execSize)};
1924
- G4_InstOpts instOpt = Get_Gen4_Emask (eMask, exSize);
1925
-
1926
- PayloadSource sources[2 ]; // Maximal 2 sources, offset + source
1927
- unsigned len = 0 ;
1928
-
1929
- sources[len].opnd = offsets;
1930
- sources[len].execSize = exSize;
1931
- sources[len].instOpt = instOpt;
1932
- ++len;
1933
- if (!isRead)
1934
- {
1935
- sources[len].opnd = srcOrDst->asSrcRegRegion ();
1936
- sources[len].execSize = G4_ExecSize (exSize * chMask.getNumEnabledChannels ());
1937
- sources[len].instOpt = instOpt;
1938
- ++len;
1939
- }
1940
-
1941
- G4_SrcRegRegion *msgs[2 ] = { 0 , 0 };
1942
- unsigned sizes[2 ] = { 0 , 0 };
1943
- preparePayload (msgs, sizes, exSize, true , sources, len);
1944
-
1945
- SFID sfid = SFID::DP_DC2;
1946
-
1947
- unsigned MD = 0 ;
1948
- // Leave sidebind scale offset 0 as it is not used now.
1949
- MD |= (isRead ? DC2_UNTYPED_SURFACE_READ : DC2_UNTYPED_SURFACE_WRITE) << 14 ;
1950
- MD |= (execSize == EXEC_SIZE_8 ? MDC_SM3_SIMD8 : MDC_SM3_SIMD16) << 12 ;
1951
- MD |= chMask.getHWEncoding () << 8 ;
1952
- // SLM encodes scale pitch in MD.
1953
- MD |= 1 << 7 ;
1954
- MD |= scale & 0x7F ;
1955
-
1956
- G4_DstRegRegion *dst = isRead ? srcOrDst->asDstRegRegion () : createNullDst (Type_UD);
1957
- unsigned resLen = isRead ? (exSize / GENX_DATAPORT_IO_SZ) *
1958
- chMask.getNumEnabledChannels () : 0 ;
1959
-
1960
- uint32_t exFuncCtrl = 0 ;
1961
- G4_SendMsgDescriptor *sendMsgDesc = createSendMsgDesc (MD, resLen, sizes[0 ], sfid,
1962
- sizes[1 ], (uint16_t )exFuncCtrl, isRead ? SendAccess::READ_ONLY : SendAccess::WRITE_ONLY);
1963
-
1964
- applySideBandOffset (sideBand, sendMsgDesc);
1965
-
1966
- createSplitSendInst (
1967
- pred,
1968
- G4_sends,
1969
- exSize,
1970
- dst,
1971
- msgs[0 ],
1972
- msgs[1 ],
1973
- createImm (sendMsgDesc->getDesc (), Type_UD),
1974
- instOpt,
1975
- sendMsgDesc,
1976
- Create_Src_Opnd_From_Dcl (builtinA0, getRegionScalar ()),
1977
- true );
1978
-
1979
- return VISA_SUCCESS;
1980
- }
1981
-
1982
-
1983
-
1984
1909
int IR_Builder::translateVISAGather4ScaledInst (
1985
1910
G4_Predicate *pred,
1986
1911
VISA_Exec_Size execSize,
@@ -2272,83 +2197,6 @@ int IR_Builder::translateVISAScatterScaledInst(
2272
2197
surface, globalOffset, offsets, src);
2273
2198
}
2274
2199
2275
- //
2276
- // For a SLM byte scaled inst with non-zero sideband, we must generate a split send
2277
- // and store the sideband into the extended message descriptor. ExDesc must be indirect
2278
- // in this case
2279
- //
2280
- int IR_Builder::translateVISASLMByteScaledInst (
2281
- bool isRead,
2282
- G4_Predicate *pred,
2283
- VISA_Exec_Size execSize,
2284
- VISA_EMask_Ctrl eMask,
2285
- VISA_SVM_Block_Type blockSize,
2286
- VISA_SVM_Block_Num numBlocks,
2287
- uint8_t scale,
2288
- G4_Operand *sideBand,
2289
- G4_SrcRegRegion *offsets,
2290
- G4_Operand *srcOrDst)
2291
- {
2292
- TIME_SCOPE (VISA_BUILDER_IR_CONSTRUCTION);
2293
-
2294
- G4_ExecSize exSize {Get_VISA_Exec_Size (execSize)};
2295
- G4_InstOpts instOpt = Get_Gen4_Emask (eMask, exSize);
2296
- unsigned numBatch = GetNumBatch (blockSize, numBlocks);
2297
-
2298
- uint16_t exFuncCtrl = 0 ;
2299
- PayloadSource sources[3 ];
2300
- unsigned len = 0 ;
2301
-
2302
- sources[len].opnd = offsets;
2303
- sources[len].execSize = exSize;
2304
- sources[len].instOpt = instOpt;
2305
- ++len;
2306
- if (!isRead)
2307
- {
2308
- sources[len].opnd = srcOrDst->asSrcRegRegion ();
2309
- sources[len].execSize = G4_ExecSize (exSize * numBatch);
2310
- sources[len].instOpt = instOpt;
2311
- ++len;
2312
- }
2313
-
2314
- G4_SrcRegRegion *msgs[2 ] = { 0 , 0 };
2315
- unsigned sizes[2 ] = { 0 , 0 };
2316
- preparePayload (msgs, sizes, exSize, true , sources, len);
2317
-
2318
- SFID sfid = SFID::DP_DC2;
2319
-
2320
- unsigned MD = 0 ;
2321
- // Leave sidebind scale offset 0 as it is not used now.
2322
- MD |= (isRead ? DC2_BYTE_SCATTERED_READ : DC2_BYTE_SCATTERED_WRITE) << 14 ;
2323
- MD |= numBlocks << 10 ;
2324
- MD |= (execSize == EXEC_SIZE_8 ? MDC_SM2_SIMD8 : MDC_SM2_SIMD16) << 8 ;
2325
- MD |= 1 << 7 ;
2326
- MD |= scale & 0x7F ;
2327
-
2328
- G4_DstRegRegion *dst = isRead ? srcOrDst->asDstRegRegion () : createNullDst (Type_UD);
2329
- unsigned resLen = isRead ? (exSize / GENX_DATAPORT_IO_SZ) * numBatch : 0 ;
2330
-
2331
- G4_SendMsgDescriptor *sendMsgDesc = createSendMsgDesc (MD, resLen, sizes[0 ], sfid,
2332
- sizes[1 ], exFuncCtrl, isRead ? SendAccess::READ_ONLY : SendAccess::WRITE_ONLY);
2333
-
2334
- applySideBandOffset (sideBand, sendMsgDesc);
2335
-
2336
- createSplitSendInst (
2337
- pred,
2338
- G4_sends,
2339
- exSize,
2340
- dst,
2341
- msgs[0 ],
2342
- msgs[1 ],
2343
- createImm (sendMsgDesc->getDesc (), Type_UD),
2344
- instOpt,
2345
- sendMsgDesc,
2346
- Create_Src_Opnd_From_Dcl (builtinA0, getRegionScalar ()),
2347
- true );
2348
-
2349
- return VISA_SUCCESS;
2350
- }
2351
-
2352
2200
static void BuildMH_A32_GO (
2353
2201
IR_Builder *IRB, G4_Declare *header, G4_Operand *globalOffset = 0 )
2354
2202
{
0 commit comments