Skip to content

[LD] Handle alias in nvptx-ld as nvptx's .alias does not handle it fully #32

@tob2

Description

@tob2

Some ".alias" support in nvptx-ld would be useful due to the limitations listed below – and complete lack before PTX ISA 6.3 (CUDA 10). Namely:

https://gcc.gnu.org/pipermail/gcc-patches/2022-March/592127.html states:

Starting with ptx isa version 6.3, a ptx directive .alias is available.
Use this directive to support symbol aliases, as far as possible. […]
The alias support has the following limitations.

Only function aliases are supported.

Weak aliases are not supported. […]

Aliases to weak symbols are not supported […]

At some point we may add support in the nvptx-tools linker for symbol
aliases, and define f.i. malias=ptx and malias=ld to choose between the two in
the compiler.

[...]

An example of where this support is useful, is the OvO (OpenMP vs Offload) testsuite. The testsuite passes already at -O2. But at -O0, there are errors in some c++ test-cases due to missing symbol alias support.

Likewise sollve_vv's alpaka_complex_template.cpp testcase, which also fails with -O0.

@tschwinge @vries

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions