@@ -576,8 +576,7 @@ struct AMDGPUKernelTy : public GenericKernelTy {
576
576
// / Get the HSA kernel object representing the kernel function.
577
577
uint64_t getKernelObject () const { return KernelObject; }
578
578
579
- // / Get the size of implicitargs based on the code object version
580
- // / @return 56 for cov4 and 256 for cov5
579
+ // / Get the size of implicitargs based on the code object version.
581
580
uint32_t getImplicitArgsSize () const { return ImplicitArgsSize; }
582
581
583
582
// / Indicates whether or not we need to set up our own private segment size.
@@ -3386,20 +3385,17 @@ Error AMDGPUKernelTy::launchImpl(GenericDeviceTy &GenericDevice,
3386
3385
if (auto Err = AMDGPUDevice.getStream (AsyncInfoWrapper, Stream))
3387
3386
return Err;
3388
3387
3389
- // Only COV5 implicitargs needs to be set. COV4 implicitargs are not used.
3390
- if (ImplArgs &&
3391
- getImplicitArgsSize () == sizeof (hsa_utils::AMDGPUImplicitArgsTy)) {
3392
- ImplArgs->BlockCountX = NumBlocks[0 ];
3393
- ImplArgs->BlockCountY = NumBlocks[1 ];
3394
- ImplArgs->BlockCountZ = NumBlocks[2 ];
3395
- ImplArgs->GroupSizeX = NumThreads[0 ];
3396
- ImplArgs->GroupSizeY = NumThreads[1 ];
3397
- ImplArgs->GroupSizeZ = NumThreads[2 ];
3398
- ImplArgs->GridDims = NumBlocks[2 ] * NumThreads[2 ] > 1
3399
- ? 3
3400
- : 1 + (NumBlocks[1 ] * NumThreads[1 ] != 1 );
3401
- ImplArgs->DynamicLdsSize = KernelArgs.DynCGroupMem ;
3402
- }
3388
+ // Set the COV5+ implicit arguments to the appropriate values.
3389
+ ImplArgs->BlockCountX = NumBlocks[0 ];
3390
+ ImplArgs->BlockCountY = NumBlocks[1 ];
3391
+ ImplArgs->BlockCountZ = NumBlocks[2 ];
3392
+ ImplArgs->GroupSizeX = NumThreads[0 ];
3393
+ ImplArgs->GroupSizeY = NumThreads[1 ];
3394
+ ImplArgs->GroupSizeZ = NumThreads[2 ];
3395
+ ImplArgs->GridDims = NumBlocks[2 ] * NumThreads[2 ] > 1
3396
+ ? 3
3397
+ : 1 + (NumBlocks[1 ] * NumThreads[1 ] != 1 );
3398
+ ImplArgs->DynamicLdsSize = KernelArgs.DynCGroupMem ;
3403
3399
3404
3400
// Push the kernel launch into the stream.
3405
3401
return Stream->pushKernelLaunch (*this , AllArgs, NumThreads, NumBlocks,
0 commit comments