Skip to content

[clang][offload] Different optimization level for compiling host code and offload target code #71355

@littlewu2508

Description

@littlewu2508

Currently when I tried to compile a hip program, clang accepts one optimization level -O<N> and use it in both compiling CPU code and GPU code. Is there any reason to use the same optimization level, or it can be set differently?

X problem: Linux distro commonly used -O2 flags (for CPU, apparently), while for GPGPU programs -O3 is more widely adopted. See gentoo/gentoo#33400 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:driver'clang' and 'clang++' user-facing binaries. Not 'clang-cl'

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions