SWDEV-440004 - Fix Unit_hipHostMalloc_AllocateUseMoreThanAvailGPUMemory
int(32bit -2147483648~2147483647) could overflow if allocated size >= 2GB(2147483648).
Use size_t instead.
Change-Id: I1511574464b96fcb09eae18daa5ee9f56d817505
Signed-off-by: Lang Yu <Lang.Yu@amd.com>
[ROCm/hip-tests commit: c7aa062b66]
This commit is contained in:
@@ -48,7 +48,7 @@ static constexpr size_t sizeBytes{numElements * sizeof(int)};
|
||||
|
||||
#if HT_AMD
|
||||
static __global__ void kerTestMemAccess(char *buf) {
|
||||
int myId = threadIdx.x + blockDim.x * blockIdx.x;
|
||||
size_t myId = threadIdx.x + blockDim.x * blockIdx.x;
|
||||
buf[myId] = VALUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user