Open Quuxplusone opened 4 years ago
Bugzilla Link | PR46067 |
Status | NEW |
Importance | P normal |
Reported by | Jonathan Schrack (jmschrack@gmail.com) |
Reported on | 2020-05-25 12:08:42 -0700 |
Last modified on | 2020-05-26 16:55:31 -0700 |
Version | trunk |
Hardware | PC Linux |
CC | efriedma@quicinc.com, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, neeilans@live.com, richard-llvm@metafoo.co.uk |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
Missing steps to reproduce.
Jonathan - to reproduce the bug, at the very least we need the preprocessed file with its full command line, or preferably the IR file (which can be generated by adding -emit-llvm to the clang command line).
Simon,
I got around the issue by modifying all the CMake instructions to only build
for gfx900, (My current card) since I noticed this happens on the gfx803
target. I'll revert and rebuild and try to get the input files, commands, and
IR tomorrow.
Eli,
Sorry about that. I posted the repro steps in the wrong bugzilla. :)
Steps to Reproduce:
+ Build LLVM from source (on github)
+ Build AMD Device Libs
+ Build HIP
+ build latest Pytorch from github
+Build LLVM from source
git clone https://github.com/llvm/llvm-project.git
cd llvm-project
mkdir -p build && cd build
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/opt/rocm/llvm -DCMAKE_BUILD_TYPE=Release
-DLLVM_ENABLE_ASSERTIONS=1 -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86" -
DLLVM_EXTERNAL_LLD_SOURCE_DIR=../lld -DLLVM_EXTERNAL_CLANG_SOURCE_DIR=../clang
../llvm
ninja
sudo ninja install
+ Build Device Libs
export PATH=/opt/rocm/llvm/bin:$PATH
git clone -b amd-stg-open https://github.com/RadeonOpenCompute/ROCm-Device-
Libs.git
cd ROCm-Device-Libs
mkdir -p build && cd build
CC=clang CXX=clang++ cmake -G Ninja -DLLVM_DIR=/opt/rocm/llvm -
DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_WERROR=1 -DLLVM_ENABLE_ASSERTIONS=1 ..
ninja
sudo ninja install
+ build HIP
git clone -b master https://github.com/ROCm-Developer-Tools/HIP.git
cd HIP
mkdir -p build && cd build
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/opt/rocm/hip -DHIP_COMPILER=clang -
DCMAKE_BUILD_TYPE=Release ..
ninja
sudo ninja install
+Build PyTorch
export USE_NINJA=1
export MAX_JOBS=8
export HIP_PLATFORM=hcc
git clone https://github.com/pytorch/pytorch.git
cd pytorch
git submodule update --init --recursive
python3 tools/amd_build/build_amd.py
pip3 install -r requirements.txt
python3 setup.py install --user