Skip to content

Commit 33d0bf7

Browse files
committed
temporary fixes
1 parent d7be156 commit 33d0bf7

3 files changed

Lines changed: 15 additions & 4 deletions

File tree

src/client/Presets/Help.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,11 @@ int HelpPreset([[maybe_unused]] EnvVars& ev,
113113
printf("## Single DMA executed Transfer between GPUs 0 and 1\n");
114114
printf("1 1 (G0->D0->G1)\n");
115115
printf("\n");
116-
printf("## Single GPU-executed Transfer between GPUs 0 and 1 using 1 CU for tensor-op path\n");
116+
printf("## Single GPU-executed Transfer between GPUs 0 and 1 using 1 CU for TDM path\n");
117117
printf("1 1 (G0->T0->G1)\n");
118118
printf("\n");
119119
printf("## Single GPU-executed Transfer between GPUs 0 and 1 using 1 CU for async load/store path\n");
120-
printf("1 1 (G0->L0->G1)\n");
120+
printf("1 1 (G0->A0->G1)\n");
121121
printf("\n");
122122
printf("## Copy 1Mb from GPU0 to GPU1 with 4 CUs, and 2Mb from GPU1 to GPU0 with 8 CUs\n");
123123
printf("-2 (G0->G0->G1 4 1M) (G1->G1->G0 8 2M)\n");

src/header/TransferBench.hpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

src/header/tdmCopy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ THE SOFTWARE.
2323
///
2424
/// This is introduced via __device__ level memcpy-like API which can be
2525
/// either blocking or asynchronous, and utilize all warps, or a team of
26-
/// congtigous warps, to allow for other warps to do other tasks
26+
/// contiguous warps, to allow for other warps to do other tasks
2727
///
2828
/// \par Quick start
2929
/// \code

0 commit comments

Comments
 (0)