Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions amd/comgr/src/comgr-compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2142,6 +2142,9 @@ amd_comgr_status_t AMDGPUCompiler::linkToExecutable() {
// TODO: Generalize this list to include all -cc1 flags and arguments that are
// still valid in a bitcode compilation context
static inline const std::unordered_set<std::string_view> ValidSpirvFlags{
"-fatomic-fine-grained-memory",
"-fatomic-ignore-denormal-mode",
"-fatomic-remote-memory",
"-fapprox-func",
"-fcolor-diagnostics",
"-fconvergent-functions",
Expand Down
7 changes: 6 additions & 1 deletion amd/comgr/test-lit/spirv-tests/spirv-to-reloc.hip
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
// COM: Generate a SPIR-V file from a HIP kernel
// RUN: %clang -x hip --offload-arch=amdgcnspirv -nogpulib -nogpuinc \
// RUN: --no-gpu-bundle-output --offload-device-only -O3 %s -o %t.spv \
// RUN: -fvisibility=hidden -fno-autolink -fexceptions -fcolor-diagnostics
// RUN: -fvisibility=hidden -fno-autolink -fexceptions -fcolor-diagnostics \
// RUN: -fatomic-remote-memory -fatomic-fine-grained-memory \
// RUN: -fatomic-ignore-denormal-mode

// COM: Compile SPIR-V source to a relocatable
// RUN: AMD_COMGR_EMIT_VERBOSE_LOGS=1 AMD_COMGR_REDIRECT_LOGS=spirv-flags.txt \
Expand All @@ -14,6 +16,9 @@
// RUN: grep '\-fexceptions' spirv-flags.txt
// RUN: grep '\-fcolor-diagnostics' spirv-flags.txt
// RUN: grep '\-O3' spirv-flags.txt
// RUN: grep '\-fatomic-remote-memory' spirv-flags.txt
// RUN: grep '\-fatomic-fine-grained-memory' spirv-flags.txt
// RUN: grep '\-fatomic-ignore-denormal-mode' spirv-flags.txt

// RUN: rm spirv-flags.txt

Expand Down