Skip to content

[Issue]: Bad parsing of nvcc command line arguments by hipcc #226

Closed
@neworderofjamie

Description

@neworderofjamie

Problem Description

I'm trying to port some CUDA code to HIP and the --compiler-options "-fPIC"command line arguments seems to be being parsed incorrectly on the nvidia platform and not being passed through to nvcc

Operating System

Ubuntu 20.04.6 LTS (Focal Fossa)"

CPU

Intel(R) Xeon(R) Gold 6134 CPU

GPU

2*NVIDIA RTX A5000

ROCm Version

ROCm 6.2.4

ROCm Component

HIPCC

Steps to Reproduce

  1. Run command like /opt/rocm/bin/hipcc -dc -x cu -arch sm_86 -I"/opt/rocm/include" -std=c++11 --compiler-options -fPIC file.cc where file.cc is a HIP source
  2. Observe that hipcc tries to execute /usr/local/cuda/bin/nvcc -Wno-deprecated-gpu-targets -lcuda -lcudart -L/usr/local/cuda/lib64 -dc -x cu -arch sm_86 -I/opt/rocm/include -std=c++11 --compiler-options file.cc i.e. compiler-options is parsed incorrectly

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

No response

Additional Information

I can work around this by setting NVCC_APPEND_FLAGS="--compiler-options -fPIC" but this is annoying

Metadata

Metadata

Assignees

No one assigned

    Labels

    Under InvestigationgenericBuild error, or some other issue not caused by an LLVM bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions