@@ -283,7 +283,7 @@ namespace TransferBench
283283
284284 struct TdmOptions
285285 {
286- int blockSize = 256 ; // /< Size of each threadblock (must be multiple of 64 )
286+ int blockSize = 256 ; // /< Size of each threadblock (must be multiple of 32 )
287287 int maxLDSBytes = INT_MAX ; // /< Maximum number of bytes of __shared__ memory to use
288288 int useHipEvents = 1 ; // /< Use HIP events for timing the TDM executor (0=CPU wall-clock)
289289
@@ -638,6 +638,7 @@ namespace TransferBench
638638 // Enumerations
639639 #define hipDeviceAttributeClockRate cudaDevAttrClockRate
640640 #define hipDeviceAttributeMultiprocessorCount cudaDevAttrMultiProcessorCount
641+ #define hipDeviceAttributeMaxSharedMemoryPerBlock cudaDevAttrMaxSharedMemoryPerBlock
641642 #define hipDeviceAttributeWarpSize cudaDevAttrWarpSize
642643 #define hipErrorPeerAccessAlreadyEnabled cudaErrorPeerAccessAlreadyEnabled
643644 #define hipFuncCachePreferShared cudaFuncCachePreferShared
@@ -667,6 +668,7 @@ namespace TransferBench
667668 #define hipGetDeviceCount cudaGetDeviceCount
668669 #define hipGetDeviceProperties cudaGetDeviceProperties
669670 #define hipGetErrorString cudaGetErrorString
671+ #define hipGetLastError cudaGetLastError
670672 #define hipHostFree cudaFreeHost
671673 #define hipHostMalloc cudaMallocHost
672674 #define hipMalloc cudaMalloc
@@ -2396,12 +2398,18 @@ namespace {
23962398 hasFatalError = true ;
23972399 break ;
23982400 }
2401+ #if defined(__NVCC__)
2402+ errors.push_back ({ERR_FATAL ,
2403+ " Transfer %d: GPU TDM kernel is not supported on NVIDIA hardware" , i});
2404+ hasFatalError = true ;
2405+ #else
23992406 if (!tdm::IsTdmCopySupported (t.exeDevice .exeIndex )) {
24002407 errors.push_back ({ERR_FATAL ,
24012408 " Transfer %d: GPU TDM kernel requires gfx1250 hardware, but GPU %d is not supported" ,
24022409 i, t.exeDevice .exeIndex });
24032410 hasFatalError = true ;
24042411 }
2412+ #endif
24052413 break ;
24062414 case EXE_GPU_GFX :
24072415 if (t.exeDevice .exeIndex < 0 || t.exeDevice .exeIndex >= numExecutors) {
@@ -5833,6 +5841,7 @@ namespace {
58335841 int subIterations = 0 ;
58345842 while (1 ) {
58355843 tdm::tdmCopy (dst, src, sizeBytes, shmem, ldsBytes);
5844+ __syncthreads ();
58365845 if (++subIterations == numSubIterations) break ;
58375846 }
58385847
@@ -8407,6 +8416,7 @@ namespace {
84078416// Enumerations
84088417#undef hipDeviceAttributeClockRate
84098418#undef hipDeviceAttributeMultiprocessorCount
8419+ #undef hipDeviceAttributeMaxSharedMemoryPerBlock
84108420#undef hipDeviceAttributeWarpSize
84118421#undef hipErrorPeerAccessAlreadyEnabled
84128422#undef hipFuncCachePreferShared
@@ -8437,6 +8447,7 @@ namespace {
84378447#undef hipGetDeviceCount
84388448#undef hipGetDeviceProperties
84398449#undef hipGetErrorString
8450+ #undef hipGetLastError
84408451#undef hipHostFree
84418452#undef hipHostMalloc
84428453#undef hipMalloc
0 commit comments