[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1021660: gcc-12-offload-nvptx: offloading to nvidia via nvptx fails with cuda version 11 (default in sid)



On Thu, 13 Oct 2022, Thomas Schwinge wrote:

Aha, that's a legit question to wonder about: the reason is that GCC 11
defaulted to sm_35 code generation (which CUDA 11 still does support):
<https://gcc.gnu.org/gcc-11/changes.html#nvptx>, just then GCC 12 again
reverted to sm_30: <https://gcc.gnu.org/gcc-12/changes.html#nvptx>.

but then, wouldn't the most straightforward fix to change again GCC 12 to
generate sm_35 code by default? And also, is there some oscure command line
option to explicitly request GCC 12 to generate code of some specific sm
level (possibly even higher than sm_35)? I did try using
gcc-12 -fopenmp -foffload=nvptx-none -foffload-options="-misa=sm_35"
but it still does not work, while in principle it should. Why doesn't it?
On the other hand, if I use
gcc-11 -fopenmp -foffload=nvptx-none="-misa=sm_30"
then I get the same error message I get with gcc-12.
Is there something wrong in how GCC 12 handles nvptx code generation options?

bye
Giacomo


--
_________________________________________________________________

Giacomo Mulas <giacomo.mulas@inaf.it>
_________________________________________________________________

INAF - Osservatorio Astronomico di Cagliari
via della scienza 5 - 09047 Selargius (CA)

tel.   +39 070 71180255
mob. : +39 329  6603810
_________________________________________________________________

"It's just a shadow of the man you should be
Like a garden in the forest that the world will never see
You have no thought of answers only questions to be filled"
                         (Big Country)
_________________________________________________________________


Reply to: