| 2d1451d4 | 09-Jan-2020 |
Hong Zhang <hongzhang@anl.gov> |
Initial commit for porting SELL to GPU
- Add tiled SPMV and basic SpMVfor SeqSELL - Tested in serial - Offloadmask is used to determine when the matrix should be copied to GPU - Use different slice
Initial commit for porting SELL to GPU
- Add tiled SPMV and basic SpMVfor SeqSELL - Tested in serial - Offloadmask is used to determine when the matrix should be copied to GPU - Use different slice height for CUDA version - By checking the nonzerostate, PETSc can decide if the whole matrix need to be copied or just the values need to be copied - Make the convert function public so that the very slow MatConvert_Basic can be avoided sometimes. E.g. one can use a two-step convert method: AIJ->SELL,SELL->SELLCUDA instead of the direct convert AIJ->SELLCUDA - Make the FLOPS count for SELL same as that for AIJCUSPARSE. - MatDisAssemble is not needed. - Change slice height from 32 to 16 for GPU - To overlap communication with MatMult, VecScatterBegin() should be called before MatMult() for the diagonal part. - SLICE_HEIGHT is defined to be 32 to match the warp size of GPU. For other cases, it is still 8.
Funded-by: Project: PETSc for GPU Time: 42 hours Reported-by: Thanks-to:
show more ...
|
| ae1eecf8 | 01-Apr-2023 |
Hong Zhang <hongzhang@anl.gov> |
Replace sprintf with snprintf to eliminate compiler warnings
/Users/petsc/builds/qaG_QyAe/1/petsc/petsc/src/mat/tests/cJSON.c:121:3: error: 'sprintf' is deprecated: This function is provided for com
Replace sprintf with snprintf to eliminate compiler warnings
/Users/petsc/builds/qaG_QyAe/1/petsc/petsc/src/mat/tests/cJSON.c:121:3: error: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Werror,-Wdeprecated-declarations] sprintf(version, "%i.%i.%i", CJSON_VERSION_MAJOR, CJSON_VERSION_MINOR, CJSON_VERSION_PATCH); ^
Also fix compiler warning:
/scratch/svcpetsc/glci-builds-stage2/AbTGp5-t/0/petsc/petsc/src/mat/tests/cJSON.c: In function ‘print_string_ptr’: /scratch/svcpetsc/glci-builds-stage2/AbTGp5-t/0/petsc/petsc/src/mat/tests/cJSON.c:817:47: error: ‘%04x’ directive output truncated writing 4 bytes into a region of size 3 [-Werror=format-truncation=] 817 | snprintf((char *)output_pointer, 4, "u%04x", *input_pointer); | ^~~~ /scratch/svcpetsc/glci-builds-stage2/AbTGp5-t/0/petsc/petsc/src/mat/tests/cJSON.c:817:45: note: directive argument in the range [0, 255] 817 | snprintf((char *)output_pointer, 4, "u%04x", *input_pointer); | ^~~~~~~ In file included from /usr/include/stdio.h:867, from /scratch/svcpetsc/glci-builds-stage2/AbTGp5-t/0/petsc/petsc/src/mat/tests/cJSON.c:41: /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output 6 bytes into a destination of size 4 67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 68 | __bos (__s), __fmt, __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors
show more ...
|