No need to pass -no-pie with gcc-11 on Ubuntu 21.10, but still throwing some warnings:
/usr/bin/ld: /tmp/ccpIxsYV.crtoffloadtable.o: warning: relocation against `__offload_vars_end' in read-only section `.rodata'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
No need to pass -no-pie with gcc-11 on Ubuntu 21.10, but still throwing some warnings:
/usr/bin/ld: /tmp/ccpIxsYV. crtoffloadtable .o: warning: relocation against `__offload_ vars_end' in read-only section `.rodata'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
Still stop running with big size matrices:
./test.x 1024
dim1 = dim2 = 1024
MATMUL Time = 0.12400000000000000
libgomp: cuCtxSynchronize error: the launch timed out and was terminated
libgomp: cuMemFree_v2 error: the launch timed out and was terminated
libgomp: device finalization failed