Make expected failures more obvious

This commit is contained in:
Allard Hendriksen 2023-08-07 17:40:35 +02:00
parent a3b5b817e3
commit fc06e3de18
No known key found for this signature in database
2 changed files with 4 additions and 3 deletions

View File

@ -337,9 +337,10 @@ int main(int argc, char **argv) {
CUDA_CHECK(cudaDeviceSynchronize());
printf(
"\n**NOTE**: The following code will fail.\n "
"\nCare must be taken to ensure that the coordinates result in a memory offset\n"
"that is aligned to 16 bytes. With 32 bit integer elements, x coordinates\n"
"that are not a multiple of 4 result in a non-recoverable error:\n"
"that are not a multiple of 4 result in a non-recoverable error:\n\n"
);
kernel<<<grid, block>>>(tma_desc, 1, 0);
CUDA_REPORT(cudaDeviceSynchronize());
@ -348,6 +349,6 @@ int main(int argc, char **argv) {
kernel<<<grid, block>>>(tma_desc, 3, 0);
CUDA_REPORT(cudaDeviceSynchronize());
CUDA_CHECK(cudaFree(tensor));
CUDA_REPORT(cudaFree(tensor));
return 0;
}

View File

@ -58,7 +58,7 @@ inline void gpuReport(cudaError_t code, const char *file, int line)
{
if (code != cudaSuccess)
{
fprintf(stderr, "CUDA error: %s %s %d\n", cudaGetErrorString(code), file,
fprintf(stderr, "CUDA error (as expected): %s %s %d\n", cudaGetErrorString(code), file,
line);
}
}