ROCm / ROCm-CompilerSupport

The compiler support repository provides various Lightning Compiler related services.
47 stars 31 forks source link

[Issue]: Warning about unused '-nogpulib' during assembly via COMgr #67

Closed atamazov closed 2 months ago

atamazov commented 2 months ago

Problem Description

AMD_COMGR_ACTION_ASSEMBLE_SOURCE_TO_RELOCATABLE: warning: argument unused during compilation: '-nogpulib' [-Wunused-command-line-argument]

Operating System

Ubuntu 20.04.5 LTS

CPU

AMD Ryzen Threadripper 1920X

GPU

AMD Radeon VII

ROCm Version

ROCm 6.0.0, ROCm 5.7.1, ROCm 5.7.0

ROCm Component

ROCm-CompilerSupport

Steps to Reproduce

$ MIOPEN_LOG_LEVEL=5 \
MIOPEN_DEBUG_FIND_ONLY_SOLVER="ConvBinWinogradRxSf2x3;ConvBinWinogradRxSf2x3g1" \
./bin/MIOpenDriver conv \
-V 0 -w 1 -t 1 -i 1 \
-x 3 -y 3 -W 480 -H 48 -c 1 -n 16 -k 16 -p 1 -q 1 -u 1 -v 1 -l 1 -j 1 -g 1 -F 1
...
MIOpen(HIP): Info [Do] AMD_COMGR_ACTION_ASSEMBLE_SOURCE_TO_RELOCATABLE: warning: argument unused during compilation: '-nogpulib' [-Wunused-command-line-argument]

The option is produced and passed to the compiler by COMgr internally.

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

No response

Additional Information

Workaround: I am passing "--rocm-path=." to AMD_COMGR_ACTION_ASSEMBLE_SOURCE_TO_RELOCATABLE and that helps.

If the issue is not reproducible in MIOpen, then you need to find the WORKAROUND_ROCMCOMPILERSUPPORT_ISSUE_67 macro in src/comgr.cpp, define it as 0 and rebuild (and possibly reinstall) MIOpen.

lamb-j commented 2 months ago

Good catch, we shouldn't need -nogpulib for the assembly action

https://github.com/ROCm/llvm-project/commit/179ec2e67bf882c6bccb27f81db3d80f7eb9946e