Skip to content

Compilation issue with modern AMD + optimization enabled #33

Description

@webmaster128

Current master at fc81a55 does not compile (as discussed in https://community.amd.com/thread/234809)

  1. Get a single-use Ubuntu 16.04 machine (no GPU required; 18.04 does not work due to kernel version compatibility of rocm-dkms)
  2. Login as root
apt update && apt upgrade -y && apt autoremove -y && apt install -y htop libnuma-dev && reboot
wget -qO - http://repo.radeon.com/rocm/apt/debian/rocm.gpg.key | sudo apt-key add -
echo 'deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ xenial main' | sudo tee /etc/apt/sources.list.d/rocm.list
apt update && apt install -y rocm-dkms
git clone https://github.com/PlasmaPower/nano-vanity.git && cd nano-vanity
./merge-kernel.py > kernel.cl

/opt/rocm/opencl/bin/x86_64/clang -include/opt/rocm/opencl/include/opencl-c.h -cl-std=CL1.2 -c -O0 kernel.cl
# good: creates kernel.o

/opt/rocm/opencl/bin/x86_64/clang -include/opt/rocm/opencl/include/opencl-c.h -cl-std=CL1.2 -c kernel.cl
# bad: does not terminate

Maybe there is some error which clang does not report. However, since CPU is at 100 % as long as the compiler runs it is more likely to be an infinite loop in the optimization process.

This may or may not be an issue in this project's code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions